diff options
Diffstat (limited to 'tests/ui/parser/unclosed-braces.rs')
-rw-r--r-- | tests/ui/parser/unclosed-braces.rs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/ui/parser/unclosed-braces.rs b/tests/ui/parser/unclosed-braces.rs new file mode 100644 index 000000000..ed94fff38 --- /dev/null +++ b/tests/ui/parser/unclosed-braces.rs @@ -0,0 +1,22 @@ +struct S { + x: [usize; 3], +} + +fn foo() { + { + { + println!("hi"); + } + } +} + +fn main() { +//~^ NOTE unclosed delimiter + { + { + //~^ NOTE this delimiter might not be properly closed... + foo(); + } + //~^ NOTE ...as it matches this but it has different indentation +} +//~ ERROR this file contains an unclosed delimiter |