Closed
Description
Version
rust-analyzer version: rust-analyzer version: 0.3.1591-standalone
rustc version: rustc 1.70.0 (90c541806 2023-05-31)
relevant settings: Not special settings or configuration.
Description
I'm writing rust
in vscode
and when I have a match
that I want RA to fill, RA put the code at the wrong place.
I've the following sample code:
#[wasm_bindgen]
pub fn hello_world() {
let value: Result<bool, ()> = Ok(true);
match value {}
}
When I place my cursor on value
on the line match value ...
and execute the quick action Fill match arms
it result in the following code:
{
Ok(_) => todo!(),
Err(_) => todo!(),
}
pub fn hello_world() {
let value: Result<bool, ()> = Ok(true);
match value {}
}
What I see:
- The
match value
arms aren't filled. - The
#[wasm_bindgen]
was replaced by the completion of RA for the match arms.
That behavior doesn't exist if I remove #[wasm_bindgen]
or replace it with #[test]
.