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
sunrosa
changed the title
Borrow<T> leads to T being unknown in a generic trait impl
Borrow<T> leads to T being unknown in a generic blanket impl
May 1, 2024
should_be_string is displayed with a type of {unknown} and the documentation for stuff like len won't show up. Using the wrong methods still shows up as an error but I think that's because of a rustc pass or something.
I'm going to assume the root cause is the same, hence why this isn't its own issue. I just want to make sure it gets looked at alongside this reproduction, just in case the root causes are different.
I am using rust-analyzer VScode extension
v0.3.1940
and rustc1.77.2
. I am having this issue with borrow(). With the impl below:It is resolving to unknown and not linting, but has no compiler errors:
And of course, there is no linting when trying to access fields of the unknown type.
The text was updated successfully, but these errors were encountered: