You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
relevant settings: all default settings on stable version channel
Description
In the main function below, let b should be annotated with : B as the rust compiler understands, but instead generates no annotation and when highlighted has type {unknown}. Additionally, on the following line, b.a does not generate an error, does not provide any type information, and has white syntax highlighting on the a instead of the blue that you get when manually adding the : B annotation on the previous line.
Code to Reproduce
pubstructB{a:u64,}#[derive(Clone)]pubstructA(u64);implInto<B>forA{fninto(self) -> B{B{a:self.0}}}fnmain(){let a:A = A(8);let b = a_to_b(&a).into();// this is type B but rust-analyzer says the type is {unknown}println!("b.a = {}", b.a)}fna_to_b(b_compat:&(implInto<B> + Clone)) -> implInto<B>{
b_compat.clone()}
The text was updated successfully, but these errors were encountered:
rust-analyzer version: 0.3.1623-standalone (2fbe69d 2023-08-12)
rustc version: rustc 1.72.0 (5680fa18f 2023-08-23)
relevant settings: all default settings on stable version channel
Description
In the
main
function below,let b
should be annotated with: B
as the rust compiler understands, but instead generates no annotation and when highlighted has type{unknown}
. Additionally, on the following line,b.a
does not generate an error, does not provide any type information, and has white syntax highlighting on thea
instead of the blue that you get when manually adding the: B
annotation on the previous line.Code to Reproduce
The text was updated successfully, but these errors were encountered: