Skip to content

Commit 150e700

Browse files
author
The Miri Cronjob Bot
committed
Merge from rustc
2 parents 1edc040 + 9fc39ff commit 150e700

File tree

65 files changed

+785
-578
lines changed

Some content is hidden

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

65 files changed

+785
-578
lines changed

alloc/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,10 @@
107107
#![feature(char_max_len)]
108108
#![feature(clone_to_uninit)]
109109
#![feature(coerce_unsized)]
110+
#![feature(const_default)]
110111
#![feature(const_eval_select)]
111112
#![feature(const_heap)]
113+
#![feature(const_trait_impl)]
112114
#![feature(core_intrinsics)]
113115
#![feature(deprecated_suggestion)]
114116
#![feature(deref_pure_trait)]

alloc/src/string.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2611,7 +2611,8 @@ impl_eq! { Cow<'a, str>, &'b str }
26112611
impl_eq! { Cow<'a, str>, String }
26122612

26132613
#[stable(feature = "rust1", since = "1.0.0")]
2614-
impl Default for String {
2614+
#[rustc_const_unstable(feature = "const_default", issue = "67792")]
2615+
impl const Default for String {
26152616
/// Creates an empty `String`.
26162617
#[inline]
26172618
fn default() -> String {

alloc/src/vec/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3895,7 +3895,8 @@ unsafe impl<#[may_dangle] T, A: Allocator> Drop for Vec<T, A> {
38953895
}
38963896

38973897
#[stable(feature = "rust1", since = "1.0.0")]
3898-
impl<T> Default for Vec<T> {
3898+
#[rustc_const_unstable(feature = "const_default", issue = "67792")]
3899+
impl<T> const Default for Vec<T> {
38993900
/// Creates an empty `Vec<T>`.
39003901
///
39013902
/// The vector will not allocate until elements are pushed onto it.

compiler-builtins/.github/workflows/main.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,25 @@ jobs:
195195
run: ./ci/update-musl.sh
196196
- run: cargo clippy --workspace --all-targets
197197

198+
build-custom:
199+
name: Build custom target
200+
runs-on: ubuntu-24.04
201+
timeout-minutes: 10
202+
steps:
203+
- uses: actions/checkout@v4
204+
- name: Install Rust
205+
run: |
206+
rustup update nightly --no-self-update
207+
rustup default nightly
208+
rustup component add rust-src
209+
- uses: Swatinem/rust-cache@v2
210+
- run: |
211+
# Ensure we can build with custom target.json files (these can interact
212+
# poorly with build scripts)
213+
cargo build -p compiler_builtins -p libm \
214+
--target etc/thumbv7em-none-eabi-renamed.json \
215+
-Zbuild-std=core
216+
198217
benchmarks:
199218
name: Benchmarks
200219
timeout-minutes: 20
@@ -331,6 +350,7 @@ jobs:
331350
success:
332351
needs:
333352
- benchmarks
353+
- build-custom
334354
- clippy
335355
- extensive
336356
- miri

compiler-builtins/builtins-test-intrinsics/build.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@ fn main() {
66
println!("cargo::rerun-if-changed=../configure.rs");
77

88
let target = builtins_configure::Target::from_env();
9-
builtins_configure::configure_f16_f128(&target);
109
builtins_configure::configure_aliases(&target);
1110
}

compiler-builtins/builtins-test/benches/float_cmp.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ float_bench! {
177177
],
178178
}
179179

180+
#[cfg(f128_enabled)]
180181
float_bench! {
181182
name: cmp_f128_gt,
182183
sig: (a: f128, b: f128) -> CmpResult,
@@ -189,6 +190,7 @@ float_bench! {
189190
asm: []
190191
}
191192

193+
#[cfg(f128_enabled)]
192194
float_bench! {
193195
name: cmp_f128_unord,
194196
sig: (a: f128, b: f128) -> CmpResult,

compiler-builtins/builtins-test/build.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,5 +116,4 @@ fn main() {
116116
}
117117

118118
builtins_configure::configure_aliases(&target);
119-
builtins_configure::configure_f16_f128(&target);
120119
}

compiler-builtins/builtins-test/tests/conv.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ mod i_to_f {
118118
i128, __floattidf;
119119
}
120120

121-
#[cfg(not(feature = "no-f16-f128"))]
121+
#[cfg(f128_enabled)]
122122
#[cfg(not(any(target_arch = "powerpc", target_arch = "powerpc64")))]
123123
i_to_f! { f128, Quad, not(feature = "no-sys-f128-int-convert"),
124124
u32, __floatunsitf;
@@ -129,7 +129,7 @@ mod i_to_f {
129129
i128, __floattitf;
130130
}
131131

132-
#[cfg(not(feature = "no-f16-f128"))]
132+
#[cfg(f128_enabled)]
133133
#[cfg(any(target_arch = "powerpc", target_arch = "powerpc64"))]
134134
i_to_f! { f128, Quad, not(feature = "no-sys-f128-int-convert"),
135135
u32, __floatunsikf;

compiler-builtins/builtins-test/tests/div_rem.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ mod float_div {
147147
f64, __divdf3, Double, all();
148148
}
149149

150-
#[cfg(not(feature = "no-f16-f128"))]
150+
#[cfg(f128_enabled)]
151151
#[cfg(not(any(target_arch = "powerpc", target_arch = "powerpc64")))]
152152
float! {
153153
f128, __divtf3, Quad,
@@ -156,7 +156,7 @@ mod float_div {
156156
not(any(feature = "no-sys-f128", all(target_arch = "aarch64", target_os = "linux")));
157157
}
158158

159-
#[cfg(not(feature = "no-f16-f128"))]
159+
#[cfg(f128_enabled)]
160160
#[cfg(any(target_arch = "powerpc", target_arch = "powerpc64"))]
161161
float! {
162162
f128, __divkf3, Quad, not(feature = "no-sys-f128");

compiler-builtins/ci/run.sh

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -54,29 +54,26 @@ symcheck=(cargo run -p symbol-check --release)
5454
[[ "$target" = "wasm"* ]] && symcheck+=(--features wasm)
5555
symcheck+=(-- build-and-check)
5656

57-
"${symcheck[@]}" -p compiler_builtins --target "$target"
58-
"${symcheck[@]}" -p compiler_builtins --target "$target" --release
59-
"${symcheck[@]}" -p compiler_builtins --target "$target" --features c
60-
"${symcheck[@]}" -p compiler_builtins --target "$target" --features c --release
61-
"${symcheck[@]}" -p compiler_builtins --target "$target" --features no-asm
62-
"${symcheck[@]}" -p compiler_builtins --target "$target" --features no-asm --release
63-
"${symcheck[@]}" -p compiler_builtins --target "$target" --features no-f16-f128
64-
"${symcheck[@]}" -p compiler_builtins --target "$target" --features no-f16-f128 --release
57+
"${symcheck[@]}" "$target" -- -p compiler_builtins
58+
"${symcheck[@]}" "$target" -- -p compiler_builtins --release
59+
"${symcheck[@]}" "$target" -- -p compiler_builtins --features c
60+
"${symcheck[@]}" "$target" -- -p compiler_builtins --features c --release
61+
"${symcheck[@]}" "$target" -- -p compiler_builtins --features no-asm
62+
"${symcheck[@]}" "$target" -- -p compiler_builtins --features no-asm --release
63+
"${symcheck[@]}" "$target" -- -p compiler_builtins --features no-f16-f128
64+
"${symcheck[@]}" "$target" -- -p compiler_builtins --features no-f16-f128 --release
6565

6666
run_intrinsics_test() {
67-
args=(
68-
--target "$target" --verbose \
69-
--manifest-path builtins-test-intrinsics/Cargo.toml
70-
)
71-
args+=( "$@" )
67+
build_args=(--verbose --manifest-path builtins-test-intrinsics/Cargo.toml)
68+
build_args+=("$@")
7269

7370
# symcheck also checks the results of builtins-test-intrinsics
74-
"${symcheck[@]}" "${args[@]}"
71+
"${symcheck[@]}" "$target" -- "${build_args[@]}"
7572

7673
# FIXME: we get access violations on Windows, our entrypoint may need to
7774
# be tweaked.
7875
if [ "${BUILD_ONLY:-}" != "1" ] && ! [[ "$target" = *"windows"* ]]; then
79-
cargo run "${args[@]}"
76+
cargo run --target "$target" "${build_args[@]}"
8077
fi
8178
}
8279

0 commit comments

Comments
 (0)