Rust-analyzer add_explicit_type doesn't work with types from external crates

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"

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.