Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
0b269f3
add kernel target for RustyHermit
stlankes Jan 8, 2022
10ae04a
add missing description of the target aarch64-unknown-none-hermitkernel
stlankes Feb 6, 2022
9225df3
remove typos
stlankes Feb 7, 2022
1acf739
add missing link
stlankes Feb 7, 2022
c7f65ae
remove typo
stlankes Feb 7, 2022
beb042a
add missing targert for library operating system RustyHermit
stlankes Feb 7, 2022
b5c1dc0
rename file to use the correct naming convention
stlankes Feb 7, 2022
df70adf
add missing space
stlankes Feb 8, 2022
6aad08f
Unify headings indent and remove useless anchor
GuillaumeGomez Feb 9, 2022
e8d5ae4
Update rustdoc tests for headings indent
GuillaumeGomez Feb 9, 2022
49d4823
Stabilize cfg_target_has_atomic
Amanieu Feb 9, 2022
fa400ac
rustdoc: Create enum for sections holding items
camelid Jan 8, 2022
1115f69
Deduplicate item sections
camelid Jan 8, 2022
163a800
Refactor sidebar printing code
camelid Jan 8, 2022
504f3f0
Title-case trait aliases section for consistency
camelid Jan 7, 2022
69cd826
Add llvm.build-config option
tmandry Feb 8, 2022
bdc9508
kmc-solid: Fix wait queue manipulation errors in the `Condvar` implem…
kawadakk Feb 9, 2022
1d180ca
kmc-solid: Wait queue should be sorted in the descending order of tas…
kawadakk Feb 10, 2022
76c562f
fix min_const_generics oversight
lcnr Feb 9, 2022
03332b0
Rollup merge of #92670 - hermitcore:kernel, r=davidtwco
matthiaskrgr Feb 10, 2022
584948d
Rollup merge of #93756 - tmandry:llvm-build-config, r=Mark-Simulacrum
matthiaskrgr Feb 10, 2022
f3f41d7
Rollup merge of #93802 - lcnr:mcg-woops, r=BoxyUwU
matthiaskrgr Feb 10, 2022
2997ea3
Rollup merge of #93808 - GuillaumeGomez:headings-indent, r=jsha
matthiaskrgr Feb 10, 2022
aa20959
Rollup merge of #93824 - Amanieu:stable_cfg_target_has_atomic, r=davi…
matthiaskrgr Feb 10, 2022
4256165
Rollup merge of #93830 - camelid:cleanup-section-code, r=GuillaumeGomez
matthiaskrgr Feb 10, 2022
8c60f44
Rollup merge of #93843 - solid-rs:fix-kmc-solid-condvar, r=m-ou-se
matthiaskrgr Feb 10, 2022
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
Prev Previous commit
Next Next commit
Stabilize cfg_target_has_atomic
Closes #32976
  • Loading branch information
