When I try to perform the add_explicit_type
code action on the variable i
of a simple type:
When I try to do the same thing on the variable foo
that uses a type from an external crate (ustr
in this case):
There's no code action available for inserting the type of foo
. Isn't this a bug in rust-analyzer?
main.rs
:
use ustr::UstrSet;
pub fn bar() -> UstrSet {
todo!();
}
fn main() {
let _i = 123;
let foo = bar();
}
Cargo.toml
:
[package]
name = "foo"
version = "0.1.0"
edition = "2021"
[dependencies]
ustr = "1.0.0"