diff options
Diffstat (limited to 'tests/ui/parser/default-unmatched-assoc.rs')
-rw-r--r-- | tests/ui/parser/default-unmatched-assoc.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/parser/default-unmatched-assoc.rs b/tests/ui/parser/default-unmatched-assoc.rs new file mode 100644 index 000000000..168ea3e76 --- /dev/null +++ b/tests/ui/parser/default-unmatched-assoc.rs @@ -0,0 +1,16 @@ +fn main() {} + +trait Foo { + default!(); //~ ERROR cannot find macro `default` in this scope + default do + //~^ ERROR `default` is not followed by an item + //~| ERROR non-item in item list +} + +struct S; +impl S { + default!(); //~ ERROR cannot find macro `default` in this scope + default do + //~^ ERROR `default` is not followed by an item + //~| ERROR non-item in item list +} |