Auto merge of #96806 - cjgillot:codegen-fulfill-nice, r=oli-obk
Gracefully fail to resolve associated items instead of `delay_span_bug`. `codegen_fulfill_obligation` is used during instance resolution for trait items. In case of insufficient normalization issues during MIR inlining, it caused ICEs. It's better to gracefully refuse to resolve the associated item, and let the caller decide what to do with this. Split from https://github.com/rust-lang/rust/pull/91743 Closes #69121 Closes #73021 Closes #88599 Closes #93008 Closes #93248 Closes #94680 Closes #96170 r? `@oli-obk`
This commit is contained in:
commit
cb9cb4d4e1
12 changed files with 108 additions and 88 deletions
|
|
@ -30,7 +30,15 @@ LL | const VAL: T;
|
|||
LL | impl<N, M> TypeVal<usize> for Multiply<N, M> where N: TypeVal<VAL> {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `VAL` in implementation
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
error: constant expression depends on a generic parameter
|
||||
--> $DIR/ice-6252.rs:13:9
|
||||
|
|
||||
LL | [1; <Multiply<Five, Five>>::VAL];
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: this may fail depending on what value the parameter takes
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
Some errors have detailed explanations: E0046, E0412.
|
||||
For more information about an error, try `rustc --explain E0046`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue