Error on projection of dyn noncompat type in old trait solver#154992
Error on projection of dyn noncompat type in old trait solver#154992spirali wants to merge 2 commits into
Conversation
| //~^ ERROR the trait `Foo` is not dyn compatible | ||
| x.method(); | ||
| //~^ ERROR the trait `Foo` is not dyn compatible | ||
| //~^ ERROR no method named `method` found for reference `&dyn Foo` |
There was a problem hiding this comment.
that's annoying :< ideally we'd silence method errors if the self type is not well-formed, tracking that is non-trivial and I don't know how we'd do so myself rn
|
lgtm, let's do a crater run, there should be exactly 1 regression from this @bors try |
This comment has been minimized.
This comment has been minimized.
Error on projection of dyn noncompat type in old trait solver
|
@craterbot check |
|
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
|
🚧 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
|
🎉 Experiment
Footnotes
|
|
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
|
@craterbot p=1 |
|
📝 Configuration of the ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
|
🚧 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
|
🎉 Experiment
Footnotes
|
|
@craterbot check crates=https://crater-reports.s3.amazonaws.com/pr-154992-1/retry-regressed-list.txt p=1 surprising that we have that many spurious regressions still? it's caused by build OOMs and unlike the new solver, this PR shouldn't really change max-rss in any way 😅 cc @rust-lang/infra |
|
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
|
🚧 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
|
🎉 Experiment
Footnotes
|
|
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
|
🚧 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
|
🎉 Experiment
Footnotes
|
|
Alright 🤔 @spirali can you look at the crater report and figure out whether they are expected? |
|
Oh, I had some problems with notifications again. I will look at it.
|
|
It seems that all fails are realated to a single crate: it fails with error: It seems that error message is correct as the |
|
yeah, valid regression, these error messages are horrible though 😅 I think getting errors at every callsite is hard to avoid rn. I don't quite get why we get type mismatch errors here though. I would hope that failing to normalize would instead just result in stuff being tainted or sth, silencing/avoidng the type mismatch do you have an idea what's going on there/are you able to minimize that? |
This comment has been minimized.
This comment has been minimized.
a17fd3c to
882e563
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
This comment has been minimized.
This comment has been minimized.
882e563 to
2ffefb5
Compare
|
I have implemented a new version. It suppresses downstream errors by returning a
|
|
The job Click to see the possible cause of the failure (guessed by this bot) |
|
|
||
| // `<dyn Trait>::Name` is only valid when `Trait` is dyn-compatible. | ||
| // If it isn't, create an error at the projection site and return a tainted error term. | ||
| let self_ty = selcx.infcx.shallow_resolve(obligation.predicate.self_ty()); |
There was a problem hiding this comment.
is there something preventing us from putting this into assemble_candidates_from_object_ty?
|
Very cool 😊 would you be open to write an types FCP proposal for this change? I'd gladly help out so reach out if you're unsure about what exactly to write/how to explain parts of it |
|
☔ The latest upstream changes (presumably #157104) made this pull request unmergeable. Please resolve the merge conflicts by rebasing. |
View all comments
Trying to fix rust-lang/trait-system-refactor-initiative#269
I am not sure that the check is placed into the right place in the code.
r? lcnr