diff options
Diffstat (limited to 'tests/ui/parser/mismatched-braces/missing-close-brace-in-impl-trait.rs')
-rw-r--r-- | tests/ui/parser/mismatched-braces/missing-close-brace-in-impl-trait.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/parser/mismatched-braces/missing-close-brace-in-impl-trait.rs b/tests/ui/parser/mismatched-braces/missing-close-brace-in-impl-trait.rs new file mode 100644 index 000000000..8f46970b1 --- /dev/null +++ b/tests/ui/parser/mismatched-braces/missing-close-brace-in-impl-trait.rs @@ -0,0 +1,13 @@ +fn main() {} + +impl T for () { //~ ERROR cannot find trait `T` in this scope + +fn foo(&self) {} + +trait T { //~ ERROR trait is not supported in `trait`s or `impl`s + fn foo(&self); +} + +pub(crate) struct Bar<T>(); //~ ERROR struct is not supported in `trait`s or `impl`s + +//~ ERROR this file contains an unclosed delimiter |