-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Generating a function in another module doesn't work #4551
Comments
It works for me when the module already exists: fn main() {
bar::foo(42);
}
mod bar {
} It also works in the current module: mod bar {
pub(crate) fn foo(arg: i32) {
self::baz();
// or even
crate::bar::baz();
}
} But it doesn't work with EDIT: ah, you're testing with a different file. |
I won't be able to look into this for another few days, but I'm planning on doing so |
After some tests, I found that |
I can't reproduce this issue with current versions, it works properly in nvim using coc-rust-analyzer. I can't try VS Code right now as it's somehow borked on my machine 🤷 |
Still not work with RA+VSCode. Yes, |
Aw... As expected, adding a |
The new
Add function
code action bySnippetTextEdit
will fail to generate the function.For example, there is no
bar
function in foo.rs,foo::bar();
providesAdd function
action, but will not generate the function after the action fired.The text was updated successfully, but these errors were encountered: