mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-07 17:18:32 +03:00
d194795f14
If we encounter `fn foo<T: Trait()`, the recovery logic would it as if `Trait` was intended to use the Fn-like trait syntax, but if we don't know for certain that we've parsed a full trait bound (`fn foo<T: Trait()>`), we bail from the recovery as more likely there could have been a missing closing `>` and the `(` corresponds to the start of the fn parameter list.
14 lines
407 B
Plaintext
14 lines
407 B
Plaintext
error: expected one of `+`, `,`, `::`, `=`, or `>`, found `(`
|
|
--> $DIR/missing-closing-generics-bracket.rs:7:25
|
|
|
|
|
LL | fn foo<T: Trait<'static>() {}
|
|
| ^ expected one of `+`, `,`, `::`, `=`, or `>`
|
|
|
|
|
help: you might have meant to end the type parameters here
|
|
|
|
|
LL | fn foo<T: Trait<'static>>() {}
|
|
| +
|
|
|
|
error: aborting due to 1 previous error
|
|
|