mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 02:57:37 +00:00
Rollup merge of #79236 - lcnr:mcg-resolve-dsb, r=eddyb
const_generics: assert resolve hack causes an error prevent the min_const_generics `HACK`s in resolve from triggering a fallback path which successfully compiles so that we don't have to worry about future compat issues when removing it r? `@eddyb` cc `@varkor`
This commit is contained in:
commit
c58c245e2c
@ -143,7 +143,7 @@ impl<'a> Resolver<'a> {
|
||||
_ => {
|
||||
bug!(
|
||||
"GenericParamsFromOuterFunction should only be used with Res::SelfTy, \
|
||||
DefKind::TyParam"
|
||||
DefKind::TyParam or DefKind::ConstParam"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -2539,6 +2539,7 @@ impl<'a> Resolver<'a> {
|
||||
span: Span,
|
||||
all_ribs: &[Rib<'a>],
|
||||
) -> Res {
|
||||
const CG_BUG_STR: &str = "min_const_generics resolve check didn't stop compilation";
|
||||
debug!("validate_res_from_ribs({:?})", res);
|
||||
let ribs = &all_ribs[rib_index + 1..];
|
||||
|
||||
@ -2639,6 +2640,8 @@ impl<'a> Resolver<'a> {
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
self.session.delay_span_bug(span, CG_BUG_STR);
|
||||
return Res::Err;
|
||||
}
|
||||
}
|
||||
@ -2720,6 +2723,8 @@ impl<'a> Resolver<'a> {
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
self.session.delay_span_bug(span, CG_BUG_STR);
|
||||
return Res::Err;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user