rust/src/test/ui/parser/issue-24780.rs
Mazdak Farrokhzad b2c6eeb713 parser: merge fn grammars wrt. bodies & headers
also refactor `FnKind` and `visit_assoc_item` visitors
2020-02-05 01:27:09 +01:00

8 lines
279 B
Rust

// Verify that '>' is not both expected and found at the same time, as it used
// to happen in #24780. For example, following should be an error:
// expected one of ..., `>`, ... found `>`
fn foo() -> Vec<usize>> {
//~^ ERROR expected `;` or `{`, found `>`
Vec::new()
}