Open
Description
This code
fn r<r#trait>() {}
fn main() {
r();
}
Gives incorrect warning and error for type declared using raw identifiers:
warning: type parameter `trait` should have an upper camel case name
--> src/main.rs:1:6
|
1 | fn r<r#trait>() {}
| ^^^^^^^ help: convert the identifier to upper camel case: `Trait`
|
= note: `#[warn(non_camel_case_types)]` on by default
error[E0282]: type annotations needed
--> src/main.rs:4:5
|
4 | r();
| ^ cannot infer type for type parameter `trait`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0282`.
error: could not compile `playground`.
NOTE: This is about the diagnostics not including the r#
in each case.