aboutsummaryrefslogtreecommitdiff
path: root/src/parser/grammar/items/traits.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser/grammar/items/traits.rs')
-rw-r--r--src/parser/grammar/items/traits.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/parser/grammar/items/traits.rs b/src/parser/grammar/items/traits.rs
index 7d657ced0..60158fe41 100644
--- a/src/parser/grammar/items/traits.rs
+++ b/src/parser/grammar/items/traits.rs
@@ -1,9 +1,16 @@
1use super::*; 1use super::*;
2 2
3// test trait_item
4// trait T<U>: Hash + Clone where U: Copy {}
3pub(super) fn trait_item(p: &mut Parser) { 5pub(super) fn trait_item(p: &mut Parser) {
4 assert!(p.at(TRAIT_KW)); 6 assert!(p.at(TRAIT_KW));
5 p.bump(); 7 p.bump();
6 name(p); 8 name(p);
9 type_params::list(p);
10 if p.at(COLON) {
11 type_params::bounds(p);
12 }
13 type_params::where_clause(p);
7 p.expect(L_CURLY); 14 p.expect(L_CURLY);
8 p.expect(R_CURLY); 15 p.expect(R_CURLY);
9} 16}