Skip to content

Commit 2fccb4b

Browse files
author
The Miri Cronjob Bot
committed
Merge from rustc
2 parents 81a08bc + 54fdef7 commit 2fccb4b

File tree

739 files changed

+5685
-2556
lines changed

Some content is hidden

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

739 files changed

+5685
-2556
lines changed

.mailmap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ boolean_coercion <booleancoercion@gmail.com>
8181
Boris Egorov <jightuse@gmail.com> <egorov@linux.com>
8282
bors <bors@rust-lang.org> bors[bot] <26634292+bors[bot]@users.noreply.github.com>
8383
bors <bors@rust-lang.org> bors[bot] <bors[bot]@users.noreply.github.com>
84+
Boxy <rust@boxyuwu.dev> <supbscripter@gmail.com>
8485
Braden Nelson <moonheart08@users.noreply.github.com>
8586
Brandon Sanderson <singingboyo@gmail.com> Brandon Sanderson <singingboyo@hotmail.com>
8687
Brett Cannon <brett@python.org> Brett Cannon <brettcannon@users.noreply.github.com>
@@ -146,6 +147,7 @@ David Klein <david.klein@baesystemsdetica.com>
146147
David Manescu <david.manescu@gmail.com> <dman2626@uni.sydney.edu.au>
147148
David Ross <daboross@daboross.net>
148149
David Wood <david@davidtw.co> <david.wood@huawei.com>
150+
David Wood <david@davidtw.co> <david.wood2@arm.com>
149151
Deadbeef <ent3rm4n@gmail.com>
150152
Deadbeef <ent3rm4n@gmail.com> <fee1-dead-beef@protonmail.com>
151153
dependabot[bot] <dependabot[bot]@users.noreply.github.com> <27856297+dependabot-preview[bot]@users.noreply.github.com>

Cargo.lock

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ version = "0.4.2"
199199
source = "registry+https://github.com/rust-lang/crates.io-index"
200200
checksum = "01667f6f40216b9a0b2945e05fed5f1ad0ab6470e69cb9378001e37b1c0668e4"
201201
dependencies = [
202-
"object 0.36.3",
202+
"object 0.36.4",
203203
]
204204

