Skip to content

Commit fa50220

Browse files
committed
Auto merge of #143148 - matthiaskrgr:rollup-xlijz8h, r=matthiaskrgr
Rollup of 10 pull requests Successful merges: - #123476 (std::net: adding `unix_socket_exclbind` feature for solaris/illumos.) - #142708 (Do not include NUL-terminator in computed length) - #142963 (Skip unnecessary components in x64 try builds) - #142987 (rustdoc: show attributes on enum variants) - #143031 (Add windows-gnullvm hosts to the manifest) - #143082 (update internal `send_signal` comment) - #143110 (Use tidy to sort `sym::*` items) - #143111 (BTreeSet: remove duplicated code by reusing `from_sorted_iter`) - #143114 (Minor Documentation Improvements) - #143137 (Miri subtree update) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 7ba34c7 + a1ceeec commit fa50220

File tree

55 files changed

+2223
-461
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+2223
-461
lines changed

Cargo.lock

Lines changed: 135 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,26 @@ dependencies = [
366366
"serde",
367367
]
368368

369+
[[package]]
370+
name = "capstone"
371+
version = "0.13.0"
372+
source = "registry+https://github.com/rust-lang/crates.io-index"
373+
checksum = "015ef5d5ca1743e3f94af9509ba6bd2886523cfee46e48d15c2ef5216fd4ac9a"
374+
dependencies = [
375+
"capstone-sys",
376+
"libc",
377+
]
378+
379+
[[package]]
380+
name = "capstone-sys"
381+
version = "0.17.0"
382+
source = "registry+https://github.com/rust-lang/crates.io-index"
383+
checksum = "2267cb8d16a1e4197863ec4284ffd1aec26fe7e57c58af46b02590a0235809a0"
384+
dependencies = [
385+
"cc",
386+
"libc",
387+
]
388+
369389
[[package]]
370390
name = "cargo-miri"
371391
version = "0.1.0"
@@ -738,7 +758,7 @@ dependencies = [
738758
"tracing-subscriber",
739759
"unified-diff",
740760
"walkdir",
741-
"windows",
761+
"windows 0.61.3",
742762
]
743763

744764
[[package]]
@@ -1592,7 +1612,7 @@ dependencies = [
15921612
"js-sys",
15931613
"log",
15941614
"wasm-bindgen",
1595-
"windows-core",
1615+
"windows-core 0.61.2",
15961616
]
15971617

15981618
[[package]]
@@ -1916,6 +1936,25 @@ dependencies = [
19161936
"unic-langid",
19171937
]
19181938

1939+
[[package]]
1940+
name = "ipc-channel"
1941+
version = "0.19.0"
1942+
source = "registry+https://github.com/rust-lang/crates.io-index"
1943+
checksum = "6fb8251fb7bcd9ccd3725ed8deae9fe7db8e586495c9eb5b0c52e6233e5e75ea"
1944+
dependencies = [
1945+
"bincode",
1946+
"crossbeam-channel",
1947+
"fnv",
1948+
"lazy_static",
1949+
"libc",
1950+
"mio",
1951+
"rand 0.8.5",
1952+
"serde",
1953+
"tempfile",
1954+
"uuid",
1955+
"windows 0.58.0",
1956+
]
1957+
19191958
[[package]]
19201959
name = "is_terminal_polyfill"
19211960
version = "1.70.1"
@@ -2301,6 +2340,18 @@ dependencies = [
23012340
"adler2",
23022341
]
23032342

