-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add ide-assist: generate_impl_trait for generate_impl #19938
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
r? @Veykril |
} | ||
|
||
impl Foo<${1:_}> for ${2:_} { | ||
$0fn foo(&self) -> _ { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need a tabstop here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Used to fill in generic parameters?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean, before the fn
keyword
Besides tabstop, other things look good |
} | ||
|
||
if let Some(item) = impl_.assoc_item_list().and_then(|it| it.assoc_items().next()) { | ||
edit.add_tabstop_before(cap, item); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was confused because I'm in my phone outside 😅
I mean, do we need this tabstop before the first assoc item of a trait?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When implementing traits, positioning the cursor nearby is more convenient for editing todo!()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then the tabstop should probably be on the todo!()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then the tabstop should probably be on the
todo!()
ok
Adds this trait impl for a type.
->