Skip to content

Rollup of 9 pull requests #127650

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

Closed
wants to merge 41 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
a1ad634
Add fn allocator method to rc/sync::Weak. Relax Rc<T>/Arc<T>::allocat…
zachs18 May 10, 2024
5c46aca
document the cvt methods
the8472 Jun 22, 2024
6687a3f
use pidfd_spawn for faster process creation when pidfds are requested
the8472 Jun 22, 2024
0ce3619
document safety properties of the internal Process::new constructor
the8472 Jun 24, 2024
3e4e31b
more fine-grained feature-detection for pidfd spawning
the8472 Jun 24, 2024
ec0c755
Check that we get somewhat sane PIDs when spawning with pidfds
the8472 Jun 24, 2024
04eed9b
Initial implementation of annoymous_pipe
NobodyXu Jun 30, 2024
72bda33
Fix compilation errors
NobodyXu Jun 30, 2024
42e8beb
Implement validation in `TryFrom<OwnedFd> for PIpe*` on unix
NobodyXu Jun 30, 2024
e170c78
Move the mod `pipe` to `std::net`
NobodyXu Jun 30, 2024
473fbce
Fix typo
NobodyXu Jun 30, 2024
97626b6
Fix tidy errors
NobodyXu Jun 30, 2024
d60438f
Validate pipe in `TryFrom<OwnedHandle> for Pipe*`
NobodyXu Jun 30, 2024
b7af685
Refactor: Extract new method `FileDesc::get_access_mode`
NobodyXu Jun 30, 2024
4c6b6bb
Add testing for anonymous pipe
NobodyXu Jul 1, 2024
594abec
Refactor: Put mod `unix` & `windows` into separate files
NobodyXu Jul 2, 2024
d9f0980
Fix `anonymous_pipe` impl for not supported targets
NobodyXu Jul 2, 2024
6c755a3
Optimize: Add `#[inline]` to very simple function
NobodyXu Jul 2, 2024
53d3e62
Stabilize const_cstr_from_ptr (CStr::from_ptr, CStr::count_bytes)
dtolnay Jul 6, 2024
d15cee5
Refactor: Make `AcessMode` an enum`
NobodyXu Jul 9, 2024
0134bd2
remove unnecessary `git` usages
onur-ozkan Jul 10, 2024
e22dd1a
Update mod.rs
NobodyXu Jul 10, 2024
100fe5c
Move `std::net::pip*` to a new mod `std::pipe`
NobodyXu Jul 10, 2024
62b846e
Remove use of `macro_rules!`
NobodyXu Jul 10, 2024
4547b30
Replace `TryFrom<Owned*>` with `From`
NobodyXu Jul 10, 2024
f56b207
solve -> solve/mod
lcnr Jul 11, 2024
72f5999
Fix compilation on non-unix, non-windows targets
NobodyXu Jul 11, 2024
55256c5
Update dist-riscv64-linux to binutils 2.40
nikic Jul 10, 2024
ec05c4e
Add the feature gate and target-features
sayantn Jun 23, 2024
7f1518b
Add instability attribute on private const_strlen function
dtolnay Jul 12, 2024
3f4b9dd
Lower timeout of CI jobs to 4 hours
Kobzol Jul 12, 2024
15f770b
enable fuzzing of `SearchGraph`
lcnr Jul 11, 2024
0097800
Rollup merge of #124980 - zachs18:rc-allocator, r=Amanieu
matthiaskrgr Jul 12, 2024
c30bedf
Rollup merge of #126639 - sayantn:amx, r=Amanieu
matthiaskrgr Jul 12, 2024
627a13b
Rollup merge of #126827 - the8472:pidfd-spawn, r=workingjubilee
matthiaskrgr Jul 12, 2024
d9e13af
Rollup merge of #127153 - NobodyXu:pipe, r=jhpratt
matthiaskrgr Jul 12, 2024
f9ceb65
Rollup merge of #127433 - dtolnay:conststrlen, r=workingjubilee
matthiaskrgr Jul 12, 2024
d0e1f4c
Rollup merge of #127552 - onur-ozkan:unnecessary-git-usage, r=Kobzol
matthiaskrgr Jul 12, 2024
1ddb2d2
Rollup merge of #127613 - nikic:riscv-update, r=cuviper
matthiaskrgr Jul 12, 2024
e486eeb
Rollup merge of #127627 - lcnr:rustc_search_graph, r=compiler-errors
matthiaskrgr Jul 12, 2024
f5909c5
Rollup merge of #127648 - Kobzol:ci-lower-timeout, r=pietroalbini
matthiaskrgr Jul 12, 2024
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
Add the feature gate and target-features
sayantn authored and workingjubilee committed Jul 12, 2024
commit ec05c4ea3fd9b6f7978091f3098ac52116e47a20
1 change: 1 addition & 0 deletions compiler/rustc_codegen_ssa/src/target_features.rs
Original file line number Diff line number Diff line change
@@ -80,6 +80,7 @@ pub fn from_target_feature(
Some(sym::loongarch_target_feature) => rust_features.loongarch_target_feature,
Some(sym::lahfsahf_target_feature) => rust_features.lahfsahf_target_feature,
Some(sym::prfchw_target_feature) => rust_features.prfchw_target_feature,
Some(sym::x86_amx_intrinsics) => rust_features.x86_amx_intrinsics,
Some(name) => bug!("unknown target feature gate {}", name),
None => true,
};
2 changes: 2 additions & 0 deletions compiler/rustc_feature/src/unstable.rs
Original file line number Diff line number Diff line change
@@ -640,6 +640,8 @@ declare_features! (
(unstable, unsized_tuple_coercion, "1.20.0", Some(42877)),
/// Allows using the `#[used(linker)]` (or `#[used(compiler)]`) attribute.
(unstable, used_with_arg, "1.60.0", Some(93798)),
/// Allows use of x86 `AMX` target-feature attributes and intrinsics
(unstable, x86_amx_intrinsics, "CURRENT_RUSTC_VERSION", Some(126622)),
/// Allows `do yeet` expressions
(unstable, yeet_expr, "1.62.0", Some(96373)),
// !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!!
1 change: 1 addition & 0 deletions compiler/rustc_span/src/symbol.rs
Original file line number Diff line number Diff line change
@@ -2072,6 +2072,7 @@ symbols! {
write_str,
write_via_move,
writeln_macro,
x86_amx_intrinsics,
x87_reg,
xer,
xmm_reg,
5 changes: 5 additions & 0 deletions compiler/rustc_target/src/target_features.rs
Original file line number Diff line number Diff line change
@@ -192,6 +192,11 @@ const X86_ALLOWED_FEATURES: &[(&str, Stability)] = &[
// tidy-alphabetical-start
("adx", Stable),
("aes", Stable),
("amx-bf16", Unstable(sym::x86_amx_intrinsics)),
("amx-complex", Unstable(sym::x86_amx_intrinsics)),
("amx-fp16", Unstable(sym::x86_amx_intrinsics)),
("amx-int8", Unstable(sym::x86_amx_intrinsics)),
("amx-tile", Unstable(sym::x86_amx_intrinsics)),
("avx", Stable),
("avx2", Stable),
("avx512bf16", Unstable(sym::avx512_target_feature)),
2 changes: 1 addition & 1 deletion tests/ui/check-cfg/mix.stderr
Original file line number Diff line number Diff line change
@@ -251,7 +251,7 @@ warning: unexpected `cfg` condition value: `zebra`
LL | cfg!(target_feature = "zebra");
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: expected values for `target_feature` are: `10e60`, `2e3`, `3e3r1`, `3e3r2`, `3e3r3`, `3e7`, `7e10`, `a`, `aclass`, `adx`, `aes`, `altivec`, `alu32`, `atomics`, `avx`, `avx2`, `avx512bf16`, `avx512bitalg`, `avx512bw`, `avx512cd`, `avx512dq`, `avx512f`, `avx512fp16`, `avx512ifma`, `avx512vbmi`, `avx512vbmi2`, `avx512vl`, `avx512vnni`, `avx512vp2intersect`, `avx512vpopcntdq`, `avxifma`, `avxneconvert`, `avxvnni`, `avxvnniint16`, and `avxvnniint8` and 191 more
= note: expected values for `target_feature` are: `10e60`, `2e3`, `3e3r1`, `3e3r2`, `3e3r3`, `3e7`, `7e10`, `a`, `aclass`, `adx`, `aes`, `altivec`, `alu32`, `amx-bf16`, `amx-complex`, `amx-fp16`, `amx-int8`, `amx-tile`, `atomics`, `avx`, `avx2`, `avx512bf16`, `avx512bitalg`, `avx512bw`, `avx512cd`, `avx512dq`, `avx512f`, `avx512fp16`, `avx512ifma`, `avx512vbmi`, `avx512vbmi2`, `avx512vl`, `avx512vnni`, `avx512vp2intersect`, and `avx512vpopcntdq` and 196 more
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration

warning: 27 warnings emitted
2 changes: 1 addition & 1 deletion tests/ui/check-cfg/well-known-values.stderr
Original file line number Diff line number Diff line change
@@ -165,7 +165,7 @@ warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
LL | target_feature = "_UNEXPECTED_VALUE",
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: expected values for `target_feature` are: `10e60`, `2e3`, `3e3r1`, `3e3r2`, `3e3r3`, `3e7`, `7e10`, `a`, `aclass`, `adx`, `aes`, `altivec`, `alu32`, `atomics`, `avx`, `avx2`, `avx512bf16`, `avx512bitalg`, `avx512bw`, `avx512cd`, `avx512dq`, `avx512f`, `avx512fp16`, `avx512ifma`, `avx512vbmi`, `avx512vbmi2`, `avx512vl`, `avx512vnni`, `avx512vp2intersect`, `avx512vpopcntdq`, `avxifma`, `avxneconvert`, `avxvnni`, `avxvnniint16`, `avxvnniint8`, `bf16`, `bmi1`, `bmi2`, `bti`, `bulk-memory`, `c`, `cache`, `cmpxchg16b`, `crc`, `crt-static`, `d`, `d32`, `dit`, `doloop`, `dotprod`, `dpb`, `dpb2`, `dsp`, `dsp1e2`, `dspe60`, `e`, `e1`, `e2`, `edsp`, `elrw`, `ermsb`, `exception-handling`, `extended-const`, `f`, `f16c`, `f32mm`, `f64mm`, `fcma`, `fdivdu`, `fhm`, `flagm`, `float1e2`, `float1e3`, `float3e4`, `float7e60`, `floate1`, `fma`, `fp-armv8`, `fp16`, `fp64`, `fpuv2_df`, `fpuv2_sf`, `fpuv3_df`, `fpuv3_hf`, `fpuv3_hi`, `fpuv3_sf`, `frecipe`, `frintts`, `fxsr`, `gfni`, `hard-float`, `hard-float-abi`, `hard-tp`, `high-registers`, `hvx`, `hvx-length128b`, `hwdiv`, `i8mm`, `jsconv`, `lahfsahf`, `lasx`, `lbt`, `lor`, `lse`, `lsx`, `lvz`, `lzcnt`, `m`, `mclass`, `movbe`, `mp`, `mp1e2`, `msa`, `mte`, `multivalue`, `mutable-globals`, `neon`, `nontrapping-fptoint`, `nvic`, `paca`, `pacg`, `pan`, `pclmulqdq`, `pmuv3`, `popcnt`, `power10-vector`, `power8-altivec`, `power8-vector`, `power9-altivec`, `power9-vector`, `prfchw`, `rand`, `ras`, `rclass`, `rcpc`, `rcpc2`, `rdm`, `rdrand`, `rdseed`, `reference-types`, `relax`, `relaxed-simd`, `rtm`, `sb`, `sha`, `sha2`, `sha3`, `sign-ext`, `simd128`, `sm4`, `spe`, `ssbs`, `sse`, `sse2`, `sse3`, `sse4.1`, `sse4.2`, `sse4a`, `ssse3`, `sve`, `sve2`, `sve2-aes`, `sve2-bitperm`, `sve2-sha3`, `sve2-sm4`, `tbm`, `thumb-mode`, `thumb2`, `tme`, `trust`, `trustzone`, `ual`, `unaligned-scalar-mem`, `v`, `v5te`, `v6`, `v6k`, `v6t2`, `v7`, `v8`, `v8.1a`, `v8.2a`, `v8.3a`, `v8.4a`, `v8.5a`, `v8.6a`, `v8.7a`, `vaes`, `vdsp2e60f`, `vdspv1`, `vdspv2`, `vfp2`, `vfp3`, `vfp4`, `vh`, `virt`, `virtualization`, `vpclmulqdq`, `vsx`, `xsave`, `xsavec`, `xsaveopt`, `xsaves`, `zba`, `zbb`, `zbc`, `zbkb`, `zbkc`, `zbkx`, `zbs`, `zdinx`, `zfh`, `zfhmin`, `zfinx`, `zhinx`, `zhinxmin`, `zk`, `zkn`, `zknd`, `zkne`, `zknh`, `zkr`, `zks`, `zksed`, `zksh`, and `zkt`
= note: expected values for `target_feature` are: `10e60`, `2e3`, `3e3r1`, `3e3r2`, `3e3r3`, `3e7`, `7e10`, `a`, `aclass`, `adx`, `aes`, `altivec`, `alu32`, `amx-bf16`, `amx-complex`, `amx-fp16`, `amx-int8`, `amx-tile`, `atomics`, `avx`, `avx2`, `avx512bf16`, `avx512bitalg`, `avx512bw`, `avx512cd`, `avx512dq`, `avx512f`, `avx512fp16`, `avx512ifma`, `avx512vbmi`, `avx512vbmi2`, `avx512vl`, `avx512vnni`, `avx512vp2intersect`, `avx512vpopcntdq`, `avxifma`, `avxneconvert`, `avxvnni`, `avxvnniint16`, `avxvnniint8`, `bf16`, `bmi1`, `bmi2`, `bti`, `bulk-memory`, `c`, `cache`, `cmpxchg16b`, `crc`, `crt-static`, `d`, `d32`, `dit`, `doloop`, `dotprod`, `dpb`, `dpb2`, `dsp`, `dsp1e2`, `dspe60`, `e`, `e1`, `e2`, `edsp`, `elrw`, `ermsb`, `exception-handling`, `extended-const`, `f`, `f16c`, `f32mm`, `f64mm`, `fcma`, `fdivdu`, `fhm`, `flagm`, `float1e2`, `float1e3`, `float3e4`, `float7e60`, `floate1`, `fma`, `fp-armv8`, `fp16`, `fp64`, `fpuv2_df`, `fpuv2_sf`, `fpuv3_df`, `fpuv3_hf`, `fpuv3_hi`, `fpuv3_sf`, `frecipe`, `frintts`, `fxsr`, `gfni`, `hard-float`, `hard-float-abi`, `hard-tp`, `high-registers`, `hvx`, `hvx-length128b`, `hwdiv`, `i8mm`, `jsconv`, `lahfsahf`, `lasx`, `lbt`, `lor`, `lse`, `lsx`, `lvz`, `lzcnt`, `m`, `mclass`, `movbe`, `mp`, `mp1e2`, `msa`, `mte`, `multivalue`, `mutable-globals`, `neon`, `nontrapping-fptoint`, `nvic`, `paca`, `pacg`, `pan`, `pclmulqdq`, `pmuv3`, `popcnt`, `power10-vector`, `power8-altivec`, `power8-vector`, `power9-altivec`, `power9-vector`, `prfchw`, `rand`, `ras`, `rclass`, `rcpc`, `rcpc2`, `rdm`, `rdrand`, `rdseed`, `reference-types`, `relax`, `relaxed-simd`, `rtm`, `sb`, `sha`, `sha2`, `sha3`, `sign-ext`, `simd128`, `sm4`, `spe`, `ssbs`, `sse`, `sse2`, `sse3`, `sse4.1`, `sse4.2`, `sse4a`, `ssse3`, `sve`, `sve2`, `sve2-aes`, `sve2-bitperm`, `sve2-sha3`, `sve2-sm4`, `tbm`, `thumb-mode`, `thumb2`, `tme`, `trust`, `trustzone`, `ual`, `unaligned-scalar-mem`, `v`, `v5te`, `v6`, `v6k`, `v6t2`, `v7`, `v8`, `v8.1a`, `v8.2a`, `v8.3a`, `v8.4a`, `v8.5a`, `v8.6a`, `v8.7a`, `vaes`, `vdsp2e60f`, `vdspv1`, `vdspv2`, `vfp2`, `vfp3`, `vfp4`, `vh`, `virt`, `virtualization`, `vpclmulqdq`, `vsx`, `xsave`, `xsavec`, `xsaveopt`, `xsaves`, `zba`, `zbb`, `zbc`, `zbkb`, `zbkc`, `zbkx`, `zbs`, `zdinx`, `zfh`, `zfhmin`, `zfinx`, `zhinx`, `zhinxmin`, `zk`, `zkn`, `zknd`, `zkne`, `zknh`, `zkr`, `zks`, `zksed`, `zksh`, and `zkt`
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
6 changes: 6 additions & 0 deletions tests/ui/feature-gates/feature-gate-x86_amx_intrinsics.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
//@ only-x86_64
#[target_feature(enable = "amx-tile")]
//~^ ERROR: currently unstable
unsafe fn foo() {}

fn main() {}
13 changes: 13 additions & 0 deletions tests/ui/feature-gates/feature-gate-x86_amx_intrinsics.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
error[E0658]: the target feature `amx-tile` is currently unstable
--> $DIR/feature-gate-x86_amx_intrinsics.rs:2:18
|
LL | #[target_feature(enable = "amx-tile")]
| ^^^^^^^^^^^^^^^^^^^
|
= note: see issue #126622 <https://github.com/rust-lang/rust/issues/126622> for more information
= help: add `#![feature(x86_amx_intrinsics)]` 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: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0658`.