Skip to content

Commit 79dd0d1

Browse files
committed
Auto merge of #144238 - jhpratt:rollup-xb8aida, r=jhpratt
Rollup of 8 pull requests Successful merges: - #144144 (tests: Skip supported-crate-types test on musl hosts) - #144159 (opt-dist: change build_dir field to be an actual build dir) - #144162 (Debug impls for DropElaborators) - #144189 (Add non-regression test for #144168) - #144216 (Don't consider unstable fields always-inhabited) - #144229 (Miri subtree update) - #144230 (Option::as_slice: fix comment) - #144235 (Fix run-make tests on musl hosts) r? `@ghost` `@rustbot` modify labels: rollup
2 parents e05ab47 + f0da6e2 commit 79dd0d1

Some content is hidden

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

53 files changed

+1656
-820
lines changed

Cargo.lock

Lines changed: 108 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ dependencies = [
384384
name = "cargo-miri"
385385
version = "0.1.0"
386386
dependencies = [
387-
"cargo_metadata 0.19.2",
387+
"cargo_metadata 0.21.0",
388388
"directories",
389389
"rustc-build-sysroot",
390390
"rustc_tools_util 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -402,14 +402,39 @@ dependencies = [
402402
"serde",
403403
]
404404

405+
[[package]]
406+
name = "cargo-platform"
407+
version = "0.2.0"
408+
source = "registry+https://github.com/rust-lang/crates.io-index"
409+
checksum = "84982c6c0ae343635a3a4ee6dedef965513735c8b183caa7289fa6e27399ebd4"
410+
dependencies = [
411+
"serde",
412+
]
413+
414+
[[package]]
415+
name = "cargo-util-schemas"
416+
version = "0.8.2"
417+
source = "registry+https://github.com/rust-lang/crates.io-index"
418+
checksum = "7dc1a6f7b5651af85774ae5a34b4e8be397d9cf4bc063b7e6dbd99a841837830"
419+
dependencies = [
420+
"semver",
421+
"serde",
422+
"serde-untagged",
423+
"serde-value",
424+
"thiserror 2.0.12",
425+
"toml 0.8.23",
426+
"unicode-xid",
427+
"url",
428+
]
429+
405430
[[package]]
406431
name = "cargo_metadata"
407432
version = "0.18.1"
408433
source = "registry+https://github.com/rust-lang/crates.io-index"
409434
checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037"
410435
dependencies = [
411436
"camino",
412-
"cargo-platform",
437+
"cargo-platform 0.1.9",
413438
"semver",
414439
"serde",
415440
"serde_json",
@@ -423,7 +448,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
423448
checksum = "dd5eb614ed4c27c5d706420e4320fbe3216ab31fa1c33cd8246ac36dae4479ba"
424449
dependencies = [
425450
"camino",
426-
"cargo-platform",
451+
"cargo-platform 0.1.9",
452+
"semver",
453+
"serde",
454+
"serde_json",
455+
"thiserror 2.0.12",
456+
]
457+
458+
[[package]]
459+
name = "cargo_metadata"
460+
version = "0.21.0"
461+
source = "registry+https://github.com/rust-lang/crates.io-index"
462+
checksum = "5cfca2aaa699835ba88faf58a06342a314a950d2b9686165e038286c30316868"
463+
dependencies = [
464+
"camino",
465+
"cargo-platform 0.2.0",
466+
"cargo-util-schemas",
427467
"semver",
428468
"serde",
429469
"serde_json",
@@ -561,7 +601,7 @@ dependencies = [
561601
"tempfile",
562602
"termize",
563603
"toml 0.7.8",
564-
"ui_test 0.30.2",
604+
"ui_test",
565605
"walkdir",
566606
]
567607

@@ -703,6 +743,15 @@ dependencies = [
703743
"windows-sys 0.59.0",
704744
]
705745

746+
[[package]]
747+
name = "colored"
748+
version = "3.0.0"
749+
source = "registry+https://github.com/rust-lang/crates.io-index"
750+
checksum = "fde0e0ec90c9dfb3b4b1a0891a7dcd0e2bffde2f7efed5fe7c9bb00e5bfb915e"
751+
dependencies = [
752+
"windows-sys 0.59.0",
753+
]
754+
706755
[[package]]
707756
name = "comma"
708757
version = "1.0.0"
@@ -716,7 +765,7 @@ dependencies = [
716765
"anstyle-svg",
717766
"build_helper",
718767
"camino",
719-
"colored",
768+
"colored 2.2.0",
720769
"diff",
721770
"getopts",
722771
"glob",
@@ -1143,6 +1192,16 @@ version = "1.0.2"
11431192
source = "registry+https://github.com/rust-lang/crates.io-index"
11441193
checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
11451194

1195+
[[package]]
1196+
name = "erased-serde"
1197+
version = "0.4.6"
1198+
source = "registry+https://github.com/rust-lang/crates.io-index"
1199+
checksum = "e004d887f51fcb9fef17317a2f3525c887d8aa3f4f50fed920816a688284a5b7"
1200+
dependencies = [
1201+
"serde",
1202+
"typeid",
1203+
]
1204+
11461205
[[package]]
11471206
name = "errno"
11481207
version = "0.3.13"
@@ -1831,17 +1890,16 @@ dependencies = [
18311890

18321891
[[package]]
18331892
name = "ipc-channel"
1834-
version = "0.19.0"
1893+
version = "0.20.0"
18351894
source = "registry+https://github.com/rust-lang/crates.io-index"
1836-
checksum = "6fb8251fb7bcd9ccd3725ed8deae9fe7db8e586495c9eb5b0c52e6233e5e75ea"
1895+
checksum = "5b1c98b70019c830a1fc39cecfe1f60ff99c4122f0a189697c810c90ec545c14"
18371896
dependencies = [
18381897
"bincode",
18391898
"crossbeam-channel",
18401899
"fnv",
1841-
"lazy_static",
18421900
"libc",
18431901
"mio",
1844-
"rand 0.8.5",
1902+
"rand 0.9.1",
18451903
"serde",
18461904
"tempfile",
18471905
"uuid",
@@ -2240,7 +2298,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
22402298
checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c"
22412299
dependencies = [
22422300
"libc",
2243-
"log",
22442301
"wasi 0.11.1+wasi-snapshot-preview1",
22452302
"windows-sys 0.59.0",
22462303
]
@@ -2263,7 +2320,7 @@ dependencies = [
22632320
"capstone",
22642321
"chrono",
22652322
"chrono-tz",
2266-
"colored",
2323+
"colored 3.0.0",
22672324
"directories",
22682325
"getrandom 0.3.3",
22692326
"ipc-channel",
@@ -2280,7 +2337,7 @@ dependencies = [
22802337
"smallvec",
22812338
"tempfile",
22822339
"tikv-jemalloc-sys",
2283-
"ui_test 0.29.2",
2340+
"ui_test",
22842341
]
22852342

22862343
[[package]]
@@ -2560,6 +2617,15 @@ version = "0.2.0"
25602617
source = "registry+https://github.com/rust-lang/crates.io-index"
25612618
checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
25622619

2620+
[[package]]
2621+
name = "ordered-float"
2622+
version = "2.10.1"
2623+
source = "registry+https://github.com/rust-lang/crates.io-index"
2624+
checksum = "68f19d67e5a2795c94e73e0bb1cc1a7edeb2e28efd39e2e1c9b7a40c1108b11c"
2625+
dependencies = [
2626+
"num-traits",
2627+
]
2628+
25632629
[[package]]
25642630
name = "overload"
25652631
version = "0.1.1"
@@ -4845,6 +4911,27 @@ dependencies = [
48454911
"serde_derive",
48464912
]
48474913

4914+
[[package]]
4915+
name = "serde-untagged"
4916+
version = "0.1.7"
4917+
source = "registry+https://github.com/rust-lang/crates.io-index"
4918+
checksum = "299d9c19d7d466db4ab10addd5703e4c615dec2a5a16dbbafe191045e87ee66e"
4919+
dependencies = [
4920+
"erased-serde",
4921+
"serde",
4922+
"typeid",
4923+
]
4924+
4925+
[[package]]
4926+
name = "serde-value"
4927+
version = "0.7.0"
4928+
source = "registry+https://github.com/rust-lang/crates.io-index"
4929+
checksum = "f3a1a3341211875ef120e117ea7fd5228530ae7e7036a779fdc9117be6b3282c"
4930+
dependencies = [
4931+
"ordered-float",
4932+
"serde",
4933+
]
4934+
48484935
[[package]]
48494936
name = "serde_derive"
48504937
version = "1.0.219"
@@ -4942,16 +5029,6 @@ dependencies = [
49425029
"windows-sys 0.52.0",
49435030
]
49445031

4945-
[[package]]
4946-
name = "spanned"
4947-
version = "0.3.0"
4948-
source = "registry+https://github.com/rust-lang/crates.io-index"
4949-
checksum = "86af297923fbcfd107c20a189a6e9c872160df71a7190ae4a7a6c5dce4b2feb6"
4950-
dependencies = [
4951-
"bstr",
4952-
"color-eyre",
4953-
]
4954-
49555032
[[package]]
49565033
name = "spanned"
49575034
version = "0.4.1"
@@ -5529,6 +5606,12 @@ dependencies = [
55295606
"rustc-hash 2.1.1",
55305607
]
55315608

5609+
[[package]]
5610+
name = "typeid"
5611+
version = "1.0.3"
5612+
source = "registry+https://github.com/rust-lang/crates.io-index"
5613+
checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c"
5614+
55325615
[[package]]
55335616
name = "typenum"
55345617
version = "1.18.0"
@@ -5550,32 +5633,6 @@ version = "0.1.7"
55505633
source = "registry+https://github.com/rust-lang/crates.io-index"
55515634
checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971"
55525635

5553-
[[package]]
5554-
name = "ui_test"
5555-
version = "0.29.2"
5556-
source = "registry+https://github.com/rust-lang/crates.io-index"
5557-
checksum = "1211b1111c752c73b33073d2958072be08825fd97c9ab4d83444da361a06634b"
5558-
dependencies = [
5559-
"annotate-snippets 0.11.5",
5560-
"anyhow",
5561-
"bstr",
5562-
"cargo-platform",
5563-
"cargo_metadata 0.18.1",
5564-
"color-eyre",
5565-
"colored",
5566-
"comma",
5567-
"crossbeam-channel",
5568-
"indicatif",
5569-
"levenshtein",
5570-
"prettydiff",
5571-
"regex",
5572-
"rustc_version",
5573-
"rustfix",
5574-
"serde",
5575-
"serde_json",
5576-
"spanned 0.3.0",
5577-
]
5578-
55795636
[[package]]
55805637
name = "ui_test"
55815638
version = "0.30.2"
@@ -5585,10 +5642,10 @@ dependencies = [
55855642
"annotate-snippets 0.11.5",
55865643
"anyhow",
55875644
"bstr",
5588-
"cargo-platform",
5645+
"cargo-platform 0.1.9",
55895646
"cargo_metadata 0.18.1",
55905647
"color-eyre",
5591-
"colored",
5648+
"colored 2.2.0",
55925649
"comma",
55935650
"crossbeam-channel",
55945651
"indicatif",
@@ -5599,7 +5656,7 @@ dependencies = [
55995656
"rustfix",
56005657
"serde",
56015658
"serde_json",
5602-
"spanned 0.4.1",
5659+
"spanned",
56035660
]
56045661

56055662
[[package]]

compiler/rustc_middle/src/ty/inhabitedness/mod.rs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
//! This code should only compile in modules where the uninhabitedness of `Foo`
4444
//! is visible.
4545
46-
use rustc_span::sym;
4746
use rustc_type_ir::TyKind::*;
4847
use tracing::instrument;
4948

@@ -85,21 +84,6 @@ impl<'tcx> VariantDef {
8584
InhabitedPredicate::all(
8685
tcx,
8786
self.fields.iter().map(|field| {
88-
// Unstable fields are always considered to be inhabited. In the future,
89-
// this could be extended to be conditional on the field being unstable
90-
// only within the module that's querying the inhabitedness, like:
91-
// `let pred = pred.or(InhabitedPredicate::IsUnstable(field.did));`
92-
// but this is unnecessary for now, since it would only affect nightly-only
93-
// code or code within the standard library itself.
94-
// HACK: We filter out `rustc_private` fields since with the flag
95-
// `-Zforce-unstable-if-unmarked` we consider all unmarked fields to be
96-
// unstable when building the compiler.
97-
if tcx
98-
.lookup_stability(field.did)
99-
.is_some_and(|stab| stab.is_unstable() && stab.feature != sym::rustc_private)
100-
{
101-
return InhabitedPredicate::True;
102-
}
10387
let pred = tcx.type_of(field.did).instantiate_identity().inhabited_predicate(tcx);
10488
if adt.is_enum() {
10589
return pred;

compiler/rustc_mir_transform/src/elaborate_drops.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,8 @@ struct ElaborateDropsCtxt<'a, 'tcx> {
253253
}
254254

255255
impl fmt::Debug for ElaborateDropsCtxt<'_, '_> {
256-
fn fmt(&self, _f: &mut fmt::Formatter<'_>) -> fmt::Result {
257-
Ok(())
256+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
257+
f.debug_struct("ElaborateDropsCtxt").finish_non_exhaustive()
258258
}
259259
}
260260

compiler/rustc_mir_transform/src/shim.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,8 +434,8 @@ pub(super) struct DropShimElaborator<'a, 'tcx> {
434434
}
435435

436436
impl fmt::Debug for DropShimElaborator<'_, '_> {
437-
fn fmt(&self, _f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> {
438-
Ok(())
437+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> {
438+
f.debug_struct("DropShimElaborator").finish_non_exhaustive()
439439
}
440440
}
441441

compiler/rustc_pattern_analysis/src/rustc.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use rustc_middle::ty::{
1616
};
1717
use rustc_middle::{bug, span_bug};
1818
use rustc_session::lint;
19-
use rustc_span::{DUMMY_SP, ErrorGuaranteed, Span, sym};
19+
use rustc_span::{DUMMY_SP, ErrorGuaranteed, Span};
2020

2121
use crate::constructor::Constructor::*;
2222
use crate::constructor::{
@@ -238,10 +238,7 @@ impl<'p, 'tcx: 'p> RustcPatCtxt<'p, 'tcx> {
238238
let is_visible =
239239
adt.is_enum() || field.vis.is_accessible_from(cx.module, cx.tcx);
240240
let is_uninhabited = cx.is_uninhabited(*ty);
241-
let is_unstable = cx.tcx.lookup_stability(field.did).is_some_and(|stab| {
242-
stab.is_unstable() && stab.feature != sym::rustc_private
243-
});
244-
let skip = is_uninhabited && (!is_visible || is_unstable);
241+
let skip = is_uninhabited && !is_visible;
245242
(ty, PrivateUninhabitedField(skip))
246243
});
247244
cx.dropless_arena.alloc_from_iter(tys)

library/core/src/option.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@ impl<T> Option<T> {
842842
// just needs to be aligned, which it is because `&self` is aligned and
843843
// the offset used is a multiple of alignment.
844844
//
845-
// In the new version, the intrinsic always returns a pointer to an
845+
// Here we assume that `offset_of!` always returns an offset to an
846846
// in-bounds and correctly aligned position for a `T` (even if in the
847847
// `None` case it's just padding).
848848
unsafe {

0 commit comments

Comments
 (0)