Open
Description
Input:
struct Generic<T: Send>(T);
fn foo() {
Generic("test").do_a_thing()
}
Current output:
struct Generic<T: Send>(T);
impl Generic {
fn do_a_thing(&self) {
todo!()
}
}
fn foo() {
Generic("test").do_a_thing()
}
Expected output:
struct Generic<T: Send>(T);
impl<T: Send> Generic<T> {
fn do_a_thing(&self) {
todo!()
}
}
fn foo() {
Generic("test").do_a_thing()
}
I suppose impl Generic<&'static str>
would also be an option, but less likely to be what the user intended.
rust-analyzer version: 0.4.2462-standalone
rustc version: 1.89.0-nightly (414482f6a 2025-05-13)
editor or extension: VSCode (ext version 0.4.2462)
@rustbot label +A-assists
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
rustbot commentedon May 16, 2025
Unknown labels: S-assists