Skip to content

Commit eefccf6

Browse files
committed
Reject impl Trait containing only lifetimes
1 parent 0f99404 commit eefccf6

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/ty.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -949,6 +949,10 @@ pub mod parsing {
949949
break;
950950
}
951951
}
952+
// Just lifetimes like `impl 'a` is not an ImplTrait.
953+
if !at_least_one_type(&bounds) {
954+
return Err(input.error("expected at least one type"));
955+
}
952956
bounds
953957
},
954958
})

0 commit comments

Comments
 (0)