Skip to content

Commit 0ba9db8

Browse files
committed
Auto merge of rust-lang#129108 - matthiaskrgr:rollup-t4rjwgp, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - rust-lang#125970 (CommandExt::before_exec: deprecate safety in edition 2024) - rust-lang#127905 (Add powerpc-unknown-linux-muslspe compile target) - rust-lang#128925 (derive(SmartPointer): register helper attributes) - rust-lang#128946 (Hash Ipv*Addr as an integer) - rust-lang#128963 (Add possibility to generate rustdoc JSON output to stdout) - rust-lang#129015 (Update books) - rust-lang#129067 (Use `append` instead of `extend(drain(..))`) - rust-lang#129100 (Fix dependencies cron job) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 13a5289 + e14f171 commit 0ba9db8

File tree

38 files changed

+419
-66
lines changed

38 files changed

+419
-66
lines changed

.github/workflows/dependencies.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
- name: cargo update rustbook
6868
run: |
6969
echo -e "\nrustbook dependencies:" >> cargo_update.log
70-
cargo update --manifest-path src/tools/rustbook 2>&1 | sed '/crates.io index/d' | tee -a cargo_update.log
70+
cargo update --manifest-path src/tools/rustbook/Cargo.toml 2>&1 | sed '/crates.io index/d' | tee -a cargo_update.log
7171
- name: upload Cargo.lock artifact for use in PR
7272
uses: actions/upload-artifact@v4
7373
with:

Cargo.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1775,9 +1775,9 @@ checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683"
17751775

17761776
[[package]]
17771777
name = "indexmap"
1778-
version = "2.2.6"
1778+
version = "2.4.0"
17791779
source = "registry+https://github.com/rust-lang/crates.io-index"
1780-
checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26"
1780+
checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c"
17811781
dependencies = [
17821782
"equivalent",
17831783
"hashbrown",

compiler/rustc_data_structures/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ bitflags = "2.4.1"
1010
either = "1.0"
1111
elsa = "=1.7.1"
1212
ena = "0.14.3"
13-
indexmap = { version = "2.0.0" }
13+
indexmap = { version = "2.4.0" }
1414
jobserver_crate = { version = "0.1.28", package = "jobserver" }
1515
measureme = "11"
1616
rustc-hash = "1.1.0"

compiler/rustc_feature/src/builtin_attrs.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -578,12 +578,6 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
578578
EncodeCrossCrate::No, coroutines, experimental!(coroutines)
579579
),
580580

581-
// `#[pointee]` attribute to designate the pointee type in SmartPointer derive-macro
582-
gated!(
583-
pointee, Normal, template!(Word), ErrorFollowing,
584-
EncodeCrossCrate::No, derive_smart_pointer, experimental!(pointee)
585-
),
586-
587581
// RFC 3543
588582
// `#[patchable_function_entry(prefix_nops = m, entry_nops = n)]`
589583
gated!(

compiler/rustc_index/src/vec.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,11 @@ impl<I: Idx, T> IndexVec<I, T> {
188188
let min_new_len = elem.index() + 1;
189189
self.raw.resize_with(min_new_len, fill_value);
190190
}
191+
192+
#[inline]
193+
pub fn append(&mut self, other: &mut Self) {
194+
self.raw.append(&mut other.raw);
195+
}
191196
}
192197

193198
/// `IndexVec` is often used as a map, so it provides some map-like APIs.

