//@ run-rustfix #![allow(warnings)] // This test checks that the following error is emitted and the suggestion works: // // ``` // let _ = vec![1, 2, 3].into_iter().collect::<<>(); // ^^ help: remove extra angle brackets // ``` trait Foo { type Output; } fn foo() { // More complex cases with more than one correct leading `<` character: bar::<::Output>(); //~^ ERROR unmatched angle bracket bar::<::Output>(); //~^ ERROR unmatched angle bracket bar::<::Output>(); //~^ ERROR unmatched angle bracket bar::<::Output>(); } fn bar() {} fn main() { let _ = vec![1, 2, 3].into_iter().collect::>(); //~^ ERROR unmatched angle bracket let _ = vec![1, 2, 3].into_iter().collect::>(); //~^ ERROR unmatched angle bracket let _ = vec![1, 2, 3].into_iter().collect::>(); //~^ ERROR unmatched angle bracket let _ = vec![1, 2, 3].into_iter().collect::>(); //~^ ERROR unmatched angle bracket let _ = vec![1, 2, 3].into_iter().collect::>(); }