]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/unmatched-langle-2.rs
Account for ADT bodies and struct expressions
[rust.git] / src / test / ui / parser / unmatched-langle-2.rs
1 // When there are too many opening `<`s, the compiler would previously
2 // suggest nonsense if the `<`s were interspersed with other tokens:
3 //
4 //   error: unmatched angle brackets
5 //    --> unmatched-langle.rs:2:10
6 //     |
7 //   2 |     foo::<Ty<<<i32>();
8 //     |          ^^^ help: remove extra angle brackets
9 //
10 // This test makes sure that this is no longer happening.
11
12 fn main() {
13     foo::<Ty<<<i32>();
14     //~^ ERROR: expected `::`, found `(`
15 }