compiler/rustc_mir_transform/src/inline.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,7 @@ impl<'tcx> Inliner<'tcx> {
726726

727727
// Insert all of the (mapped) parts of the callee body into the caller.
728728
caller_body.local_decls.extend(callee_body.drain_vars_and_temps());
729-
caller_body.source_scopes.extend(&mut callee_body.source_scopes.drain(..));
729+
caller_body.source_scopes.append(&mut callee_body.source_scopes);
730730
if self
731731
.tcx
732732
.sess
@@ -740,7 +740,7 @@ impl<'tcx> Inliner<'tcx> {
740740
// still getting consistent results from the mir-opt tests.
741741
caller_body.var_debug_info.append(&mut callee_body.var_debug_info);
742742
}
743-
caller_body.basic_blocks_mut().extend(callee_body.basic_blocks_mut().drain(..));
743+
caller_body.basic_blocks_mut().append(callee_body.basic_blocks_mut());
744744

745745
caller_body[callsite.block].terminator = Some(Terminator {
746746
source_info: callsite.source_info,

compiler/rustc_monomorphize/src/partitioning.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ fn merge_codegen_units<'tcx>(
371371
// Move the items from `cgu_src` to `cgu_dst`. Some of them may be
372372
// duplicate inlined items, in which case the destination CGU is
373373
// unaffected. Recalculate size estimates afterwards.
374-
cgu_dst.items_mut().extend(cgu_src.items_mut().drain(..));
374+
cgu_dst.items_mut().append(cgu_src.items_mut());
375375
cgu_dst.compute_size_estimate();
376376

377377
// Record that `cgu_dst` now contains all the stuff that was in
@@ -410,7 +410,7 @@ fn merge_codegen_units<'tcx>(
410410
// Move the items from `smallest` to `second_smallest`. Some of them
411411
// may be duplicate inlined items, in which case the destination CGU is
412412
// unaffected. Recalculate size estimates afterwards.
413-
second_smallest.items_mut().extend(smallest.items_mut().drain(..));
413+
second_smallest.items_mut().append(smallest.items_mut());
414414
second_smallest.compute_size_estimate();
415415

416416
// Don't update `cgu_contents`, that's only for incremental builds.

compiler/rustc_target/src/spec/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1561,6 +1561,7 @@ supported_targets! {
15611561
("powerpc-unknown-linux-gnu", powerpc_unknown_linux_gnu),
15621562
("powerpc-unknown-linux-gnuspe", powerpc_unknown_linux_gnuspe),
15631563
("powerpc-unknown-linux-musl", powerpc_unknown_linux_musl),
1564+
("powerpc-unknown-linux-muslspe", powerpc_unknown_linux_muslspe),
15641565
("powerpc64-ibm-aix", powerpc64_ibm_aix),
15651566
("powerpc64-unknown-linux-gnu", powerpc64_unknown_linux_gnu),
15661567
("powerpc64-unknown-linux-musl", powerpc64_unknown_linux_musl),
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
use crate::abi::Endian;
2+
use crate::spec::{base, Cc, LinkerFlavor, Lld, StackProbeType, Target, TargetOptions};
3+
4+
pub fn target() -> Target {
5+
let mut base = base::linux_musl::opts();
6+
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-mspe"]);
7+
base.max_atomic_width = Some(32);
8+
base.stack_probes = StackProbeType::Inline;
9+
10+
Target {
11+
llvm_target: "powerpc-unknown-linux-muslspe".into(),
12+
metadata: crate::spec::TargetMetadata {
13+
description: Some("PowerPC SPE Linux with musl".into()),
14+
tier: Some(3),
15+
host_tools: Some(false),
16+
std: Some(true),
17+
},
18+
pointer_width: 32,
19+
data_layout: "E-m:e-p:32:32-Fn32-i64:64-n32".into(),
20+
arch: "powerpc".into(),
21+
options: TargetOptions {
22+
abi: "spe".into(),
23+
endian: Endian::Big,
24+
mcount: "_mcount".into(),
25+
..base
26+
},
27+
}
28+
}

library/core/src/marker.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1060,7 +1060,7 @@ pub trait FnPtr: Copy + Clone {
10601060
}
10611061

10621062
/// Derive macro generating impls of traits related to smart pointers.
1063-
#[rustc_builtin_macro]
1063+
#[rustc_builtin_macro(SmartPointer, attributes(pointee))]
10641064
#[allow_internal_unstable(dispatch_from_dyn, coerce_unsized, unsize)]
10651065
#[unstable(feature = "derive_smart_pointer", issue = "123430")]
10661066
pub macro SmartPointer($item:item) {

0 commit comments

Comments
 (0)