205205
[[package]]
@@ -2453,17 +2453,17 @@ dependencies = [
24532453

24542454
[[package]]
24552455
name = "object"
2456-
version = "0.36.3"
2456+
version = "0.36.4"
24572457
source = "registry+https://github.com/rust-lang/crates.io-index"
2458-
checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9"
2458+
checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a"
24592459
dependencies = [
24602460
"crc32fast",
24612461
"flate2",
24622462
"hashbrown",
24632463
"indexmap",
24642464
"memchr",
24652465
"ruzstd 0.7.0",
2466-
"wasmparser 0.215.0",
2466+
"wasmparser",
24672467
]
24682468

24692469
[[package]]
@@ -3129,11 +3129,11 @@ dependencies = [
31293129
"build_helper",
31303130
"gimli 0.31.0",
31313131
"libc",
3132-
"object 0.36.3",
3132+
"object 0.36.4",
31333133
"regex",
31343134
"serde_json",
31353135
"similar",
3136-
"wasmparser 0.216.0",
3136+
"wasmparser",
31373137
]
31383138

31393139
[[package]]
@@ -3408,7 +3408,7 @@ dependencies = [
34083408
"itertools",
34093409
"libc",
34103410
"measureme",
3411-
"object 0.36.3",
3411+
"object 0.36.4",
34123412
"rustc-demangle",
34133413
"rustc_ast",
34143414
"rustc_attr",
@@ -3447,7 +3447,7 @@ dependencies = [
34473447
"itertools",
34483448
"jobserver",
34493449
"libc",
3450-
"object 0.36.3",
3450+
"object 0.36.4",
34513451
"pathdiff",
34523452
"regex",
34533453
"rustc_arena",
@@ -3569,6 +3569,7 @@ dependencies = [
35693569
"rustc_hir_pretty",
35703570
"rustc_hir_typeck",
35713571
"rustc_incremental",
3572+
"rustc_index",
35723573
"rustc_infer",
35733574
"rustc_interface",
35743575
"rustc_lint",
@@ -4431,7 +4432,7 @@ name = "rustc_target"
44314432
version = "0.0.0"
44324433
dependencies = [
44334434
"bitflags 2.6.0",
4434-
"object 0.36.3",
4435+
"object 0.36.4",
44354436
"rustc_abi",
44364437
"rustc_data_structures",
44374438
"rustc_feature",
@@ -5849,7 +5850,7 @@ dependencies = [
58495850
"lexopt",
58505851
"tempfile",
58515852
"wasi-preview1-component-adapter-provider",
5852-
"wasmparser 0.216.0",
5853+
"wasmparser",
58535854
"wat",
58545855
"wit-component",
58555856
"wit-parser",
@@ -5869,7 +5870,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
58695870
checksum = "04c23aebea22c8a75833ae08ed31ccc020835b12a41999e58c31464271b94a88"
58705871
dependencies = [
58715872
"leb128",
5872-
"wasmparser 0.216.0",
5873+
"wasmparser",
58735874
]
58745875

58755876
[[package]]
@@ -5885,16 +5886,7 @@ dependencies = [
58855886
"serde_json",
58865887
"spdx",
58875888
"wasm-encoder",
5888-
"wasmparser 0.216.0",
5889-
]
5890-
5891-
[[package]]
5892-
name = "wasmparser"
5893-
version = "0.215.0"
5894-
source = "registry+https://github.com/rust-lang/crates.io-index"
5895-
checksum = "53fbde0881f24199b81cf49b6ff8f9c145ac8eb1b7fc439adb5c099734f7d90e"
5896-
dependencies = [
5897-
"bitflags 2.6.0",
5889+
"wasmparser",
58985890
]
58995891

59005892
[[package]]
@@ -6228,7 +6220,7 @@ dependencies = [
62286220
"serde_json",
62296221
"wasm-encoder",
62306222
"wasm-metadata",
6231-
"wasmparser 0.216.0",
6223+
"wasmparser",
62326224
"wit-parser",
62336225
]
62346226

@@ -6247,7 +6239,7 @@ dependencies = [
62476239
"serde_derive",
62486240
"serde_json",
62496241
"unicode-xid",
6250-
"wasmparser 0.216.0",
6242+
"wasmparser",
62516243
]
62526244

62536245
[[package]]

RELEASES.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,14 @@ tools.
112112

113113
- [Add a Rust-for Linux `auto` CI job to check kernel builds.](https://github.com/rust-lang/rust/pull/125209/)
114114

115+
Version 1.80.1 (2024-08-08)
116+
===========================
117+
118+
<a id="1.80.1"></a>
119+
120+
- [Fix miscompilation in the jump threading MIR optimization when comparing floats](https://github.com/rust-lang/rust/pull/128271)
121+
- [Revert changes to the `dead_code` lint from 1.80.0](https://github.com/rust-lang/rust/pull/128618)
122+
115123
Version 1.80.0 (2024-07-25)
116124
==========================
117125

compiler/rustc/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,6 @@ features = ['unprefixed_malloc_on_supported_platforms']
3030
jemalloc = ['dep:jemalloc-sys']
3131
llvm = ['rustc_driver_impl/llvm']
3232
max_level_info = ['rustc_driver_impl/max_level_info']
33+
rustc_randomized_layouts = ['rustc_driver_impl/rustc_randomized_layouts']
3334
rustc_use_parallel_compiler = ['rustc_driver_impl/rustc_use_parallel_compiler']
3435
# tidy-alphabetical-end

compiler/rustc_abi/src/layout.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -968,8 +968,8 @@ fn univariant<
968968
let mut align = if pack.is_some() { dl.i8_align } else { dl.aggregate_align };
969969
let mut max_repr_align = repr.align;
970970
let mut inverse_memory_index: IndexVec<u32, FieldIdx> = fields.indices().collect();
971-
let optimize = !repr.inhibit_struct_field_reordering();
972-
if optimize && fields.len() > 1 {
971+
let optimize_field_order = !repr.inhibit_struct_field_reordering();
972+
if optimize_field_order && fields.len() > 1 {
973973
let end = if let StructKind::MaybeUnsized = kind { fields.len() - 1 } else { fields.len() };
974974
let optimizing = &mut inverse_memory_index.raw[..end];
975975
let fields_excluding_tail = &fields.raw[..end];
@@ -1176,7 +1176,7 @@ fn univariant<
11761176
// If field 5 has offset 0, offsets[0] is 5, and memory_index[5] should be 0.
11771177
// Field 5 would be the first element, so memory_index is i:
11781178
// Note: if we didn't optimize, it's already right.
1179-
let memory_index = if optimize {
1179+
let memory_index = if optimize_field_order {
11801180
inverse_memory_index.invert_bijective_mapping()
11811181
} else {
11821182
debug_assert!(inverse_memory_index.iter().copied().eq(fields.indices()));
@@ -1189,6 +1189,9 @@ fn univariant<
11891189
}
11901190
let mut layout_of_single_non_zst_field = None;
11911191
let mut abi = Abi::Aggregate { sized };
1192+
1193+
let optimize_abi = !repr.inhibit_newtype_abi_optimization();
1194+
11921195
// Try to make this a Scalar/ScalarPair.
11931196
if sized && size.bytes() > 0 {
11941197
// We skip *all* ZST here and later check if we are good in terms of alignment.
@@ -1205,7 +1208,7 @@ fn univariant<
12051208
match field.abi {
12061209
// For plain scalars, or vectors of them, we can't unpack
12071210
// newtypes for `#[repr(C)]`, as that affects C ABIs.
1208-
Abi::Scalar(_) | Abi::Vector { .. } if optimize => {
1211+
Abi::Scalar(_) | Abi::Vector { .. } if optimize_abi => {
12091212
abi = field.abi;
12101213
}
12111214
// But scalar pairs are Rust-specific and get

compiler/rustc_abi/src/lib.rs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,17 @@ bitflags! {
4343
const IS_SIMD = 1 << 1;
4444
const IS_TRANSPARENT = 1 << 2;
4545
// Internal only for now. If true, don't reorder fields.
46+
// On its own it does not prevent ABI optimizations.
4647
const IS_LINEAR = 1 << 3;
47-
// If true, the type's layout can be randomized using
48-
// the seed stored in `ReprOptions.field_shuffle_seed`
48+
// If true, the type's crate has opted into layout randomization.
49+
// Other flags can still inhibit reordering and thus randomization.
50+
// The seed stored in `ReprOptions.field_shuffle_seed`.
4951
const RANDOMIZE_LAYOUT = 1 << 4;
5052
// Any of these flags being set prevent field reordering optimisation.
51-
const IS_UNOPTIMISABLE = ReprFlags::IS_C.bits()
53+
const FIELD_ORDER_UNOPTIMIZABLE = ReprFlags::IS_C.bits()
5254
| ReprFlags::IS_SIMD.bits()
5355
| ReprFlags::IS_LINEAR.bits();
56+
const ABI_UNOPTIMIZABLE = ReprFlags::IS_C.bits() | ReprFlags::IS_SIMD.bits();
5457
}
5558
}
5659

@@ -139,10 +142,14 @@ impl ReprOptions {
139142
self.c() || self.int.is_some()
140143
}
141144

145+
pub fn inhibit_newtype_abi_optimization(&self) -> bool {
146+
self.flags.intersects(ReprFlags::ABI_UNOPTIMIZABLE)
147+
}
148+
142149
/// Returns `true` if this `#[repr()]` guarantees a fixed field order,
143150
/// e.g. `repr(C)` or `repr(<int>)`.
144151
pub fn inhibit_struct_field_reordering(&self) -> bool {
145-
self.flags.intersects(ReprFlags::IS_UNOPTIMISABLE) || self.int.is_some()
152+
self.flags.intersects(ReprFlags::FIELD_ORDER_UNOPTIMIZABLE) || self.int.is_some()
146153
}
147154

148155
/// Returns `true` if this type is valid for reordering and `-Z randomize-layout`

compiler/rustc_ast_lowering/src/delegation.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
7272
fn has_self(&self, def_id: DefId, span: Span) -> bool {
7373
if let Some(local_sig_id) = def_id.as_local() {
7474
// The value may be missing due to recursive delegation.
75-
// Error will be emmited later during HIR ty lowering.
75+
// Error will be emitted later during HIR ty lowering.
7676
self.resolver.delegation_fn_sigs.get(&local_sig_id).map_or(false, |sig| sig.has_self)
7777
} else {
7878
match self.tcx.def_kind(def_id) {
@@ -139,7 +139,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
139139
fn param_count(&self, sig_id: DefId) -> (usize, bool /*c_variadic*/) {
140140
if let Some(local_sig_id) = sig_id.as_local() {
141141
// Map may be filled incorrectly due to recursive delegation.
142-
// Error will be emmited later during HIR ty lowering.
142+
// Error will be emitted later during HIR ty lowering.
143143
match self.resolver.delegation_fn_sigs.get(&local_sig_id) {
144144
Some(sig) => (sig.param_count, sig.c_variadic),
145145
None => (0, false),

compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1179,7 +1179,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, '_, 'infcx, 'tcx> {
11791179
for field in &variant.fields {
11801180
// In practice unless there are more than one field with the same type, we'll be
11811181
// suggesting a single field at a type, because we don't aggregate multiple borrow
1182-
// checker errors involving the functional record update sytnax into a single one.
1182+
// checker errors involving the functional record update syntax into a single one.
11831183
let field_ty = field.ty(self.infcx.tcx, args);
11841184
let ident = field.ident(self.infcx.tcx);
11851185
if field_ty == ty && fields.iter().all(|field| field.ident.name != ident.name) {

compiler/rustc_borrowck/src/type_check/liveness/trace.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ impl<'a, 'me, 'typeck, 'flow, 'tcx> LivenessResults<'a, 'me, 'typeck, 'flow, 'tc
218218
// This collect is more necessary than immediately apparent
219219
// because these facts go into `add_drop_live_facts_for()`,
220220
// which also writes to `all_facts`, and so this is genuinely
221-
// a simulatneous overlapping mutable borrow.
221+
// a simultaneous overlapping mutable borrow.
222222
// FIXME for future hackers: investigate whether this is
223223
// actually necessary; these facts come from Polonius
224224
// and probably maybe plausibly does not need to go back in.

compiler/rustc_codegen_llvm/src/consts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ impl<'ll> CodegenCx<'ll, '_> {
390390
let val_llty = self.val_ty(v);
391391

392392
let g = self.get_static_inner(def_id, val_llty);
393-
let llty = self.val_ty(g);
393+
let llty = llvm::LLVMGlobalGetValueType(g);
394394

395395
let g = if val_llty == llty {
396396
g

0 commit comments

Comments
 (0)