1
Fork 0

Delay a bug and mark precise_capturing as not incomplete

This commit is contained in:
Michael Goulet 2024-06-16 22:07:23 -04:00
parent 579bc3c0e8
commit 227374714f
36 changed files with 53 additions and 230 deletions

View file

@ -1385,7 +1385,11 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
None
}
// Ignore `use` syntax since that is not valid in objects.
GenericBound::Use(..) => None,
GenericBound::Use(_, span) => {
this.dcx()
.span_delayed_bug(*span, "use<> not allowed in dyn types");
None
}
}));
let lifetime_bound =
lifetime_bound.unwrap_or_else(|| this.elided_dyn_bound(t.span));