Skip to content

Commit 67e8365

Browse files
committed
Auto merge of rust-lang#129898 - matthiaskrgr:rollup-eexd2g8, r=matthiaskrgr
Rollup of 9 pull requests Successful merges: - rust-lang#129152 (custom/external clippy support for bootstrapping) - rust-lang#129529 (Add test to build crates used by r-a on stable) - rust-lang#129829 (Make decoding non-optional `LazyArray` panic if not set) - rust-lang#129860 (update `object` dependency to remove duplicate `wasmparser`) - rust-lang#129875 (chore: Fix typos in 'compiler' (batch 1)) - rust-lang#129877 (chore: Fix typos in 'compiler' (batch 2)) - rust-lang#129878 (chore: Fix typos in 'compiler' (batch 3)) - rust-lang#129891 (Do not request sanitizers for naked functions) - rust-lang#129892 (Clarify language around ptrs in slice::raw) Failed merges: - rust-lang#129777 (Add `unreachable_pub`, round 4) - rust-lang#129868 (Remove kobzol vacation status) r? `@ghost` `@rustbot` modify labels: rollup
2 parents bd53aa3 + 718b124 commit 67e8365

File tree

102 files changed

+288
-182
lines changed

Some content is hidden

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

102 files changed

+288
-182
lines changed

Cargo.lock

