Skip to content

Commit 0d855eb

Browse files
committed
Update and fix some more tests
1 parent eb7b6e0 commit 0d855eb

File tree

7 files changed

+16
-16
lines changed

7 files changed

+16
-16
lines changed

compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -907,8 +907,8 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
907907
.coroutine_kind(self.tcx.coroutine_for_closure(closure_def_id))
908908
.unwrap()
909909
{
910-
rustc_hir::CoroutineKind::Desugared(desugaring, _) => format!("{desugaring:#}"),
911-
coro => format!("{coro:#}"),
910+
rustc_hir::CoroutineKind::Desugared(desugaring, _) => format!("{desugaring}"),
911+
coro => format!("{coro}"),
912912
};
913913
let mut err = self.dcx().create_err(CoroClosureNotFn {
914914
span: self.tcx.def_span(closure_def_id),

library/core/src/iter/sources/generator.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
/// ```
1111
/// #![feature(iter_macro, coroutines)]
1212
///
13-
/// let it = std::iter::iter!{
13+
/// let it = std::iter::iter!{|| {
1414
/// yield 1;
1515
/// yield 2;
1616
/// yield 3;
17-
/// };
17+
/// } }();
1818
/// let v: Vec<_> = it.collect();
1919
/// assert_eq!(v, [1, 2, 3]);
2020
/// ```

tests/ui/coroutine/gen_block.none.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ LL | let _ = || yield true;
3131
| ^^^^^^^^^^
3232
|
3333
= note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
34-
= help: add `#![feature(coroutines)]` to the crate attributes to enable
34+
= help: add `#![feature(yield_expr)]` to the crate attributes to enable
3535
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
3636

3737
error[E0658]: yield syntax is experimental
@@ -41,7 +41,7 @@ LL | let _ = #[coroutine] || yield true;
4141
| ^^^^^^^^^^
4242
|
4343
= note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
44-
= help: add `#![feature(coroutines)]` to the crate attributes to enable
44+
= help: add `#![feature(yield_expr)]` to the crate attributes to enable
4545
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
4646

4747
error[E0658]: the `#[coroutine]` attribute is an experimental feature

tests/ui/feature-gates/feature-gate-coroutines.e2024.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | yield true;
55
| ^^^^^^^^^^
66
|
77
= note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
8-
= help: add `#![feature(coroutines)]` to the crate attributes to enable
8+
= help: add `#![feature(yield_expr)]` to the crate attributes to enable
99
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
1010

1111
error[E0658]: yield syntax is experimental
@@ -15,7 +15,7 @@ LL | let _ = || yield true;
1515
| ^^^^^^^^^^
1616
|
1717
= note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
18-
= help: add `#![feature(coroutines)]` to the crate attributes to enable
18+
= help: add `#![feature(yield_expr)]` to the crate attributes to enable
1919
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
2020

2121
error[E0658]: yield syntax is experimental
@@ -25,7 +25,7 @@ LL | yield;
2525
| ^^^^^
2626
|
2727
= note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
28-
= help: add `#![feature(coroutines)]` to the crate attributes to enable
28+
= help: add `#![feature(yield_expr)]` to the crate attributes to enable
2929
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
3030

3131
error[E0658]: yield syntax is experimental
@@ -35,7 +35,7 @@ LL | yield 0;
3535
| ^^^^^^^
3636
|
3737
= note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
38-
= help: add `#![feature(coroutines)]` to the crate attributes to enable
38+
= help: add `#![feature(yield_expr)]` to the crate attributes to enable
3939
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
4040

4141
error[E0658]: yield syntax is experimental

tests/ui/feature-gates/feature-gate-coroutines.none.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | yield true;
55
| ^^^^^^^^^^
66
|
77
= note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
8-
= help: add `#![feature(coroutines)]` to the crate attributes to enable
8+
= help: add `#![feature(yield_expr)]` to the crate attributes to enable
99
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
1010

1111
error[E0658]: yield syntax is experimental
@@ -15,7 +15,7 @@ LL | let _ = || yield true;
1515
| ^^^^^^^^^^
1616
|
1717
= note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
18-
= help: add `#![feature(coroutines)]` to the crate attributes to enable
18+
= help: add `#![feature(yield_expr)]` to the crate attributes to enable
1919
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
2020

2121
error[E0658]: yield syntax is experimental
@@ -25,7 +25,7 @@ LL | yield;
2525
| ^^^^^
2626
|
2727
= note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
28-
= help: add `#![feature(coroutines)]` to the crate attributes to enable
28+
= help: add `#![feature(yield_expr)]` to the crate attributes to enable
2929
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
3030

3131
error[E0658]: yield syntax is experimental
@@ -35,7 +35,7 @@ LL | yield 0;
3535
| ^^^^^^^
3636
|
3737
= note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
38-
= help: add `#![feature(coroutines)]` to the crate attributes to enable
38+
= help: add `#![feature(yield_expr)]` to the crate attributes to enable
3939
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
4040

4141
error[E0658]: yield syntax is experimental

tests/ui/feature-gates/feature-gate-yield-expr.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | yield ();
55
| ^^^^^^^^
66
|
77
= note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
8-
= help: add `#![feature(coroutines)]` to the crate attributes to enable
8+
= help: add `#![feature(yield_expr)]` to the crate attributes to enable
99
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
1010

1111
error[E0658]: yield syntax is experimental

tests/ui/iterators/generator_returned_from_fn.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ LL | | }
1010
LL | | } }
1111
| |_____^ returns a reference to data owned by the current function
1212

13-
error: `gen` closure does not implement `Fn` because it captures state from its environment
13+
error: gen closure does not implement `Fn` because it captures state from its environment
1414
--> $DIR/generator_returned_from_fn.rs:33:13
1515
|
1616
LL | iter! { move || {

0 commit comments

Comments
 (0)