syn
syn copied to clipboard
Consider parsing `impl 'a` or `impl` as a type
Rustc considers this code syntactically valid, it's only a later stage of compilation that reports an error. Syn does not currently permit these.
#[cfg(any())]
fn f(_: impl 'static, _: impl) {}
error: at least one trait must be specified
--> src/main.rs:2:9
|
2 | fn f(_: impl 'static, _: impl) {}
| ^^^^^^^^^^^^
error: at least one trait must be specified
--> src/main.rs:2:26
|
2 | fn f(_: impl 'static, _: impl) {}
| ^^^^