Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename AsyncIterator back to Stream, introduce an AFIT-based AsyncIterator trait #119550

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from
Draft
Prev Previous commit
Next Next commit
update UI tests
yoshuawuyts committed Jan 3, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 325f695d0a033c4725eb12329e39dabf762158e2
Original file line number Diff line number Diff line change
@@ -37,6 +37,8 @@ LL | fn T() -> Option<Self::Item> {}
|
help: use fully-qualified syntax
|
LL | fn T() -> Option<<Windows<T> as IntoAsyncIterator>::Item> {}
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LL | fn T() -> Option<<Windows<T> as IntoIterator>::Item> {}
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LL | fn T() -> Option<<Windows<T> as IntoStream>::Item> {}
2 changes: 1 addition & 1 deletion tests/ui/async-await/for-await-consumes-iter.stderr
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ error[E0382]: use of moved value: `iter`
--> $DIR/for-await-consumes-iter.rs:14:20
|
LL | let iter = core::stream::from_iter(0..3);
| ---- move occurs because `iter` has type `FromIter<std::ops::Range<i32>>`, which does not implement the `Copy` trait
| ---- move occurs because `iter` has type `std::stream::FromIter<std::ops::Range<i32>>`, which does not implement the `Copy` trait
LL | let mut count = 0;
LL | for await i in iter {
| ---- `iter` moved due to this method call
2 changes: 2 additions & 0 deletions tests/ui/suggestions/suggest-trait-in-ufcs-in-hrtb.stderr
Original file line number Diff line number Diff line change
@@ -6,6 +6,8 @@ LL | impl<S> Foo for Bar<S> where for<'a> <&'a S>::Item: Foo {}
|
help: use fully-qualified syntax
|
LL | impl<S> Foo for Bar<S> where for<'a> <&'a S as IntoAsyncIterator>::Item: Foo {}
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LL | impl<S> Foo for Bar<S> where for<'a> <&'a S as IntoIterator>::Item: Foo {}
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LL | impl<S> Foo for Bar<S> where for<'a> <&'a S as IntoStream>::Item: Foo {}
2 changes: 2 additions & 0 deletions tests/ui/typeck/issue-110052.stderr
Original file line number Diff line number Diff line change
@@ -6,6 +6,8 @@ LL | for<'iter> dyn Validator<<&'iter I>::Item>:,
|
help: use fully-qualified syntax
|
LL | for<'iter> dyn Validator<<&'iter I as IntoAsyncIterator>::Item>:,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LL | for<'iter> dyn Validator<<&'iter I as IntoIterator>::Item>:,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LL | for<'iter> dyn Validator<<&'iter I as IntoStream>::Item>:,