-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
A-assistsE-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
For reference I am using rust-analyzer via vs-code.
- vs-code extension version
0.3.594
- Nightly channel
-
PersistentState: { lastCheck: 1620934826021, releaseId: 42876454, serverVersion: '0.2.591' }
- Nightly (
rustc 1.54.0-nightly (5c0292654 2021-05-11)
)
Given the following input code:
pub mod submod {
pub struct Foo<T> {
_bar: *mut T,
}
impl<T> Foo<T> {
pub fn new() -> Self {
todo!()
}
}
}
Rust-analyzer offers to "Generate a Default impl from a new fn" If I use this assist, I get the following impl generated:
impl Default for Foo<T> {
fn default() -> Self {
Self::new()
}
}
Note the missing <T>
for the impl
Metadata
Metadata
Assignees
Labels
A-assistsE-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