Closed
Description
This code
trait T<r#fn> {
fn f<r#fn>() {}
}
fn main() {}
Gives incorrect error for type declared using raw identifiers:
error[E0403]: the name `fn` is already used for a generic parameter in this item's generic parameters
--> src/main.rs:2:10
|
1 | trait T<r#fn> {
| ---- first use of `fn`
2 | fn f<r#fn>() {}
| ^^^^ already used
warning: type parameter `fn` should have an upper camel case name
--> src/main.rs:1:9
|
1 | trait T<r#fn> {
| ^^^^ help: convert the identifier to upper camel case: `Fn`
|
= note: `#[warn(non_camel_case_types)]` on by default
warning: type parameter `fn` should have an upper camel case name
--> src/main.rs:2:10
|
2 | fn f<r#fn>() {}
| ^^^^ help: convert the identifier to upper camel case: `Fn`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0403`.
error: could not compile `playground`.