Closed
Description
I tried this code:
fn test() -> Vec<i64, i64> {
let vals = vec![(1, 2), (3, 4)];
vals.into_iter().collect()
}
I expected to see this happen:
error[E0107]: wrong number of type arguments: expected 1, found 2
--> src/main.rs:1:23
|
1 | fn test() -> Vec<i64, i64> {
| ^^^ unexpected type argument
Instead, this happened:
error[E0658]: use of unstable library feature 'allocator_api'
--> src/main.rs:1:23
|
1 | fn test() -> Vec<i64, i64> {
| ^^^
|
= note: see issue #32838 <https://github.com/rust-lang/rust/issues/32838> for more information
= help: add `#![feature(allocator_api)]` to the crate attributes to enable
This was very confusing to me, took me a while to figure out what the real error was.
Meta
rustc --version --verbose
:
rustc 1.50.0-nightly (1f5bc176b 2020-12-19)
binary: rustc
commit-hash: 1f5bc176b0e54a8e464704adcd7e571700207fe9
commit-date: 2020-12-19
host: x86_64-apple-darwin
release: 1.50.0-nightly