]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/issues/issue-66357-unexpected-unreachable.rs
Rollup merge of #92399 - Veeupup:fix_vec_typo, r=Dylan-DPC
[rust.git] / src / test / ui / parser / issues / issue-66357-unexpected-unreachable.rs
1 // The problem in #66357 was that the call trace:
2 //
3 // - parse_fn_block_decl
4 // - expect_or
5 // - unexpected
6 // - expect_one_of
7 // - expected_one_of_not_found
8 // - recover_closing_delimiter
9 //
10 // ended up bubbling up `Ok(true)` to `unexpected` which then used `unreachable!()`.
11
12 fn f() { |[](* }
13 //~^ ERROR expected one of `,` or `:`, found `(`
14 //~| ERROR expected one of `&`, `(`, `)`, `-`, `...`, `..=`, `..`, `[`, `_`, `box`, `mut`, `ref`, `|`, identifier, or path, found `*`