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

Fix typo in #[coroutine] gating error #135320

Merged
merged 1 commit into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/rustc_feature/src/builtin_attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
// `#[coroutine]` attribute to be applied to closures to make them coroutines instead
gated!(
coroutine, Normal, template!(Word), ErrorFollowing,
EncodeCrossCrate::No, coroutines, experimental!(coroutines)
EncodeCrossCrate::No, coroutines, experimental!(coroutine)
),

// RFC 3543
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/coroutine/gen_block.e2024.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error[E0658]: the `#[coroutines]` attribute is an experimental feature
error[E0658]: the `#[coroutine]` attribute is an experimental feature
--> $DIR/gen_block.rs:20:13
|
LL | let _ = #[coroutine] || yield true;
Expand All @@ -8,7 +8,7 @@ LL | let _ = #[coroutine] || yield true;
= help: add `#![feature(coroutines)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: the `#[coroutines]` attribute is an experimental feature
error[E0658]: the `#[coroutine]` attribute is an experimental feature
--> $DIR/gen_block.rs:24:13
|
LL | let _ = #[coroutine] || {};
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/coroutine/gen_block.none.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ LL | let _ = #[coroutine] || yield true;
= help: add `#![feature(coroutines)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: the `#[coroutines]` attribute is an experimental feature
error[E0658]: the `#[coroutine]` attribute is an experimental feature
--> $DIR/gen_block.rs:20:13
|
LL | let _ = #[coroutine] || yield true;
Expand All @@ -54,7 +54,7 @@ LL | let _ = #[coroutine] || yield true;
= help: add `#![feature(coroutines)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: the `#[coroutines]` attribute is an experimental feature
error[E0658]: the `#[coroutine]` attribute is an experimental feature
--> $DIR/gen_block.rs:24:13
|
LL | let _ = #[coroutine] || {};
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/coroutine/gen_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ fn main() {
//~^^ ERROR `yield` can only be used in

let _ = #[coroutine] || yield true; //[none]~ ERROR yield syntax is experimental
//~^ ERROR `#[coroutines]` attribute is an experimental feature
//~^ ERROR `#[coroutine]` attribute is an experimental feature
//~^^ ERROR yield syntax is experimental

let _ = #[coroutine] || {};
//~^ ERROR `#[coroutines]` attribute is an experimental feature
//~^ ERROR `#[coroutine]` attribute is an experimental feature
}
Loading