Typecheck error with SmallVec crate #12030
Labels
A-ty
type system / type inference / traits / method resolution
C-bug
Category: bug
S-actionable
Someone could pick this issue up and work on it right now
The following produces a R-A error, but compiles just fine:
I haven't been able to come up with a minimal example that does not use SmallVec.
ve.iter()
is inferred asIter<{unknown}>
by RA in that function. Note that this does not error if the array size is written in place:[Option<()>; 1].
This does not happen if I simply replace SmallVec with some type that implements
Deref<Target=[Option<()>]>
or&[Option<()>; SIZE]
itself.rust-analyzer version: rust-analyzer version: 24cf957 2022-04-11 stable
rustc version: rustc 1.62.0-nightly (878c7833f 2022-04-16)
The text was updated successfully, but these errors were encountered: