Itertools::max
is misdetected as Ord::max
, resulting in expected 1 argument, found 0
error
#10673
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
Steps to reproduce
Create a new bin crate, and replace
src/main.rs
with the following code.src/main.rs
When
edition = "2021"
, nothing is wrong.When
edition = "2018"
,rust-analyzer
points out that there is an error on the fifth line (.max()
):[rust-analyzer mismatched-arg-count] [E] expected 1 argument, found 0
.Hovering on the
max
showscore::cmp::Ord
, notstd::iter::Iterator
.In both case,
cargo check
shows no errors or warnings.Probably there is an issue in resolving traits in prelude.
Version info
rustup show
:CocInfo
The text was updated successfully, but these errors were encountered: