File tree Expand file tree Collapse file tree 2 files changed +3
-6
lines changed
compiler/rustc_hir_analysis/src/hir_ty_lowering
tests/ui/associated-consts Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -998,6 +998,9 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
998998 self . lower_const_arg ( ct, FeedConstTy :: No ) . into ( )
999999 }
10001000 } ;
1001+ if term. references_error ( ) {
1002+ continue ;
1003+ }
10011004 // FIXME(#97583): This isn't syntactically well-formed!
10021005 where_bounds. push ( format ! (
10031006 " T: {trait}::{assoc_name} = {term}" ,
Original file line number Diff line number Diff line change @@ -26,12 +26,6 @@ LL | trait Parent2 { const C: &'static str; }
2626LL |
2727LL | fn take1(_: impl Trait1<C = "?">) {}
2828 | ^^^^^^^ ambiguous associated constant `C`
29- |
30- = help: consider introducing a new type parameter `T` and adding `where` constraints:
31- where
32- T: Trait1,
33- T: Parent2::C = {const error},
34- T: Parent1::C = {const error}
3529
3630error: aborting due to 2 previous errors
3731
You can’t perform that action at this time.
0 commit comments