-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
A-tytype system / type inference / traits / method resolutiontype system / type inference / traits / method resolutionE-easyE-has-instructionsIssue has some instructions and pointers to code to get startedIssue has some instructions and pointers to code to get startedS-actionableSomeone could pick this issue up and work on it right nowSomeone could pick this issue up and work on it right now
Description
First of all, thanks for a very useful tool!
When I edit the following code:
pub trait Foo {
type Bar: Default;
}
pub fn quux<T: Foo>() -> T::Bar {
let y = Default::default();
y
}rust-analyzer annotates y with the nonsensical type Foo::Bar<T>, instead of the correct <T as Foo>::Bar. Clicking to insert this annotation results in a compilation error as expected (E0223).
I'm using Visual Studio Code 1.47.2 with version 0.2.336 of the rust-analyzer plugin (installed from the marketplace) and the latest stable rustc. I have not installed the official Rust plugin.
Metadata
Metadata
Assignees
Labels
A-tytype system / type inference / traits / method resolutiontype system / type inference / traits / method resolutionE-easyE-has-instructionsIssue has some instructions and pointers to code to get startedIssue has some instructions and pointers to code to get startedS-actionableSomeone could pick this issue up and work on it right nowSomeone could pick this issue up and work on it right now