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
fnbar(_:&str){}fnfoo<T:Into<Box<str>>>(x:T){let y = x.into();bar(&y);}
compiles fine, and of course the type of y is Box<str>, but the inlay hints (and hover) are saying something else:
this isnt just happening with Box<str> but seems to happen to any Into<Box<_>>, and it look to just pick up whatever it guesses based on the usage (like above it saw &y when a &str is expected to guessed y must be a str), so you can get some pretty strange stuff:
(of course in this case it wont compile, but it shows that rust analyzer is just picking up what ever you use it as)
The text was updated successfully, but these errors were encountered:
rust-analyzer version: 0.3.1673-standalone
rustc version: rustc 1.72.1 (d5c2e9c34 2023-09-13)
The follow code:
compiles fine, and of course the type of
y
isBox<str>
, but the inlay hints (and hover) are saying something else:this isnt just happening with
Box<str>
but seems to happen to anyInto<Box<_>>
, and it look to just pick up whatever it guesses based on the usage (like above it saw&y
when a&str
is expected to guessedy
must be astr
), so you can get some pretty strange stuff:(of course in this case it wont compile, but it shows that rust analyzer is just picking up what ever you use it as)
The text was updated successfully, but these errors were encountered: