-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #94040 - Mark-Simulacrum:destabilize-load-store, r=Amanieu
Destabilize cfg(target_has_atomic_load_store = ...) This was not intended to be stabilized yet. This keeps the cfg_target_has_atomic feature gate name since compiler-builtins otherwise depends on it and I'd rather not try to manage a bump across a crates.io published repository given the time-sensitivity here (we need to land this quickly to avoid a beta backport). Closes #32976 r? `@Amanieu`
- Loading branch information
Showing
7 changed files
with
76 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/test/ui/feature-gates/feature-gate-cfg-target-has-atomic.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
fn main() { | ||
cfg!(target_has_atomic_load_store = "8"); | ||
//~^ ERROR `cfg(target_has_atomic_load_store)` is experimental and subject to change | ||
cfg!(target_has_atomic_load_store = "16"); | ||
//~^ ERROR `cfg(target_has_atomic_load_store)` is experimental and subject to change | ||
cfg!(target_has_atomic_load_store = "32"); | ||
//~^ ERROR `cfg(target_has_atomic_load_store)` is experimental and subject to change | ||
cfg!(target_has_atomic_load_store = "64"); | ||
//~^ ERROR `cfg(target_has_atomic_load_store)` is experimental and subject to change | ||
cfg!(target_has_atomic_load_store = "128"); | ||
//~^ ERROR `cfg(target_has_atomic_load_store)` is experimental and subject to change | ||
cfg!(target_has_atomic_load_store = "ptr"); | ||
//~^ ERROR `cfg(target_has_atomic_load_store)` is experimental and subject to change | ||
} |
57 changes: 57 additions & 0 deletions
57
src/test/ui/feature-gates/feature-gate-cfg-target-has-atomic.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
error[E0658]: `cfg(target_has_atomic_load_store)` is experimental and subject to change | ||
--> $DIR/feature-gate-cfg-target-has-atomic.rs:2:10 | ||
| | ||
LL | cfg!(target_has_atomic_load_store = "8"); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: see issue #94039 <https://github.com/rust-lang/rust/issues/94039> for more information | ||
= help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable | ||
|
||
error[E0658]: `cfg(target_has_atomic_load_store)` is experimental and subject to change | ||
--> $DIR/feature-gate-cfg-target-has-atomic.rs:4:10 | ||
| | ||
LL | cfg!(target_has_atomic_load_store = "16"); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: see issue #94039 <https://github.com/rust-lang/rust/issues/94039> for more information | ||
= help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable | ||
|
||
error[E0658]: `cfg(target_has_atomic_load_store)` is experimental and subject to change | ||
--> $DIR/feature-gate-cfg-target-has-atomic.rs:6:10 | ||
| | ||
LL | cfg!(target_has_atomic_load_store = "32"); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: see issue #94039 <https://github.com/rust-lang/rust/issues/94039> for more information | ||
= help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable | ||
|
||
error[E0658]: `cfg(target_has_atomic_load_store)` is experimental and subject to change | ||
--> $DIR/feature-gate-cfg-target-has-atomic.rs:8:10 | ||
| | ||
LL | cfg!(target_has_atomic_load_store = "64"); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: see issue #94039 <https://github.com/rust-lang/rust/issues/94039> for more information | ||
= help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable | ||
|
||
error[E0658]: `cfg(target_has_atomic_load_store)` is experimental and subject to change | ||
--> $DIR/feature-gate-cfg-target-has-atomic.rs:10:10 | ||
| | ||
LL | cfg!(target_has_atomic_load_store = "128"); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: see issue #94039 <https://github.com/rust-lang/rust/issues/94039> for more information | ||
= help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable | ||
|
||
error[E0658]: `cfg(target_has_atomic_load_store)` is experimental and subject to change | ||
--> $DIR/feature-gate-cfg-target-has-atomic.rs:12:10 | ||
| | ||
LL | cfg!(target_has_atomic_load_store = "ptr"); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: see issue #94039 <https://github.com/rust-lang/rust/issues/94039> for more information | ||
= help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable | ||
|
||
error: aborting due to 6 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0658`. |