Amanieu committed Feb 9, 2022
commit 49d48231126c3e83614f399bea653f45c2d8daf9
2 changes: 2 additions & 0 deletions compiler/rustc_feature/src/accepted.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ declare_features! (
(accepted, cfg_doctest, "1.40.0", Some(62210), None),
/// Allows `cfg(target_feature = "...")`.
(accepted, cfg_target_feature, "1.27.0", Some(29717), None),
/// Allows `cfg(target_has_atomic = "...")`.
(accepted, cfg_target_has_atomic, "1.60.0", Some(32976), None),
/// Allows `cfg(target_vendor = "...")`.
(accepted, cfg_target_vendor, "1.33.0", Some(29718), None),
/// Allows implementing `Clone` for closures where possible (RFC 2132).
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_feature/src/active.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,8 @@ declare_features! (
(active, cfg_sanitize, "1.41.0", Some(39699), None),
/// Allows `cfg(target_abi = "...")`.
(active, cfg_target_abi, "1.55.0", Some(80970), None),
/// Allows `cfg(target_has_atomic = "...")`.
(active, cfg_target_has_atomic, "1.9.0", Some(32976), None),
/// Allows `cfg(target_has_atomic_equal_alignment = "...")`.
(active, cfg_target_has_atomic_equal_alignment, "1.60.0", Some(93822), None),
/// Allows `cfg(target_thread_local)`.
(active, cfg_target_thread_local, "1.7.0", Some(29594), None),
/// Allow conditional compilation depending on rust version
Expand Down
6 changes: 2 additions & 4 deletions compiler/rustc_feature/src/builtin_attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,10 @@ const GATED_CFGS: &[GatedCfg] = &[
// (name in cfg, feature, function to check if the feature is enabled)
(sym::target_abi, sym::cfg_target_abi, cfg_fn!(cfg_target_abi)),
(sym::target_thread_local, sym::cfg_target_thread_local, cfg_fn!(cfg_target_thread_local)),
(sym::target_has_atomic, sym::cfg_target_has_atomic, cfg_fn!(cfg_target_has_atomic)),
(sym::target_has_atomic_load_store, sym::cfg_target_has_atomic, cfg_fn!(cfg_target_has_atomic)),
(
sym::target_has_atomic_equal_alignment,
sym::cfg_target_has_atomic,
cfg_fn!(cfg_target_has_atomic),
sym::cfg_target_has_atomic_equal_alignment,
cfg_fn!(cfg_target_has_atomic_equal_alignment),
),
(sym::sanitize, sym::cfg_sanitize, cfg_fn!(cfg_sanitize)),
(sym::version, sym::cfg_version, cfg_fn!(cfg_version)),
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_span/src/symbol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ symbols! {
cfg_target_abi,
cfg_target_feature,
cfg_target_has_atomic,
cfg_target_has_atomic_equal_alignment,
cfg_target_thread_local,
cfg_target_vendor,
cfg_version,
Expand Down
2 changes: 1 addition & 1 deletion library/alloc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
#![feature(associated_type_bounds)]
#![feature(box_syntax)]
#![feature(cfg_sanitize)]
#![feature(cfg_target_has_atomic)]
#![cfg_attr(bootstrap, feature(cfg_target_has_atomic))]
#![feature(const_deref)]
#![feature(const_fn_trait_bound)]
#![feature(const_mut_refs)]
Expand Down
3 changes: 2 additions & 1 deletion library/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@
#![feature(allow_internal_unstable)]
#![feature(associated_type_bounds)]
#![feature(auto_traits)]
#![feature(cfg_target_has_atomic)]
#![cfg_attr(bootstrap, feature(cfg_target_has_atomic))]
#![cfg_attr(not(bootstrap), feature(cfg_target_has_atomic_equal_alignment))]
#![feature(const_fn_floating_point_arithmetic)]
#![feature(const_fn_fn_ptr_basics)]
#![feature(const_fn_trait_bound)]
Expand Down
2 changes: 1 addition & 1 deletion library/core/tests/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#![feature(box_syntax)]
#![feature(cell_update)]
#![feature(cfg_panic)]
#![feature(cfg_target_has_atomic)]
#![cfg_attr(bootstrap, feature(cfg_target_has_atomic))]
#![feature(const_assume)]
#![feature(const_black_box)]
#![feature(const_bool_to_option)]
Expand Down
2 changes: 1 addition & 1 deletion library/std/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@
#![feature(c_variadic)]
#![feature(cfg_accessible)]
#![feature(cfg_eval)]
#![feature(cfg_target_has_atomic)]
#![cfg_attr(bootstrap, feature(cfg_target_has_atomic))]
#![feature(cfg_target_thread_local)]
#![feature(char_error_internals)]
#![feature(char_internals)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(cfg_target_has_atomic, no_core, intrinsics, lang_items)]
#![feature(no_core, intrinsics, lang_items)]
#![crate_type="rlib"]
#![no_core]

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
fn main() {
cfg!(target_has_atomic_equal_alignment = "8");
//~^ ERROR `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
cfg!(target_has_atomic_equal_alignment = "16");
//~^ ERROR `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
cfg!(target_has_atomic_equal_alignment = "32");
//~^ ERROR `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
cfg!(target_has_atomic_equal_alignment = "64");
//~^ ERROR `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
cfg!(target_has_atomic_equal_alignment = "128");
//~^ ERROR `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
cfg!(target_has_atomic_equal_alignment = "ptr");
//~^ ERROR `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
error[E0658]: `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
--> $DIR/feature-gate-cfg-target-has-atomic-equal-alignment.rs:2:10
|
LL | cfg!(target_has_atomic_equal_alignment = "8");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #93822 <https://github.com/rust-lang/rust/issues/93822> for more information
= help: add `#![feature(cfg_target_has_atomic_equal_alignment)]` to the crate attributes to enable

error[E0658]: `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
--> $DIR/feature-gate-cfg-target-has-atomic-equal-alignment.rs:4:10
|
LL | cfg!(target_has_atomic_equal_alignment = "16");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #93822 <https://github.com/rust-lang/rust/issues/93822> for more information
= help: add `#![feature(cfg_target_has_atomic_equal_alignment)]` to the crate attributes to enable

error[E0658]: `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
--> $DIR/feature-gate-cfg-target-has-atomic-equal-alignment.rs:6:10
|
LL | cfg!(target_has_atomic_equal_alignment = "32");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #93822 <https://github.com/rust-lang/rust/issues/93822> for more information
= help: add `#![feature(cfg_target_has_atomic_equal_alignment)]` to the crate attributes to enable

error[E0658]: `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
--> $DIR/feature-gate-cfg-target-has-atomic-equal-alignment.rs:8:10
|
LL | cfg!(target_has_atomic_equal_alignment = "64");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #93822 <https://github.com/rust-lang/rust/issues/93822> for more information
= help: add `#![feature(cfg_target_has_atomic_equal_alignment)]` to the crate attributes to enable

error[E0658]: `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
--> $DIR/feature-gate-cfg-target-has-atomic-equal-alignment.rs:10:10
|
LL | cfg!(target_has_atomic_equal_alignment = "128");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #93822 <https://github.com/rust-lang/rust/issues/93822> for more information
= help: add `#![feature(cfg_target_has_atomic_equal_alignment)]` to the crate attributes to enable

error[E0658]: `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
--> $DIR/feature-gate-cfg-target-has-atomic-equal-alignment.rs:12:10
|
LL | cfg!(target_has_atomic_equal_alignment = "ptr");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #93822 <https://github.com/rust-lang/rust/issues/93822> for more information
= help: add `#![feature(cfg_target_has_atomic_equal_alignment)]` to the crate attributes to enable

error: aborting due to 6 previous errors

For more information about this error, try `rustc --explain E0658`.
118 changes: 0 additions & 118 deletions src/test/ui/feature-gates/feature-gate-cfg-target-has-atomic.rs

This file was deleted.

Loading