Closed
Description
fn main() {}
trait T1 {
type Bar;
type Baz;
}
struct Foo;
mod t2 {
pub trait T2 {
type Bar;
}
}
use t2::T2;
impl T2 for Foo {
type Bar = String;
}
impl T1 for Foo {
type Bar = <Foo as t2::T2>::Bar;
// ^^^ unresolvedReference
type Baz = <Foo as T2>::Bar;
// ^^^ typeAlias
}
When T2
is used as t2::T2
, Bar
is unresolved, but when using T2
directly by getting it in scope w/ use t2::T2;
, it is resolved properly.
rust-analyzer version: 14c86d5 2022-04-13 dev
rustc 1.60.0 (7737e0b5c 2022-04-04)