Rollup merge of #121620 - nnethercote:fix-even-more-121208-fallout, r=lcnr
Fix more #121208 fallout (round 3) #121208 converted lots of delayed bugs to bugs. Unsurprisingly, there were a few invalid conversion found via fuzzing. r? `@lcnr`
This commit is contained in:
commit
76f303d658
6 changed files with 113 additions and 2 deletions
|
@ -1331,7 +1331,7 @@ impl<'a, 'tcx> BoundVarContext<'a, 'tcx> {
|
|||
}
|
||||
}
|
||||
|
||||
self.tcx.dcx().span_bug(
|
||||
self.tcx.dcx().span_delayed_bug(
|
||||
lifetime_ref.ident.span,
|
||||
format!("Could not resolve {:?} in scope {:#?}", lifetime_ref, self.scope,),
|
||||
);
|
||||
|
|
|
@ -804,10 +804,11 @@ impl<'a, 'tcx> ProbeContext<'a, 'tcx> {
|
|||
let trait_ref = principal.with_self_ty(self.tcx, self_ty);
|
||||
self.elaborate_bounds(iter::once(trait_ref), |this, new_trait_ref, item| {
|
||||
if new_trait_ref.has_non_region_bound_vars() {
|
||||
this.dcx().span_bug(
|
||||
this.dcx().span_delayed_bug(
|
||||
this.span,
|
||||
"tried to select method from HRTB with non-lifetime bound vars",
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
let new_trait_ref = this.instantiate_bound_regions_with_erased(new_trait_ref);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue