diff options
Diffstat (limited to 'tests/ui/impl-trait/precise-capturing/unexpected-token.rs')
| -rw-r--r-- | tests/ui/impl-trait/precise-capturing/unexpected-token.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/impl-trait/precise-capturing/unexpected-token.rs b/tests/ui/impl-trait/precise-capturing/unexpected-token.rs new file mode 100644 index 00000000000..39c8c0def6b --- /dev/null +++ b/tests/ui/impl-trait/precise-capturing/unexpected-token.rs @@ -0,0 +1,9 @@ +// We used to fatal error without any useful diagnostic when we had an unexpected +// token due to a strange interaction between the sequence parsing code and the +// param/lifetime parsing code. + +fn hello() -> impl use<'a {}> Sized {} +//~^ ERROR expected one of `,` or `>`, found `{` +//~| ERROR expected item, found `>` + +fn main() {} |