2343+
[[package]]
2344+
name = "mio"
2345+
version = "1.0.4"
2346+
source = "registry+https://github.com/rust-lang/crates.io-index"
2347+
checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c"
2348+
dependencies = [
2349+
"libc",
2350+
"log",
2351+
"wasi 0.11.1+wasi-snapshot-preview1",
2352+
"windows-sys 0.59.0",
2353+
]
2354+
23042355
[[package]]
23052356
name = "miow"
23062357
version = "0.6.0"
@@ -2316,18 +2367,22 @@ version = "0.1.0"
23162367
dependencies = [
23172368
"aes",
23182369
"bitflags",
2370+
"capstone",
23192371
"chrono",
23202372
"chrono-tz",
23212373
"colored",
23222374
"directories",
23232375
"getrandom 0.3.3",
2376+
"ipc-channel",
23242377
"libc",
23252378
"libffi",
23262379
"libloading",
23272380
"measureme",
2381+
"nix",
23282382
"rand 0.9.1",
23292383
"regex",
23302384
"rustc_version",
2385+
"serde",
23312386
"smallvec",
23322387
"tempfile",
23332388
"tikv-jemalloc-sys",
@@ -3519,7 +3574,7 @@ dependencies = [
35193574
"thorin-dwp",
35203575
"tracing",
35213576
"wasm-encoder 0.219.2",
3522-
"windows",
3577+
"windows 0.61.3",
35233578
]
35243579

35253580
[[package]]
@@ -3578,7 +3633,7 @@ dependencies = [
35783633
"tempfile",
35793634
"thin-vec",
35803635
"tracing",
3581-
"windows",
3636+
"windows 0.61.3",
35823637
]
35833638

35843639
[[package]]
@@ -3641,7 +3696,7 @@ dependencies = [
36413696
"shlex",
36423697
"stable_mir",
36433698
"tracing",
3644-
"windows",
3699+
"windows 0.61.3",
36453700
]
36463701

36473702
[[package]]
@@ -3696,7 +3751,7 @@ dependencies = [
36963751
"termcolor",
36973752
"termize",
36983753
"tracing",
3699-
"windows",
3754+
"windows 0.61.3",
37003755
]
37013756

37023757
[[package]]
@@ -4457,7 +4512,7 @@ dependencies = [
44574512
"rustc_target",
44584513
"termize",
44594514
"tracing",
4460-
"windows",
4515+
"windows 0.61.3",
44614516
]
44624517

44634518
[[package]]
@@ -5142,7 +5197,7 @@ dependencies = [
51425197
"libc",
51435198
"objc2-core-foundation",
51445199
"objc2-io-kit",
5145-
"windows",
5200+
"windows 0.61.3",
51465201
]
51475202

51485203
[[package]]
@@ -6034,14 +6089,24 @@ version = "0.4.0"
60346089
source = "registry+https://github.com/rust-lang/crates.io-index"
60356090
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
60366091

6092+
[[package]]
6093+
name = "windows"
6094+
version = "0.58.0"
6095+
source = "registry+https://github.com/rust-lang/crates.io-index"
6096+
checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6"
6097+
dependencies = [
6098+
"windows-core 0.58.0",
6099+
"windows-targets 0.52.6",
6100+
]
6101+
60376102
[[package]]
60386103
name = "windows"
60396104
version = "0.61.3"
60406105
source = "registry+https://github.com/rust-lang/crates.io-index"
60416106
checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893"
60426107
dependencies = [
60436108
"windows-collections",
6044-
"windows-core",
6109+
"windows-core 0.61.2",
60456110
"windows-future",
60466111
"windows-link",
60476112
"windows-numerics",
@@ -6064,7 +6129,20 @@ version = "0.2.0"
60646129
source = "registry+https://github.com/rust-lang/crates.io-index"
60656130
checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8"
60666131
dependencies = [
6067-
"windows-core",
6132+
"windows-core 0.61.2",
6133+
]
6134+
6135+
[[package]]
6136+
name = "windows-core"
6137+
version = "0.58.0"
6138+
source = "registry+https://github.com/rust-lang/crates.io-index"
6139+
checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99"
6140+
dependencies = [
6141+
"windows-implement 0.58.0",
6142+
"windows-interface 0.58.0",
6143+
"windows-result 0.2.0",
6144+
"windows-strings 0.1.0",
6145+
"windows-targets 0.52.6",
60686146
]
60696147

60706148
[[package]]
@@ -6073,11 +6151,11 @@ version = "0.61.2"
60736151
source = "registry+https://github.com/rust-lang/crates.io-index"
60746152
checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3"
60756153
dependencies = [
6076-
"windows-implement",
6077-
"windows-interface",
6154+
"windows-implement 0.60.0",
6155+
"windows-interface 0.59.1",
60786156
"windows-link",
6079-
"windows-result",
6080-
"windows-strings",
6157+
"windows-result 0.3.4",
6158+
"windows-strings 0.4.2",
60816159
]
60826160

60836161
[[package]]
@@ -6086,11 +6164,22 @@ version = "0.2.1"
60866164
source = "registry+https://github.com/rust-lang/crates.io-index"
60876165
checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e"
60886166
dependencies = [
6089-
"windows-core",
6167+
"windows-core 0.61.2",
60906168
"windows-link",
60916169
"windows-threading",
60926170
]
60936171

6172+
[[package]]
6173+
name = "windows-implement"
6174+
version = "0.58.0"
6175+
source = "registry+https://github.com/rust-lang/crates.io-index"
6176+
checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b"
6177+
dependencies = [
6178+
"proc-macro2",
6179+
"quote",
6180+
"syn 2.0.103",
6181+
]
6182+
60946183
[[package]]
60956184
name = "windows-implement"
60966185
version = "0.60.0"
@@ -6102,6 +6191,17 @@ dependencies = [
61026191
"syn 2.0.103",
61036192
]
61046193

6194+
[[package]]
6195+
name = "windows-interface"
6196+
version = "0.58.0"
6197+
source = "registry+https://github.com/rust-lang/crates.io-index"
6198+
checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515"
6199+
dependencies = [
6200+
"proc-macro2",
6201+
"quote",
6202+
"syn 2.0.103",
6203+
]
6204+
61056205
[[package]]
61066206
name = "windows-interface"
61076207
version = "0.59.1"
@@ -6125,10 +6225,19 @@ version = "0.2.0"
61256225
source = "registry+https://github.com/rust-lang/crates.io-index"
61266226
checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1"
61276227
dependencies = [
6128-
"windows-core",
6228+
"windows-core 0.61.2",
61296229
"windows-link",
61306230
]
61316231

6232+
[[package]]
6233+
name = "windows-result"
6234+
version = "0.2.0"
6235+
source = "registry+https://github.com/rust-lang/crates.io-index"
6236+
checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e"
6237+
dependencies = [
6238+
"windows-targets 0.52.6",
6239+
]
6240+
61326241
[[package]]
61336242
name = "windows-result"
61346243
version = "0.3.4"
@@ -6138,6 +6247,16 @@ dependencies = [
61386247
"windows-link",
61396248
]
61406249

6250+
[[package]]
6251+
name = "windows-strings"
6252+
version = "0.1.0"
6253+
source = "registry+https://github.com/rust-lang/crates.io-index"
6254+
checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10"
6255+
dependencies = [
6256+
"windows-result 0.2.0",
6257+
"windows-targets 0.52.6",
6258+
]
6259+
61416260
[[package]]
61426261
name = "windows-strings"
61436262
version = "0.4.2"

compiler/rustc_const_eval/src/util/caller_location.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,14 @@ fn alloc_caller_location<'tcx>(
2121
assert!(!filename.as_str().as_bytes().contains(&0));
2222

2323
let loc_details = ecx.tcx.sess.opts.unstable_opts.location_detail;
24-
let file_wide_ptr = {
24+
let filename = {
2525
let filename = if loc_details.file { filename.as_str() } else { "<redacted>" };
2626
let filename_with_nul = filename.to_owned() + "\0";
2727
// This can fail if rustc runs out of memory right here. Trying to emit an error would be
2828
// pointless, since that would require allocating more memory than these short strings.
2929
let file_ptr = ecx.allocate_bytes_dedup(filename_with_nul.as_bytes()).unwrap();
30-
Immediate::new_slice(file_ptr.into(), filename_with_nul.len().try_into().unwrap(), ecx)
30+
let file_len = u64::try_from(filename.len()).unwrap();
31+
Immediate::new_slice(file_ptr.into(), file_len, ecx)
3132
};
3233
let line = if loc_details.line { Scalar::from_u32(line) } else { Scalar::from_u32(0) };
3334
let col = if loc_details.column { Scalar::from_u32(col) } else { Scalar::from_u32(0) };
@@ -41,11 +42,8 @@ fn alloc_caller_location<'tcx>(
4142
let location = ecx.allocate(loc_layout, MemoryKind::CallerLocation).unwrap();
4243

4344
// Initialize fields.
44-
ecx.write_immediate(
45-
file_wide_ptr,
46-
&ecx.project_field(&location, FieldIdx::from_u32(0)).unwrap(),
47-
)
48-
.expect("writing to memory we just allocated cannot fail");
45+
ecx.write_immediate(filename, &ecx.project_field(&location, FieldIdx::from_u32(0)).unwrap())
46+
.expect("writing to memory we just allocated cannot fail");
4947
ecx.write_scalar(line, &ecx.project_field(&location, FieldIdx::from_u32(1)).unwrap())
5048
.expect("writing to memory we just allocated cannot fail");
5149
ecx.write_scalar(col, &ecx.project_field(&location, FieldIdx::from_u32(2)).unwrap())

compiler/rustc_macros/src/symbols.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -190,17 +190,6 @@ fn symbols_with_errors(input: TokenStream) -> (TokenStream, Vec<syn::Error>) {
190190
let mut symbols_stream = quote! {};
191191
let mut prefill_stream = quote! {};
192192
let mut entries = Entries::with_capacity(input.keywords.len() + input.symbols.len() + 10);
193-
let mut prev_key: Option<(Span, String)> = None;
194-
195-
let mut check_order = |span: Span, s: &str, errors: &mut Errors| {
196-
if let Some((prev_span, ref prev_str)) = prev_key {
197-
if s < prev_str {
198-
errors.error(span, format!("Symbol `{s}` must precede `{prev_str}`"));
199-
errors.error(prev_span, format!("location of previous symbol `{prev_str}`"));
200-
}
201-
}
202-
prev_key = Some((span, s.to_string()));
203-
};
204193

205194
// Generate the listed keywords.
206195
for keyword in input.keywords.iter() {
@@ -219,7 +208,6 @@ fn symbols_with_errors(input: TokenStream) -> (TokenStream, Vec<syn::Error>) {
219208
// Generate the listed symbols.
220209
for symbol in input.symbols.iter() {
221210
let name = &symbol.name;
222-
check_order(symbol.name.span(), &name.to_string(), &mut errors);
223211

224212
let value = match &symbol.value {
225213
Value::SameAsName => name.to_string(),

compiler/rustc_macros/src/symbols/tests.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -84,18 +84,3 @@ fn check_dup_symbol_and_keyword() {
8484
};
8585
test_symbols_macro(input, &["Symbol `splat` is duplicated", "location of previous definition"]);
8686
}
87-
88-
#[test]
89-
fn check_symbol_order() {
90-
let input = quote! {
91-
Keywords {}
92-
Symbols {
93-
zebra,
94-
aardvark,
95-
}
96-
};
97-
test_symbols_macro(
98-
input,
99-
&["Symbol `aardvark` must precede `zebra`", "location of previous symbol `zebra`"],
100-
);
101-
}

0 commit comments

Comments
 (0)