Skip to content

Commit 15a82d6

Browse files
committed
Always assert that impl_trait_def|bounds are empty at start
1 parent 67deaf9 commit 15a82d6

File tree

1 file changed

+2
-7
lines changed
  • compiler/rustc_ast_lowering/src

1 file changed

+2
-7
lines changed

Diff for: compiler/rustc_ast_lowering/src/item.rs

+2-7
Original file line numberDiff line numberDiff line change
@@ -1305,13 +1305,8 @@ impl<'hir> LoweringContext<'_, 'hir> {
13051305
itctx: ImplTraitContext,
13061306
f: impl FnOnce(&mut Self) -> T,
13071307
) -> (&'hir hir::Generics<'hir>, T) {
1308-
match itctx {
1309-
ImplTraitContext::Universal(..) => {}
1310-
_ => {
1311-
debug_assert!(self.impl_trait_defs.is_empty());
1312-
debug_assert!(self.impl_trait_bounds.is_empty());
1313-
}
1314-
}
1308+
debug_assert!(self.impl_trait_defs.is_empty());
1309+
debug_assert!(self.impl_trait_bounds.is_empty());
13151310

13161311
// Error if `?Trait` bounds in where clauses don't refer directly to type parameters.
13171312
// Note: we used to clone these bounds directly onto the type parameter (and avoid lowering

0 commit comments

Comments
 (0)