-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't ICE when deducing future output if other errors already occurred #120057
Conversation
.find_map(|(p, s)| get_future_output(p.as_predicate(), s))?, | ||
ty::Alias(kind, ty::AliasTy { def_id, args, .. }) => { | ||
match kind { | ||
ty::Projection => assert!(self.tcx.is_impl_trait_in_trait(def_id)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This projection should have been normalized to its corresponding opaque at this point. Why isn't that happening here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm assuming it's one of the other errors. I'll see if I can find something out
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't figured out yet how we get here, but the root issue seems to be that we have a query cycle at
#0 [object_safety_violations] determining object safety of trait `Foo`
#1 [check_is_object_safe] checking if trait `Foo` is object safe
#2 [fn_sig] computing function signature of `Foo::foo`
The fn_sig
query tries to emit an error. But to get the information to emit a good diagnostic, it ends up triggering a cycle error, thus hiding the as-of-yet unreported diagnostic and instead cycle_delay_bug
ging out with an error fn signature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok thats fine i guess
could you delay this as a bug saying something like "this projection should have been projected to an opaque type"?
r=me after
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have found an entirely different solution. How do you like this one?
f6a8294
to
f75bcf3
Compare
Could not assign reviewer from: |
Could not assign reviewer from: |
bf2a126
to
f1ef930
Compare
@bors r=compiler-errors |
…r=compiler-errors Don't ICE when deducing future output if other errors already occurred The situation can't really happen outside of erroneous code. What was interesting is that it ICEd before emitting any other diagnostics. This was because the other errors were silenced due to cycle_delay_bug cycle errors. r? `@compiler-errors` fixes rust-lang#119890
…r=compiler-errors Don't ICE when deducing future output if other errors already occurred The situation can't really happen outside of erroneous code. What was interesting is that it ICEd before emitting any other diagnostics. This was because the other errors were silenced due to cycle_delay_bug cycle errors. r? ``@compiler-errors`` fixes rust-lang#119890
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#119172 (Detect `NulInCStr` error earlier.) - rust-lang#119833 (Make tcx optional from StableMIR run macro and extend it to accept closures) - rust-lang#119955 (Modify GenericArg and Term structs to use strict provenance rules) - rust-lang#120021 (don't store const var origins for known vars) - rust-lang#120038 (Don't create a separate "basename" when naming and opening a MIR dump file) - rust-lang#120057 (Don't ICE when deducing future output if other errors already occurred) - rust-lang#120073 (Remove spastorino from users_on_vacation) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#119172 (Detect `NulInCStr` error earlier.) - rust-lang#119833 (Make tcx optional from StableMIR run macro and extend it to accept closures) - rust-lang#119967 (Add `PatKind::Err` to AST/HIR) - rust-lang#119978 (Move async closure parameters into the resultant closure's future eagerly) - rust-lang#120021 (don't store const var origins for known vars) - rust-lang#120038 (Don't create a separate "basename" when naming and opening a MIR dump file) - rust-lang#120057 (Don't ICE when deducing future output if other errors already occurred) - rust-lang#120073 (Remove spastorino from users_on_vacation) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#119172 (Detect `NulInCStr` error earlier.) - rust-lang#119833 (Make tcx optional from StableMIR run macro and extend it to accept closures) - rust-lang#119967 (Add `PatKind::Err` to AST/HIR) - rust-lang#119978 (Move async closure parameters into the resultant closure's future eagerly) - rust-lang#120021 (don't store const var origins for known vars) - rust-lang#120038 (Don't create a separate "basename" when naming and opening a MIR dump file) - rust-lang#120057 (Don't ICE when deducing future output if other errors already occurred) - rust-lang#120073 (Remove spastorino from users_on_vacation) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#120057 - oli-obk:not_sure_wtf_is_going_on, r=compiler-errors Don't ICE when deducing future output if other errors already occurred The situation can't really happen outside of erroneous code. What was interesting is that it ICEd before emitting any other diagnostics. This was because the other errors were silenced due to cycle_delay_bug cycle errors. r? ```@compiler-errors``` fixes rust-lang#119890
The situation can't really happen outside of erroneous code. What was interesting is that it ICEd before emitting any other diagnostics. This was because the other errors were silenced due to cycle_delay_bug cycle errors.
r? @compiler-errors
fixes #119890