Always assert that impl_trait_def|bounds are empty at start
This commit is contained in:
parent
67deaf9fea
commit
15a82d6917
@ -1305,13 +1305,8 @@ impl<'hir> LoweringContext<'_, 'hir> {
|
|||||||
itctx: ImplTraitContext,
|
itctx: ImplTraitContext,
|
||||||
f: impl FnOnce(&mut Self) -> T,
|
f: impl FnOnce(&mut Self) -> T,
|
||||||
) -> (&'hir hir::Generics<'hir>, T) {
|
) -> (&'hir hir::Generics<'hir>, T) {
|
||||||
match itctx {
|
debug_assert!(self.impl_trait_defs.is_empty());
|
||||||
ImplTraitContext::Universal(..) => {}
|
debug_assert!(self.impl_trait_bounds.is_empty());
|
||||||
_ => {
|
|
||||||
debug_assert!(self.impl_trait_defs.is_empty());
|
|
||||||
debug_assert!(self.impl_trait_bounds.is_empty());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Error if `?Trait` bounds in where clauses don't refer directly to type parameters.
|
// Error if `?Trait` bounds in where clauses don't refer directly to type parameters.
|
||||||
// Note: we used to clone these bounds directly onto the type parameter (and avoid lowering
|
// Note: we used to clone these bounds directly onto the type parameter (and avoid lowering
|
||||||
|
Loading…
x
Reference in New Issue
Block a user