Skip to content

Commit 80c9932

Browse files
committed
Auto merge of #144628 - Zalathar:rollup-ncgn9jk, r=Zalathar
Rollup of 14 pull requests Successful merges: - #144022 (Implementation: `#[feature(sync_nonpoison)]`, `#[feature(nonpoison_mutex)]`) - #144167 (Document why `Range*<&T> as RangeBounds<T>` impls are not `T: ?Sized`, and give an alternative.) - #144407 (fix(debuginfo): disable overflow check for recursive non-enum types) - #144451 (fix: Reject upvar scrutinees for `loop_match`) - #144482 (Add explicit download methods to download module in bootstrap) - #144500 (thread name in stack overflow message) - #144511 (tidy: increase performance of auto extra checks feature) - #144586 (Update wasi-sdk to 27.0 in CI) - #144599 (bootstrap: enable tidy auto extra checks on tools profile) - #144600 (Ensure external paths passed via flags end up in rustdoc depinfo) - #144609 (feat: Right align line numbers) - #144623 (miri subtree update) - #144626 (cc dependencies: clarify comment) - #144627 (Add a test case for the issue #129882) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 5529041 + b1e0db2 commit 80c9932

File tree

177 files changed

+4979
-2329
lines changed

Some content is hidden

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

177 files changed

+4979
-2329
lines changed

Cargo.lock

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,8 @@ version = "1.2.16"
466466
source = "registry+https://github.com/rust-lang/crates.io-index"
467467
checksum = "be714c154be609ec7f5dad223a33bf1482fff90472de28f7362806e6d4832b8c"
468468
dependencies = [
469+
"jobserver",
470+
"libc",
469471
"shlex",
470472
]
471473

@@ -655,6 +657,26 @@ dependencies = [
655657
"serde",
656658
]
657659

660+
[[package]]
661+
name = "cmake"
662+
version = "0.1.54"
663+
source = "registry+https://github.com/rust-lang/crates.io-index"
664+
checksum = "e7caa3f9de89ddbe2c607f4101924c5abec803763ae9534e4f4d7d8f84aa81f0"
665+
dependencies = [
666+
"cc",
667+
]
668+
669+
[[package]]
670+
name = "codespan-reporting"
671+
version = "0.12.0"
672+
source = "registry+https://github.com/rust-lang/crates.io-index"
673+
checksum = "fe6d2e5af09e8c8ad56c969f2157a3d4238cebc7c55f0a517728c38f7b200f81"
674+
dependencies = [
675+
"serde",
676+
"termcolor",
677+
"unicode-width 0.2.1",
678+
]
679+
658680
[[package]]
659681
name = "collect-license-metadata"
660682
version = "0.1.0"
@@ -913,6 +935,68 @@ dependencies = [
913935
"windows-sys 0.59.0",
914936
]
915937

938+
[[package]]
939+
name = "cxx"
940+
version = "1.0.161"
941+
source = "registry+https://github.com/rust-lang/crates.io-index"
942+
checksum = "a3523cc02ad831111491dd64b27ad999f1ae189986728e477604e61b81f828df"
943+
dependencies = [
944+
"cc",
945+
"cxxbridge-cmd",
946+
"cxxbridge-flags",
947+
"cxxbridge-macro",
948+
"foldhash",
949+
"link-cplusplus",
950+
]
951+
952+
[[package]]
953+
name = "cxx-build"
954+
version = "1.0.161"
955+
source = "registry+https://github.com/rust-lang/crates.io-index"
956+
checksum = "212b754247a6f07b10fa626628c157593f0abf640a3dd04cce2760eca970f909"
957+
dependencies = [
958+
"cc",
959+
"codespan-reporting",
960+
"indexmap",
961+
"proc-macro2",
962+
"quote",
963+
"scratch",
964+
"syn 2.0.104",
965+
]
966+
967+
[[package]]
968+
name = "cxxbridge-cmd"
969+
version = "1.0.161"
970+
source = "registry+https://github.com/rust-lang/crates.io-index"
971+
checksum = "f426a20413ec2e742520ba6837c9324b55ffac24ead47491a6e29f933c5b135a"
972+
dependencies = [
973+
"clap",
974+
"codespan-reporting",
975+
"indexmap",
976+
"proc-macro2",
977+
"quote",
978+
"syn 2.0.104",
979+
]
980+
981+
[[package]]
982+
name = "cxxbridge-flags"
983+
version = "1.0.161"
984+
source = "registry+https://github.com/rust-lang/crates.io-index"
985+
checksum = "a258b6069020b4e5da6415df94a50ee4f586a6c38b037a180e940a43d06a070d"
986+
987+
[[package]]
988+
name = "cxxbridge-macro"
989+
version = "1.0.161"
990+
source = "registry+https://github.com/rust-lang/crates.io-index"
991+
checksum = "e8dec184b52be5008d6eaf7e62fc1802caf1ad1227d11b3b7df2c409c7ffc3f4"
992+
dependencies = [
993+
"indexmap",
994+
"proc-macro2",
995+
"quote",
996+
"rustversion",
997+
"syn 2.0.104",
998+
]
999+
9161000
[[package]]
9171001
name = "darling"
9181002
version = "0.20.11"
@@ -1373,6 +1457,17 @@ dependencies = [
13731457
"version_check",
13741458
]
13751459

