Open xxchan opened 1 year ago
Another observation: If we change the output of Super1::I
to the same type as bar
, it works.
pub trait Super1 {
type I: std::future::Future<Output = usize> ;
}
If we change it to another one, e.g., u32
, it doesn't work again.
More interestingly, await
on any identifier that is not an async fn
will get Super1::I::Output
Yeah, pretty sure this is a chalk bug, we have a few similar ones, e.g. #10312; it might be a variation of https://github.com/rust-lang/chalk/issues/727.
rust-analyzer version: 0.4.1304-standalone (398a71aff 2022-11-29)
rustc version: rustc 1.66.0-nightly (b8c35ca26 2022-10-15)
relevant settings: (eg. client settings, or environment variables like
CARGO
,RUSTUP_HOME
orCARGO_HOME
)The second one's type cannot be inferred.
Note: If we change one of the Super1 to Super2, it works. e.g.,