Closed
Description
I tried this code:
cargo +nightly new test_strsim
cd test_strsim
cargo +nightly add [email protected]
RUSTFLAGS="-Znext-solver" cargo +nightly check
I expected to see this happen: Code compiles (as without the -Znew-solver
flag)
Instead, this happened: Compilation failed
error[E0282]: type annotations needed
--> /home/weiznich/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strsim-0.10.0/src/lib.rs:93:13
|
93 | for (i, a_elem) in a.into_iter().enumerate() {
| ^^^^^^ cannot infer type for associated type `<<&'a Iter1 as IntoIterator>::IntoIter as Iterator>::Item`
error[E0282]: type annotations needed
--> /home/weiznich/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strsim-0.10.0/src/lib.rs:212:13
|
212 | for (i, a_elem) in a.into_iter().enumerate() {
| ^^^^^^ cannot infer type for associated type `<<&'a Iter1 as IntoIterator>::IntoIter as Iterator>::Item`
For more information about this error, try `rustc --explain E0282`.
Meta
rustc --version --verbose
:
rustc 1.77.0-nightly (f688dd684 2024-01-04)
binary: rustc
commit-hash: f688dd684faca5b31b156fac2c6e0ae81fc9bc90
commit-date: 2024-01-04
host: x86_64-unknown-linux-gnu
release: 1.77.0-nightly
LLVM version: 17.0.6