Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/parser/src/grammar/generic_params.rs')
-rw-r--r--crates/parser/src/grammar/generic_params.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/parser/src/grammar/generic_params.rs b/crates/parser/src/grammar/generic_params.rs
index cf80a535ac..e0fa753fa7 100644
--- a/crates/parser/src/grammar/generic_params.rs
+++ b/crates/parser/src/grammar/generic_params.rs
@@ -119,8 +119,7 @@ fn lifetime_bounds(p: &mut Parser<'_>) {
// test type_param_bounds
// struct S<T: 'a + ?Sized + (Copy) + ~const Drop>;
pub(super) fn bounds(p: &mut Parser<'_>) {
- assert!(p.at(T![:]));
- p.bump(T![:]);
+ p.expect(T![:]);
bounds_without_colon(p);
}