Rustup to rustc 1.62.0-nightly (70b3681bf 2022-05-14)

This commit is contained in:
bjorn3 2022-05-15 12:22:00 +02:00
parent e5ff9f1b6d
commit 63734fcdd7
3 changed files with 12 additions and 10 deletions

View file

@ -21,7 +21,7 @@ index 092b7cf..158cf71 100644
-#[cfg(target_has_atomic_load_store = "128")]
-#[unstable(feature = "integer_atomics", issue = "32976")]
-impl RefUnwindSafe for crate::sync::atomic::AtomicI128 {}
#[cfg(target_has_atomic_load_store = "ptr")]
#[stable(feature = "unwind_safe_atomic_refs", since = "1.14.0")]
@@ -235,9 +232,6 @@ impl RefUnwindSafe for crate::sync::atomic::AtomicU32 {}
@ -31,14 +31,14 @@ index 092b7cf..158cf71 100644
-#[cfg(target_has_atomic_load_store = "128")]
-#[unstable(feature = "integer_atomics", issue = "32976")]
-impl RefUnwindSafe for crate::sync::atomic::AtomicU128 {}
#[cfg(target_has_atomic_load_store = "8")]
#[stable(feature = "unwind_safe_atomic_refs", since = "1.14.0")]
diff --git a/library/core/src/sync/atomic.rs b/library/core/src/sync/atomic.rs
index d9de37e..8293fce 100644
--- a/library/core/src/sync/atomic.rs
+++ b/library/core/src/sync/atomic.rs
@@ -2234,44 +2234,6 @@ atomic_int! {
@@ -2234,46 +2234,6 @@ atomic_int! {
"AtomicU64::new(0)",
u64 AtomicU64 ATOMIC_U64_INIT
}
@ -54,6 +54,7 @@ index d9de37e..8293fce 100644
- unstable(feature = "integer_atomics", issue = "32976"),
- rustc_const_stable(feature = "const_integer_atomics", since = "1.34.0"),
- unstable(feature = "integer_atomics", issue = "32976"),
- cfg_attr(not(test), rustc_diagnostic_item = "AtomicI128"),
- "i128",
- "#![feature(integer_atomics)]\n\n",
- atomic_min, atomic_max,
@ -73,6 +74,7 @@ index d9de37e..8293fce 100644
- unstable(feature = "integer_atomics", issue = "32976"),
- rustc_const_stable(feature = "const_integer_atomics", since = "1.34.0"),
- unstable(feature = "integer_atomics", issue = "32976"),
- cfg_attr(not(test), rustc_diagnostic_item = "AtomicU128"),
- "u128",
- "#![feature(integer_atomics)]\n\n",
- atomic_umin, atomic_umax,
@ -98,6 +100,6 @@ index b735957..ea728b6 100644
#[cfg(target_has_atomic = "ptr")]
assert_eq!(align_of::<AtomicUsize>(), size_of::<AtomicUsize>());
#[cfg(target_has_atomic = "ptr")]
--
--
2.26.2.7.g19db9cfb68

View file

@ -1,3 +1,3 @@
[toolchain]
channel = "nightly-2022-05-07"
channel = "nightly-2022-05-15"
components = ["rust-src", "rustc-dev", "llvm-tools-preview"]

View file

@ -715,19 +715,19 @@ fn codegen_regular_intrinsic_call<'tcx>(
ptr_offset_from | ptr_offset_from_unsigned, (v ptr, v base) {
let ty = substs.type_at(0);
let isize_layout = fx.layout_of(fx.tcx.types.isize);
let pointee_size: u64 = fx.layout_of(ty).size.bytes();
let diff_bytes = fx.bcx.ins().isub(ptr, base);
// FIXME this can be an exact division.
let diff = if intrinsic == sym::ptr_offset_from_unsigned {
let val = if intrinsic == sym::ptr_offset_from_unsigned {
let usize_layout = fx.layout_of(fx.tcx.types.usize);
// Because diff_bytes ULE isize::MAX, this would be fine as signed,
// but unsigned is slightly easier to codegen, so might as well.
fx.bcx.ins().udiv_imm(diff_bytes, pointee_size as i64)
CValue::by_val(fx.bcx.ins().udiv_imm(diff_bytes, pointee_size as i64), usize_layout)
} else {
fx.bcx.ins().sdiv_imm(diff_bytes, pointee_size as i64)
let isize_layout = fx.layout_of(fx.tcx.types.isize);
CValue::by_val(fx.bcx.ins().sdiv_imm(diff_bytes, pointee_size as i64), isize_layout)
};
let val = CValue::by_val(diff, isize_layout);
ret.write_cvalue(fx, val);
};