Skip to content

Commit 8147e6e

Browse files
committed
Auto merge of #103069 - matthiaskrgr:rollup-xxsx6sk, r=matthiaskrgr
Rollup of 9 pull requests Successful merges: - #102092 (refactor: use grep -E/-F instead of fgrep/egrep) - #102781 (Improved documentation for `std::io::Error`) - #103017 (Avoid dropping TLS Key on sgx) - #103039 (checktools: fix comments) - #103045 (Remove leading newlines from integer primitive doc examples) - #103047 (Update browser-ui-test version to fix some flaky tests) - #103054 (Clean up rust-logo rustdoc GUI test) - #103059 (Fix `Duration::{try_,}from_secs_f{32,64}(-0.0)`) - #103067 (More alphabetical sorting) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents bf15a9e + a96f1a8 commit 8147e6e

File tree

16 files changed

+221
-229
lines changed

16 files changed

+221
-229
lines changed

compiler/rustc_codegen_ssa/src/target_features.rs

+112-96
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,25 @@ pub const RUSTC_SPECIFIC_FEATURES: &[&str] = &["crt-static"];
1313
// if it doesn't, to_llvm_feature in llvm_util in rustc_codegen_llvm needs to be adapted
1414

1515
const ARM_ALLOWED_FEATURES: &[(&str, Option<Symbol>)] = &[
16+
// tidy-alphabetical-start
1617
("aclass", Some(sym::arm_target_feature)),
17-
("mclass", Some(sym::arm_target_feature)),
18-
("rclass", Some(sym::arm_target_feature)),
19-
("dsp", Some(sym::arm_target_feature)),
20-
("neon", Some(sym::arm_target_feature)),
18+
("aes", Some(sym::arm_target_feature)),
2119
("crc", Some(sym::arm_target_feature)),
2220
("crypto", Some(sym::arm_target_feature)),
23-
("aes", Some(sym::arm_target_feature)),
24-
("sha2", Some(sym::arm_target_feature)),
25-
("i8mm", Some(sym::arm_target_feature)),
21+
("d32", Some(sym::arm_target_feature)),
2622
("dotprod", Some(sym::arm_target_feature)),
23+
("dsp", Some(sym::arm_target_feature)),
24+
("fp-armv8", Some(sym::arm_target_feature)),
25+
("i8mm", Some(sym::arm_target_feature)),
26+
("mclass", Some(sym::arm_target_feature)),
27+
("neon", Some(sym::arm_target_feature)),
28+
("rclass", Some(sym::arm_target_feature)),
29+
("sha2", Some(sym::arm_target_feature)),
30+
// This is needed for inline assembly, but shouldn't be stabilized as-is
31+
// since it should be enabled per-function using #[instruction_set], not
32+
// #[target_feature].
33+
("thumb-mode", Some(sym::arm_target_feature)),
34+
("thumb2", Some(sym::arm_target_feature)),
2735
("v5te", Some(sym::arm_target_feature)),
2836
("v6", Some(sym::arm_target_feature)),
2937
("v6k", Some(sym::arm_target_feature)),
@@ -33,118 +41,115 @@ const ARM_ALLOWED_FEATURES: &[(&str, Option<Symbol>)] = &[
3341
("vfp2", Some(sym::arm_target_feature)),
3442
("vfp3", Some(sym::arm_target_feature)),
3543
("vfp4", Some(sym::arm_target_feature)),
36-
("fp-armv8", Some(sym::arm_target_feature)),
37-
// This is needed for inline assembly, but shouldn't be stabilized as-is
38-
// since it should be enabled per-function using #[instruction_set], not
39-
// #[target_feature].
40-
("thumb-mode", Some(sym::arm_target_feature)),
41-
("thumb2", Some(sym::arm_target_feature)),
42-
("d32", Some(sym::arm_target_feature)),
44+
// tidy-alphabetical-end
4345
];
4446

4547
const AARCH64_ALLOWED_FEATURES: &[(&str, Option<Symbol>)] = &[
46-
// FEAT_AdvSimd & FEAT_FP
47-
("neon", None),
48-
// FEAT_FP16
49-
("fp16", None),
50-
// FEAT_SVE
51-
("sve", None),
48+
// tidy-alphabetical-start
49+
// FEAT_AES
50+
("aes", None),
51+
// FEAT_BF16
52+
("bf16", None),
53+
// FEAT_BTI
54+
("bti", None),
5255
// FEAT_CRC
5356
("crc", None),
54-
// FEAT_RAS
55-
("ras", None),
56-
// FEAT_LSE
57-
("lse", None),
58-
// FEAT_RDM
59-
("rdm", None),
60-
// FEAT_RCPC
61-
("rcpc", None),
62-
// FEAT_RCPC2
63-
("rcpc2", None),
64-
// FEAT_DotProd
65-
("dotprod", None),
66-
// FEAT_TME
67-
("tme", None),
68-
// FEAT_FHM
69-
("fhm", None),
7057
// FEAT_DIT
7158
("dit", None),
72-
// FEAT_FLAGM
73-
("flagm", None),
74-
// FEAT_SSBS
75-
("ssbs", None),
76-
// FEAT_SB
77-
("sb", None),
78-
// FEAT_PAUTH (address authentication)
79-
("paca", None),
80-
// FEAT_PAUTH (generic authentication)
81-
("pacg", None),
59+
// FEAT_DotProd
60+
("dotprod", None),
8261
// FEAT_DPB
8362
("dpb", None),
8463
// FEAT_DPB2
8564
("dpb2", None),
86-
// FEAT_SVE2
87-
("sve2", None),
88-
// FEAT_SVE2_AES
89-
("sve2-aes", None),
90-
// FEAT_SVE2_SM4
91-
("sve2-sm4", None),
92-
// FEAT_SVE2_SHA3
93-
("sve2-sha3", None),
94-
// FEAT_SVE2_BitPerm
95-
("sve2-bitperm", None),
96-
// FEAT_FRINTTS
97-
("frintts", None),
98-
// FEAT_I8MM
99-
("i8mm", None),
10065
// FEAT_F32MM
10166
("f32mm", None),
10267
// FEAT_F64MM
10368
("f64mm", None),
104-
// FEAT_BF16
105-
("bf16", None),
106-
// FEAT_RAND
107-
("rand", None),
108-
// FEAT_BTI
109-
("bti", None),
110-
// FEAT_MTE
111-
("mte", None),
112-
// FEAT_JSCVT
113-
("jsconv", None),
11469
// FEAT_FCMA
11570
("fcma", None),
116-
// FEAT_AES
117-
("aes", None),
71+
// FEAT_FHM
72+
("fhm", None),
73+
// FEAT_FLAGM
74+
("flagm", None),
75+
// FEAT_FP16
76+
("fp16", None),
77+
// FEAT_FRINTTS
78+
("frintts", None),
79+
// FEAT_I8MM
80+
("i8mm", None),
81+
// FEAT_JSCVT
82+
("jsconv", None),
83+
// FEAT_LOR
84+
("lor", None),
85+
// FEAT_LSE
86+
("lse", None),
87+
// FEAT_MTE
88+
("mte", None),
89+
// FEAT_AdvSimd & FEAT_FP
90+
("neon", None),
91+
// FEAT_PAUTH (address authentication)
92+
("paca", None),
93+
// FEAT_PAUTH (generic authentication)
94+
("pacg", None),
95+
// FEAT_PAN
96+
("pan", None),
97+
// FEAT_PMUv3
98+
("pmuv3", None),
99+
// FEAT_RAND
100+
("rand", None),
101+
// FEAT_RAS
102+
("ras", None),
103+
// FEAT_RCPC
104+
("rcpc", None),
105+
// FEAT_RCPC2
106+
("rcpc2", None),
107+
// FEAT_RDM
108+
("rdm", None),
109+
// FEAT_SB
110+
("sb", None),
118111
// FEAT_SHA1 & FEAT_SHA256
119112
("sha2", None),
120113
// FEAT_SHA512 & FEAT_SHA3
121114
("sha3", None),
122115
// FEAT_SM3 & FEAT_SM4
123116
("sm4", None),
124-
// FEAT_PAN
125-
("pan", None),
126-
// FEAT_LOR
127-
("lor", None),
128-
// FEAT_VHE
129-
("vh", None),
130-
// FEAT_PMUv3
131-
("pmuv3", None),
132117
// FEAT_SPE
133118
("spe", None),
119+
// FEAT_SSBS
120+
("ssbs", None),
121+
// FEAT_SVE
122+
("sve", None),
123+
// FEAT_SVE2
124+
("sve2", None),
125+
// FEAT_SVE2_AES
126+
("sve2-aes", None),
127+
// FEAT_SVE2_BitPerm
128+
("sve2-bitperm", None),
129+
// FEAT_SVE2_SHA3
130+
("sve2-sha3", None),
131+
// FEAT_SVE2_SM4
132+
("sve2-sm4", None),
133+
// FEAT_TME
134+
("tme", None),
134135
("v8.1a", Some(sym::aarch64_ver_target_feature)),
135136
("v8.2a", Some(sym::aarch64_ver_target_feature)),
136137
("v8.3a", Some(sym::aarch64_ver_target_feature)),
137138
("v8.4a", Some(sym::aarch64_ver_target_feature)),
138139
("v8.5a", Some(sym::aarch64_ver_target_feature)),
139140
("v8.6a", Some(sym::aarch64_ver_target_feature)),
140141
("v8.7a", Some(sym::aarch64_ver_target_feature)),
142+
// FEAT_VHE
143+
("vh", None),
144+
// tidy-alphabetical-end
141145
];
142146

143147
const AARCH64_TIED_FEATURES: &[&[&str]] = &[
144148
&["paca", "pacg"], // Together these represent `pauth` in LLVM
145149
];
146150

147151
const X86_ALLOWED_FEATURES: &[(&str, Option<Symbol>)] = &[
152+
// tidy-alphabetical-start
148153
("adx", None),
149154
("aes", None),
150155
("avx", None),
@@ -194,69 +199,80 @@ const X86_ALLOWED_FEATURES: &[(&str, Option<Symbol>)] = &[
194199
("xsavec", None),
195200
("xsaveopt", None),
196201
("xsaves", None),
202+
// tidy-alphabetical-end
197203
];
198204

199205
const HEXAGON_ALLOWED_FEATURES: &[(&str, Option<Symbol>)] = &[
206+
// tidy-alphabetical-start
200207
("hvx", Some(sym::hexagon_target_feature)),
201208
("hvx-length128b", Some(sym::hexagon_target_feature)),
209+
// tidy-alphabetical-end
202210
];
203211

204212
const POWERPC_ALLOWED_FEATURES: &[(&str, Option<Symbol>)] = &[
213+
// tidy-alphabetical-start
205214
("altivec", Some(sym::powerpc_target_feature)),
206215
("power8-altivec", Some(sym::powerpc_target_feature)),
207-
("power9-altivec", Some(sym::powerpc_target_feature)),
208216
("power8-vector", Some(sym::powerpc_target_feature)),
217+
("power9-altivec", Some(sym::powerpc_target_feature)),
209218
("power9-vector", Some(sym::powerpc_target_feature)),
210219
("vsx", Some(sym::powerpc_target_feature)),
220+
// tidy-alphabetical-end
211221
];
212222

213223
const MIPS_ALLOWED_FEATURES: &[(&str, Option<Symbol>)] = &[
224+
// tidy-alphabetical-start
214225
("fp64", Some(sym::mips_target_feature)),
215226
("msa", Some(sym::mips_target_feature)),
216227
("virt", Some(sym::mips_target_feature)),
228+
// tidy-alphabetical-end
217229
];
218230

219231
const RISCV_ALLOWED_FEATURES: &[(&str, Option<Symbol>)] = &[
220-
("m", Some(sym::riscv_target_feature)),
232+
// tidy-alphabetical-start
221233
("a", Some(sym::riscv_target_feature)),
222234
("c", Some(sym::riscv_target_feature)),
223-
("f", Some(sym::riscv_target_feature)),
224235
("d", Some(sym::riscv_target_feature)),
225236
("e", Some(sym::riscv_target_feature)),
237+
("f", Some(sym::riscv_target_feature)),
238+
("m", Some(sym::riscv_target_feature)),
226239
("v", Some(sym::riscv_target_feature)),
227-
("zfinx", Some(sym::riscv_target_feature)),
228-
("zdinx", Some(sym::riscv_target_feature)),
229-
("zhinx", Some(sym::riscv_target_feature)),
230-
("zhinxmin", Some(sym::riscv_target_feature)),
231-
("zfh", Some(sym::riscv_target_feature)),
232-
("zfhmin", Some(sym::riscv_target_feature)),
233240
("zba", Some(sym::riscv_target_feature)),
234241
("zbb", Some(sym::riscv_target_feature)),
235242
("zbc", Some(sym::riscv_target_feature)),
236-
("zbs", Some(sym::riscv_target_feature)),
237243
("zbkb", Some(sym::riscv_target_feature)),
238244
("zbkc", Some(sym::riscv_target_feature)),
239245
("zbkx", Some(sym::riscv_target_feature)),
246+
("zbs", Some(sym::riscv_target_feature)),
247+
("zdinx", Some(sym::riscv_target_feature)),
248+
("zfh", Some(sym::riscv_target_feature)),
249+
("zfhmin", Some(sym::riscv_target_feature)),
250+
("zfinx", Some(sym::riscv_target_feature)),
251+
("zhinx", Some(sym::riscv_target_feature)),
252+
("zhinxmin", Some(sym::riscv_target_feature)),
253+
("zk", Some(sym::riscv_target_feature)),
254+
("zkn", Some(sym::riscv_target_feature)),
240255
("zknd", Some(sym::riscv_target_feature)),
241256
("zkne", Some(sym::riscv_target_feature)),
242257
("zknh", Some(sym::riscv_target_feature)),
243-
("zksed", Some(sym::riscv_target_feature)),
244-
("zksh", Some(sym::riscv_target_feature)),
245258
("zkr", Some(sym::riscv_target_feature)),
246-
("zkn", Some(sym::riscv_target_feature)),
247259
("zks", Some(sym::riscv_target_feature)),
248-
("zk", Some(sym::riscv_target_feature)),
260+
("zksed", Some(sym::riscv_target_feature)),
261+
("zksh", Some(sym::riscv_target_feature)),
249262
("zkt", Some(sym::riscv_target_feature)),
263+
// tidy-alphabetical-end
250264
];
251265

252266
const WASM_ALLOWED_FEATURES: &[(&str, Option<Symbol>)] = &[
253-
("simd128", None),
267+
// tidy-alphabetical-start
254268
("atomics", Some(sym::wasm_target_feature)),
255-
("nontrapping-fptoint", Some(sym::wasm_target_feature)),
256269
("bulk-memory", Some(sym::wasm_target_feature)),
257270
("mutable-globals", Some(sym::wasm_target_feature)),
271+
("nontrapping-fptoint", Some(sym::wasm_target_feature)),
258272
("reference-types", Some(sym::wasm_target_feature)),
259273
("sign-ext", Some(sym::wasm_target_feature)),
274+
("simd128", None),
275+
// tidy-alphabetical-end
260276
];
261277

262278
const BPF_ALLOWED_FEATURES: &[(&str, Option<Symbol>)] = &[("alu32", Some(sym::bpf_target_feature))];

library/core/src/num/int_macros.rs

-9
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,6 @@ macro_rules! int_impl {
652652
/// Basic usage:
653653
///
654654
/// ```
655-
///
656655
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".checked_rem(2), Some(1));")]
657656
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".checked_rem(0), None);")]
658657
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MIN.checked_rem(-1), None);")]
@@ -704,7 +703,6 @@ macro_rules! int_impl {
704703
/// Basic usage:
705704
///
706705
/// ```
707-
///
708706
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".checked_neg(), Some(-5));")]
709707
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MIN.checked_neg(), None);")]
710708
/// ```
@@ -820,7 +818,6 @@ macro_rules! int_impl {
820818
/// Basic usage:
821819
///
822820
/// ```
823-
///
824821
#[doc = concat!("assert_eq!((-5", stringify!($SelfT), ").checked_abs(), Some(5));")]
825822
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MIN.checked_abs(), None);")]
826823
/// ```
@@ -1026,7 +1023,6 @@ macro_rules! int_impl {
10261023
/// Basic usage:
10271024
///
10281025
/// ```
1029-
///
10301026
#[doc = concat!("assert_eq!(10", stringify!($SelfT), ".saturating_mul(12), 120);")]
10311027
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MAX.saturating_mul(10), ", stringify!($SelfT), "::MAX);")]
10321028
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MIN.saturating_mul(10), ", stringify!($SelfT), "::MIN);")]
@@ -1085,7 +1081,6 @@ macro_rules! int_impl {
10851081
/// Basic usage:
10861082
///
10871083
/// ```
1088-
///
10891084
#[doc = concat!("assert_eq!((-4", stringify!($SelfT), ").saturating_pow(3), -64);")]
10901085
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MIN.saturating_pow(2), ", stringify!($SelfT), "::MAX);")]
10911086
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MIN.saturating_pow(3), ", stringify!($SelfT), "::MIN);")]
@@ -1498,7 +1493,6 @@ macro_rules! int_impl {
14981493
/// Basic usage:
14991494
///
15001495
/// ```
1501-
///
15021496
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".overflowing_add(2), (7, false));")]
15031497
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MAX.overflowing_add(1), (", stringify!($SelfT), "::MIN, true));")]
15041498
/// ```
@@ -1593,7 +1587,6 @@ macro_rules! int_impl {
15931587
/// Basic usage:
15941588
///
15951589
/// ```
1596-
///
15971590
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".overflowing_sub(2), (3, false));")]
15981591
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MIN.overflowing_sub(1), (", stringify!($SelfT), "::MAX, true));")]
15991592
/// ```
@@ -1703,7 +1696,6 @@ macro_rules! int_impl {
17031696
/// Basic usage:
17041697
///
17051698
/// ```
1706-
///
17071699
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".overflowing_div(2), (2, false));")]
17081700
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MIN.overflowing_div(-1), (", stringify!($SelfT), "::MIN, true));")]
17091701
/// ```
@@ -1766,7 +1758,6 @@ macro_rules! int_impl {
17661758
/// Basic usage:
17671759
///
17681760
/// ```
1769-
///
17701761
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".overflowing_rem(2), (1, false));")]
17711762
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MIN.overflowing_rem(-1), (0, true));")]
17721763
/// ```

0 commit comments

Comments
 (0)