1460+
[[package]]
1461+
name = "genmc-sys"
1462+
version = "0.1.0"
1463+
dependencies = [
1464+
"cc",
1465+
"cmake",
1466+
"cxx",
1467+
"cxx-build",
1468+
"git2",
1469+
]
1470+
13761471
[[package]]
13771472
name = "getopts"
13781473
version = "0.2.23"
@@ -1427,6 +1522,21 @@ dependencies = [
14271522
"stable_deref_trait",
14281523
]
14291524

1525+
[[package]]
1526+
name = "git2"
1527+
version = "0.20.2"
1528+
source = "registry+https://github.com/rust-lang/crates.io-index"
1529+
checksum = "2deb07a133b1520dc1a5690e9bd08950108873d7ed5de38dcc74d3b5ebffa110"
1530+
dependencies = [
1531+
"bitflags",
1532+
"libc",
1533+
"libgit2-sys",
1534+
"log",
1535+
"openssl-probe",
1536+
"openssl-sys",
1537+
"url",
1538+
]
1539+
14301540
[[package]]
14311541
name = "glob"
14321542
version = "0.3.2"
@@ -2060,6 +2170,19 @@ dependencies = [
20602170
"cc",
20612171
]
20622172

2173+
[[package]]
2174+
name = "libgit2-sys"
2175+
version = "0.18.2+1.9.1"
2176+
source = "registry+https://github.com/rust-lang/crates.io-index"
2177+
checksum = "1c42fe03df2bd3c53a3a9c7317ad91d80c81cd1fb0caec8d7cc4cd2bfa10c222"
2178+
dependencies = [
2179+
"cc",
2180+
"libc",
2181+
"libz-sys",
2182+
"openssl-sys",
2183+
"pkg-config",
2184+
]
2185+
20632186
[[package]]
20642187
name = "libloading"
20652188
version = "0.8.8"
@@ -2099,6 +2222,15 @@ dependencies = [
20992222
"vcpkg",
21002223
]
21012224

