-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
A-diagnosticsdiagnostics / error reportingdiagnostics / error reportingA-tytype system / type inference / traits / method resolutiontype system / type inference / traits / method resolutionC-bugCategory: bugCategory: bug
Description
fn f() {
trait T {
fn f() {}
}
impl T for i32 {}
impl T for u32 {}
&[i32::f, u32::f] as &[fn()];
}triggers two false diagnostics
non-primitive cast: `&[fn f<i32>(); 2]` as `&[fn()]`rust-analyzer[E0605](https://doc.rust-lang.org/stable/error_codes/E0605.html)
expected fn f<i32>(), found fn f<u32>()rust-analyzer[E0308](https://doc.rust-lang.org/stable/error_codes/E0308.html)
Metadata
Metadata
Assignees
Labels
A-diagnosticsdiagnostics / error reportingdiagnostics / error reportingA-tytype system / type inference / traits / method resolutiontype system / type inference / traits / method resolutionC-bugCategory: bugCategory: bug