-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.P-highHigh priorityHigh priorityT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.
Description
Compiling foreach v0.2.0 (file:///Users/jdm/src/iter_foreach)
error: use of unstable library feature 'iterator_for_each' (see issue #42986)
--> tests/basic.rs:10:10
|
10 | iter.for_each(|item, iter| {
| ^^^^^^^^
|
= help: add #![feature(iterator_for_each)] to the crate attributes to enable
error[E0593]: closure takes 2 arguments but 1 argument is required
--> tests/basic.rs:10:10
|
10 | iter.for_each(|item, iter| {
| __________^^^^^^^^_-
| | |
| | expected closure that takes 1 argument
11 | | assert_eq!(item, i * 2);
12 | | i += 1;
13 | | let _ = iter.next();
14 | | });
| |___________________- takes 2 arguments
error: aborting due to 2 previous errors
error: Could not compile `foreach`.
warning: build failed, waiting for other jobs to finish...
error: build failed
cc @JaJe
It appears that a new unstable feature was implemented that conflicts with the for_each crate. rustc interprets the use of Iterator::for_each as attempting to use the unstable feature instead of the trait method defined by the for_each crate.
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.P-highHigh priorityHigh priorityT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.