2225+
[[package]]
2226+
name = "link-cplusplus"
2227+
version = "1.0.10"
2228+
source = "registry+https://github.com/rust-lang/crates.io-index"
2229+
checksum = "4a6f6da007f968f9def0d65a05b187e2960183de70c160204ecfccf0ee330212"
2230+
dependencies = [
2231+
"cc",
2232+
]
2233+
21022234
[[package]]
21032235
name = "linkchecker"
21042236
version = "0.1.0"
@@ -2308,6 +2440,7 @@ dependencies = [
23082440
"chrono-tz",
23092441
"colored 3.0.0",
23102442
"directories",
2443+
"genmc-sys",
23112444
"getrandom 0.3.3",
23122445
"ipc-channel",
23132446
"libc",
@@ -4877,6 +5010,12 @@ version = "1.2.0"
48775010
source = "registry+https://github.com/rust-lang/crates.io-index"
48785011
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
48795012

5013+
[[package]]
5014+
name = "scratch"
5015+
version = "1.0.8"
5016+
source = "registry+https://github.com/rust-lang/crates.io-index"
5017+
checksum = "9f6280af86e5f559536da57a45ebc84948833b3bee313a7dd25232e09c878a52"
5018+
48805019
[[package]]
48815020
name = "self_cell"
48825021
version = "1.2.0"

bootstrap.example.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,9 @@
475475
# Note that if any value is manually given to bootstrap such as
476476
# `./x test tidy --extra-checks=js`, this value is ignored.
477477
# Use `--extra-checks=''` to temporarily disable all extra checks.
478+
#
479+
# Automatically enabled in the "tools" profile.
480+
# Set to the empty string to force disable (recommeded for hdd systems).
478481
#build.tidy-extra-checks = ""
479482

480483
# Indicates whether ccache is used when building certain artifacts (e.g. LLVM).

compiler/rustc_codegen_llvm/src/debuginfo/metadata/type_map.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,8 @@ pub(super) fn build_type_with_children<'ll, 'tcx>(
285285
// Item(T),
286286
// }
287287
// ```
288-
let is_expanding_recursive =
289-
debug_context(cx).adt_stack.borrow().iter().any(|(parent_def_id, parent_args)| {
288+
let is_expanding_recursive = adt_def.is_enum()
289+
&& debug_context(cx).adt_stack.borrow().iter().any(|(parent_def_id, parent_args)| {
290290
if def_id == *parent_def_id {
291291
args.iter().zip(parent_args.iter()).any(|(arg, parent_arg)| {
292292
if let (Some(arg), Some(parent_arg)) = (arg.as_type(), parent_arg.as_type())

compiler/rustc_codegen_ssa/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ edition = "2024"
88
ar_archive_writer = "0.4.2"
99
bitflags = "2.4.1"
1010
bstr = "1.11.3"
11-
# Pinned so `cargo update` bumps don't cause breakage. Please also update the
12-
# `cc` in `rustc_llvm` if you update the `cc` here.
11+
# `cc` updates often break things, so we pin it here. Cargo enforces "max 1 semver-compat version
12+
# per crate", so if you change this, you need to also change it in `rustc_llvm`.
1313
cc = "=1.2.16"
1414
itertools = "0.12"
1515
pathdiff = "0.2.0"

compiler/rustc_errors/src/emitter.rs

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -713,8 +713,7 @@ impl HumanEmitter {
713713
Style::LineNumber,
714714
);
715715
}
716-
buffer.puts(line_offset, 0, &self.maybe_anonymized(line_index), Style::LineNumber);
717-
716+
self.draw_line_num(buffer, line_index, line_offset, width_offset - 3);
718717
self.draw_col_separator_no_space(buffer, line_offset, width_offset - 2);
719718
left
720719
}
@@ -2128,11 +2127,11 @@ impl HumanEmitter {
21282127
// Account for a suggestion to completely remove a line(s) with whitespace (#94192).
21292128
let line_end = sm.lookup_char_pos(parts[0].span.hi()).line;
21302129
for line in line_start..=line_end {
2131-
buffer.puts(
2130+
self.draw_line_num(
2131+
&mut buffer,
2132+
line,
21322133
row_num - 1 + line - line_start,
2133-
0,
2134-
&self.maybe_anonymized(line),
2135-
Style::LineNumber,
2134+
max_line_num_len,
21362135
);
21372136
buffer.puts(
21382137
row_num - 1 + line - line_start,
@@ -2612,12 +2611,7 @@ impl HumanEmitter {
26122611
// For more info: https://github.com/rust-lang/rust/issues/92741
26132612
let lines_to_remove = file_lines.lines.iter().take(file_lines.lines.len() - 1);
26142613
for (index, line_to_remove) in lines_to_remove.enumerate() {
2615-
buffer.puts(
2616-
*row_num - 1,
2617-
0,
2618-
&self.maybe_anonymized(line_num + index),
2619-
Style::LineNumber,
2620-
);
2614+
self.draw_line_num(buffer, line_num + index, *row_num - 1, max_line_num_len);
26212615
buffer.puts(*row_num - 1, max_line_num_len + 1, "- ", Style::Removal);
26222616
let line = normalize_whitespace(
26232617
&file_lines.file.get_line(line_to_remove.line_index).unwrap(),
@@ -2634,11 +2628,11 @@ impl HumanEmitter {
26342628
let last_line_index = file_lines.lines[file_lines.lines.len() - 1].line_index;
26352629
let last_line = &file_lines.file.get_line(last_line_index).unwrap();
26362630
if last_line != line_to_add {
2637-
buffer.puts(
2631+
self.draw_line_num(
2632+
buffer,
2633+
line_num + file_lines.lines.len() - 1,
26382634
*row_num - 1,
2639-
0,
2640-
&self.maybe_anonymized(line_num + file_lines.lines.len() - 1),
2641-
Style::LineNumber,
2635+
max_line_num_len,
26422636
);
26432637
buffer.puts(*row_num - 1, max_line_num_len + 1, "- ", Style::Removal);
26442638
buffer.puts(
@@ -2661,7 +2655,7 @@ impl HumanEmitter {
26612655
// 2 - .await
26622656
// |
26632657
// *row_num -= 1;
2664-
buffer.puts(*row_num, 0, &self.maybe_anonymized(line_num), Style::LineNumber);
2658+
self.draw_line_num(buffer, line_num, *row_num, max_line_num_len);
26652659
buffer.puts(*row_num, max_line_num_len + 1, "+ ", Style::Addition);
26662660
buffer.append(*row_num, &normalize_whitespace(line_to_add), Style::NoStyle);
26672661
} else {
@@ -2671,7 +2665,7 @@ impl HumanEmitter {
26712665
*row_num -= 2;
26722666
}
26732667
} else if is_multiline {
2674-
buffer.puts(*row_num, 0, &self.maybe_anonymized(line_num), Style::LineNumber);
2668+
self.draw_line_num(buffer, line_num, *row_num, max_line_num_len);
26752669
match &highlight_parts {
26762670
[SubstitutionHighlight { start: 0, end }] if *end == line_to_add.len() => {
26772671
buffer.puts(*row_num, max_line_num_len + 1, "+ ", Style::Addition);
@@ -2702,11 +2696,11 @@ impl HumanEmitter {
27022696
Style::NoStyle,
27032697
);
27042698
} else if let DisplaySuggestion::Add = show_code_change {
2705-
buffer.puts(*row_num, 0, &self.maybe_anonymized(line_num), Style::LineNumber);
2699+
self.draw_line_num(buffer, line_num, *row_num, max_line_num_len);
27062700
buffer.puts(*row_num, max_line_num_len + 1, "+ ", Style::Addition);
27072701
buffer.append(*row_num, &normalize_whitespace(line_to_add), Style::NoStyle);
27082702
} else {
2709-
buffer.puts(*row_num, 0, &self.maybe_anonymized(line_num), Style::LineNumber);
2703+
self.draw_line_num(buffer, line_num, *row_num, max_line_num_len);
27102704
self.draw_col_separator(buffer, *row_num, max_line_num_len + 1);
27112705
buffer.append(*row_num, &normalize_whitespace(line_to_add), Style::NoStyle);
27122706
}
@@ -3016,6 +3010,22 @@ impl HumanEmitter {
30163010
OutputTheme::Unicode => "…",
30173011
}
30183012
}
3013+
3014+
fn draw_line_num(
3015+
&self,
3016+
buffer: &mut StyledBuffer,
3017+
line_num: usize,
3018+
line_offset: usize,
3019+
max_line_num_len: usize,
3020+
) {
3021+
let line_num = self.maybe_anonymized(line_num);
3022+
buffer.puts(
3023+
line_offset,
3024+
max_line_num_len.saturating_sub(str_width(&line_num)),
3025+
&line_num,
3026+
Style::LineNumber,
3027+
);
3028+
}
30193029
}
30203030

30213031
#[derive(Debug, Clone, Copy)]

compiler/rustc_llvm/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ libc = "0.2.73"
1010

1111
[build-dependencies]
1212
# tidy-alphabetical-start
13-
# Pinned so `cargo update` bumps don't cause breakage. Please also update the
14-
# pinned `cc` in `rustc_codegen_ssa` if you update `cc` here.
13+
# `cc` updates often break things, so we pin it here. Cargo enforces "max 1 semver-compat version
14+
# per crate", so if you change this, you need to also change it in `rustc_codegen_ssa`.
1515
cc = "=1.2.16"
1616
# tidy-alphabetical-end
1717

0 commit comments

Comments
 (0)