+14-23
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",
@@ -4431,7 +4431,7 @@ name = "rustc_target"
44314431
version = "0.0.0"
44324432
dependencies = [
44334433
"bitflags 2.6.0",
4434-
"object 0.36.3",
4434+
"object 0.36.4",
44354435
"rustc_abi",
44364436
"rustc_data_structures",
44374437
"rustc_feature",
@@ -5849,7 +5849,7 @@ dependencies = [
58495849
"lexopt",
58505850
"tempfile",
58515851
"wasi-preview1-component-adapter-provider",
5852-
"wasmparser 0.216.0",
5852+
"wasmparser",
58535853
"wat",
58545854
"wit-component",
58555855
"wit-parser",
@@ -5869,7 +5869,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
58695869
checksum = "04c23aebea22c8a75833ae08ed31ccc020835b12a41999e58c31464271b94a88"
58705870
dependencies = [
58715871
"leb128",
5872-
"wasmparser 0.216.0",
5872+
"wasmparser",
58735873
]
58745874

58755875
[[package]]
@@ -5885,16 +5885,7 @@ dependencies = [
58855885
"serde_json",
58865886
"spdx",
58875887
"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",
5888+
"wasmparser",
58985889
]
58995890

59005891
[[package]]
@@ -6228,7 +6219,7 @@ dependencies = [
62286219
"serde_json",
62296220
"wasm-encoder",
62306221
"wasm-metadata",
6231-
"wasmparser 0.216.0",
6222+
"wasmparser",
62326223
"wit-parser",
62336224
]
62346225

@@ -6247,7 +6238,7 @@ dependencies = [
62476238
"serde_derive",
62486239
"serde_json",
62496240
"unicode-xid",
6250-
"wasmparser 0.216.0",
6241+
"wasmparser",
62516242
]
62526243

62536244
[[package]]

compiler/rustc_ast_lowering/src/delegation.rs

+2-2
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

+1-1
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

+1-1
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/attributes.rs

+25-21
Original file line numberDiff line numberDiff line change
@@ -411,26 +411,31 @@ pub(crate) fn llfn_attrs_from_instance<'ll, 'tcx>(
411411
// the string "false". Now it is disabled by absence of the attribute.
412412
to_add.push(llvm::CreateAttrStringValue(cx.llcx, "branch-target-enforcement", "false"));
413413
}
414-
} else if llvm_util::get_version() >= (19, 0, 0) {
415-
// For non-naked functions, set branch protection attributes on aarch64.
416-
if let Some(BranchProtection { bti, pac_ret }) =
417-
cx.sess().opts.unstable_opts.branch_protection
418-
{
419-
assert!(cx.sess().target.arch == "aarch64");
420-
if bti {
421-
to_add.push(llvm::CreateAttrString(cx.llcx, "branch-target-enforcement"));
422-
}
423-
if let Some(PacRet { leaf, key }) = pac_ret {
424-
to_add.push(llvm::CreateAttrStringValue(
425-
cx.llcx,
426-
"sign-return-address",
427-
if leaf { "all" } else { "non-leaf" },
428-
));
429-
to_add.push(llvm::CreateAttrStringValue(
430-
cx.llcx,
431-
"sign-return-address-key",
432-
if key == PAuthKey::A { "a_key" } else { "b_key" },
433-
));
414+
} else {
415+
// Do not set sanitizer attributes for naked functions.
416+
to_add.extend(sanitize_attrs(cx, codegen_fn_attrs.no_sanitize));
417+
418+
if llvm_util::get_version() >= (19, 0, 0) {
419+
// For non-naked functions, set branch protection attributes on aarch64.
420+
if let Some(BranchProtection { bti, pac_ret }) =
421+
cx.sess().opts.unstable_opts.branch_protection
422+
{
423+
assert!(cx.sess().target.arch == "aarch64");
424+
if bti {
425+
to_add.push(llvm::CreateAttrString(cx.llcx, "branch-target-enforcement"));
426+
}
427+
if let Some(PacRet { leaf, key }) = pac_ret {
428+
to_add.push(llvm::CreateAttrStringValue(
429+
cx.llcx,
430+
"sign-return-address",
431+
if leaf { "all" } else { "non-leaf" },
432+
));
433+
to_add.push(llvm::CreateAttrStringValue(
434+
cx.llcx,
435+
"sign-return-address-key",
436+
if key == PAuthKey::A { "a_key" } else { "b_key" },
437+
));
438+
}
434439
}
435440
}
436441
}
@@ -485,7 +490,6 @@ pub(crate) fn llfn_attrs_from_instance<'ll, 'tcx>(
485490
if let Some(backchain) = backchain_attr(cx) {
486491
to_add.push(backchain);
487492
}
488-
to_add.extend(sanitize_attrs(cx, codegen_fn_attrs.no_sanitize));
489493
to_add.extend(patchable_function_entry_attrs(cx, codegen_fn_attrs.patchable_function_entry));
490494

491495
// Always annotate functions with the target-cpu they are compiled for.

compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ fn prepare_usage_sets<'tcx>(tcx: TyCtxt<'tcx>) -> UsageSets<'tcx> {
422422
(instance.def_id(), body)
423423
});
424424

425-
// Functions whose coverage statments were found inlined into other functions.
425+
// Functions whose coverage statements were found inlined into other functions.
426426
let mut used_via_inlining = FxHashSet::default();
427427
// Functions that were instrumented, but had all of their coverage statements
428428
// removed by later MIR transforms (e.g. UnreachablePropagation).

compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ fn push_const_param<'tcx>(tcx: TyCtxt<'tcx>, ct: ty::Const<'tcx>, output: &mut S
701701
match ty.kind() {
702702
ty::Int(ity) => {
703703
// FIXME: directly extract the bits from a valtree instead of evaluating an
704-
// alreay evaluated `Const` in order to get the bits.
704+
// already evaluated `Const` in order to get the bits.
705705
let bits = ct.eval_bits(tcx, ty::ParamEnv::reveal_all());
706706
let val = Integer::from_int_ty(&tcx, *ity).size().sign_extend(bits) as i128;
707707
write!(output, "{val}")

compiler/rustc_const_eval/src/interpret/call.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use super::{
2020
};
2121
use crate::fluent_generated as fluent;
2222

23-
/// An argment passed to a function.
23+
/// An argument passed to a function.
2424
#[derive(Clone, Debug)]
2525
pub enum FnArg<'tcx, Prov: Provenance = CtfeProvenance> {
2626
/// Pass a copy of the given operand.
@@ -123,7 +123,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
123123
self.tcx.has_attr(def.did(), sym::rustc_nonnull_optimization_guaranteed)
124124
};
125125
let inner = self.unfold_transparent(inner, /* may_unfold */ |def| {
126-
// Stop at NPO tpyes so that we don't miss that attribute in the check below!
126+
// Stop at NPO types so that we don't miss that attribute in the check below!
127127
def.is_struct() && !is_npo(def)
128128
});
129129
Ok(match inner.ty.kind() {

compiler/rustc_const_eval/src/interpret/eval_context.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
574574
// be computed as the type references non-existing names.
575575
// See <https://github.com/rust-lang/rust/issues/124348>.
576576
} else {
577-
// Looks like the const is not captued by `required_consts`, that's bad.
577+
// Looks like the const is not captured by `required_consts`, that's bad.
578578
span_bug!(span, "interpret const eval failure of {val:?} which is not in required_consts");
579579
}
580580
}

compiler/rustc_const_eval/src/interpret/memory.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
827827

828828
let (size, align) = if nested {
829829
// Nested anonymous statics are untyped, so let's get their
830-
// size and alignment from the allocaiton itself. This always
830+
// size and alignment from the allocation itself. This always
831831
// succeeds, as the query is fed at DefId creation time, so no
832832
// evaluation actually occurs.
833833
let alloc = self.tcx.eval_static_initializer(def_id).unwrap();

compiler/rustc_const_eval/src/interpret/place.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ pub(super) enum Place<Prov: Provenance = CtfeProvenance> {
186186
/// `Local` places always refer to the current stack frame, so they are unstable under
187187
/// function calls/returns and switching betweens stacks of different threads!
188188
/// We carry around the address of the `locals` buffer of the correct stack frame as a sanity
189-
/// chec to be able to catch some cases of using a dangling `Place`.
189+
/// check to be able to catch some cases of using a dangling `Place`.
190190
///
191191
/// This variant shall not be used for unsized types -- those must always live in memory.
192192
Local { local: mir::Local, offset: Option<Size>, locals_addr: usize },

compiler/rustc_const_eval/src/interpret/stack.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//! Manages the low-level pushing and popping of stack frames and the (de)allocation of local variables.
2-
//! For hadling of argument passing and return values, see the `call` module.
2+
//! For handling of argument passing and return values, see the `call` module.
33
use std::cell::Cell;
44
use std::{fmt, mem};
55

compiler/rustc_data_structures/src/base_n.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ impl fmt::Display for BaseNString {
4242
}
4343

4444
// This trait just lets us reserve the exact right amount of space when doing fixed-length
45-
// case-insensitve encoding. Add any impls you need.
45+
// case-insensitive encoding. Add any impls you need.
4646
pub trait ToBaseN: Into<u128> {
4747
fn encoded_len(base: usize) -> usize;
4848

compiler/rustc_data_structures/src/graph/scc/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ where
477477
// will know when we hit the state where previous_node == node.
478478
loop {
479479
// Back at the beginning, we can return. Note that we return the root state.
480-
// This is becuse for components being explored, we would otherwise get a
480+
// This is because for components being explored, we would otherwise get a
481481
// `node_state[n] = InCycleWith{ parent: n }` and that's wrong.
482482
if previous_node == node {
483483
return root_state;

compiler/rustc_data_structures/src/hashes.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
//! or 16 bytes of the hash.
44
//!
55
//! The types in this module represent 64-bit or 128-bit hashes produced by a `StableHasher`.
6-
//! `Hash64` and `Hash128` expose some utilty functions to encourage users to not extract the inner
6+
//! `Hash64` and `Hash128` expose some utility functions to encourage users to not extract the inner
77
//! hash value as an integer type and accidentally apply varint encoding to it.
88
//!
99
//! In contrast with `Fingerprint`, users of these types cannot and should not attempt to construct
10-
//! and decompose these types into constitutent pieces. The point of these types is only to
10+
//! and decompose these types into constituent pieces. The point of these types is only to
1111
//! connect the fact that they can only be produced by a `StableHasher` to their
1212
//! `Encode`/`Decode` impls.
1313

compiler/rustc_data_structures/src/sync/worker_local.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ impl RegistryId {
1919
/// index within the registry. This panics if the current thread is not associated with this
2020
/// registry.
2121
///
22-
/// Note that there's a race possible where the identifer in `THREAD_DATA` could be reused
22+
/// Note that there's a race possible where the identifier in `THREAD_DATA` could be reused
2323
/// so this can succeed from a different registry.
2424
#[cfg(parallel_compiler)]
2525
fn verify(self) -> usize {
@@ -50,7 +50,7 @@ struct ThreadData {
5050
}
5151

5252
thread_local! {
53-
/// A thread local which contains the identifer of `REGISTRY` but allows for faster access.
53+
/// A thread local which contains the identifier of `REGISTRY` but allows for faster access.
5454
/// It also holds the index of the current thread.
5555
static THREAD_DATA: ThreadData = const { ThreadData {
5656
registry_id: Cell::new(RegistryId(ptr::null())),
@@ -66,7 +66,7 @@ impl Registry {
6666

6767
/// Gets the registry associated with the current thread. Panics if there's no such registry.
6868
pub fn current() -> Self {
69-
REGISTRY.with(|registry| registry.get().cloned().expect("No assocated registry"))
69+
REGISTRY.with(|registry| registry.get().cloned().expect("No associated registry"))
7070
}
7171

7272
/// Registers the current thread with the registry so worker locals can be used on it.
@@ -92,7 +92,7 @@ impl Registry {
9292
}
9393
}
9494

95-
/// Gets the identifer of this registry.
95+
/// Gets the identifier of this registry.
9696
fn id(&self) -> RegistryId {
9797
RegistryId(&*self.0)
9898
}

compiler/rustc_error_codes/src/error_codes/E0582.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ where
4444
```
4545
The latter scenario encounters this error because `Foo::Assoc<'a>` could be
4646
implemented by a type that does not use the `'a` parameter, so there is no
47-
guarentee that `X::Assoc<'a>` actually uses `'a`.
47+
guarantee that `X::Assoc<'a>` actually uses `'a`.
4848

4949
To fix this we can pass a dummy parameter:
5050
```

compiler/rustc_errors/src/diagnostic.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ pub struct Subdiag {
479479
/// - The `EmissionGuarantee`, which determines the type returned from `emit`.
480480
///
481481
/// Each constructed `Diag` must be consumed by a function such as `emit`,
482-
/// `cancel`, `delay_as_bug`, or `into_diag`. A panic occurrs if a `Diag`
482+
/// `cancel`, `delay_as_bug`, or `into_diag`. A panic occurs if a `Diag`
483483
/// is dropped without being consumed by one of these functions.
484484
///
485485
/// If there is some state in a downstream crate you would like to access in

compiler/rustc_errors/src/emitter.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2300,7 +2300,7 @@ impl HumanEmitter {
23002300
// For example, for the following:
23012301
// |
23022302
// 2 - .await
2303-
// 2 + (note the left over whitepsace)
2303+
// 2 + (note the left over whitespace)
23042304
// |
23052305
// We really want
23062306
// |

compiler/rustc_errors/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ impl<'a> DiagCtxtHandle<'a> {
817817
);
818818
}
819819
// We delay a bug here so that `-Ztreat-err-as-bug -Zeagerly-emit-delayed-bugs`
820-
// can be used to create a backtrace at the stashing site insted of whenever the
820+
// can be used to create a backtrace at the stashing site instead of whenever the
821821
// diagnostic context is dropped and thus delayed bugs are emitted.
822822
Error => Some(self.span_delayed_bug(span, format!("stashing {key:?}"))),
823823
DelayedBug => {

0 commit comments

Comments
 (0)