about summary refs log tree commit diff
path: root/tests/ui
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-02-23 23:49:11 +0000
committerbors <bors@rust-lang.org>2025-02-23 23:49:11 +0000
commit9af8985e059071ea2e0566969a4f140eca73fca9 (patch)
treeba685121e522acccaa15e56fb8ff2bbba147127a /tests/ui
parentf8a913b1381e90379c7ca63ac2b88b9518936628 (diff)
parent18ffee2126f71fe15a677d718bd27c501b0ccf52 (diff)
downloadrust-9af8985e059071ea2e0566969a4f140eca73fca9.tar.gz
rust-9af8985e059071ea2e0566969a4f140eca73fca9.zip
Auto merge of #137497 - tgross35:rollup-1oeclrr, r=tgross35
Rollup of 8 pull requests

Successful merges:

 - #136439 (Misc. `rustc_codegen_ssa` cleanups 🧹)
 - #136543 (intrinsics: unify rint, roundeven, nearbyint in a single round_ties_even intrinsic)
 - #136637 (Add binary_format to rustc target specs)
 - #137099 (Fix rustdoc test directives that were accidentally ignored 🧐)
 - #137297 (Update `compiler-builtins` to 0.1.147)
 - #137451 (FIx `sym` -> `syn` typo in tail-expr-drop-order type opt-out)
 - #137452 (bootstrap: add module docs for core:metadata)
 - #137483 (rename sub_ptr to offset_from_unsigned)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'tests/ui')
-rw-r--r--tests/ui/const-ptr/forbidden_slices.stderr6
-rw-r--r--tests/ui/consts/offset_from.rs2
-rw-r--r--tests/ui/intrinsics/intrinsic-nearby.rs11
3 files changed, 4 insertions, 15 deletions
diff --git a/tests/ui/const-ptr/forbidden_slices.stderr b/tests/ui/const-ptr/forbidden_slices.stderr
index 2e0c04dcf1e..df588fcc5e1 100644
--- a/tests/ui/const-ptr/forbidden_slices.stderr
+++ b/tests/ui/const-ptr/forbidden_slices.stderr
@@ -104,7 +104,7 @@ error[E0080]: could not evaluate static initializer
    |
    = note: the evaluated program panicked at 'assertion failed: 0 < pointee_size && pointee_size <= isize::MAX as usize', $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
    |
-note: inside `std::ptr::const_ptr::<impl *const ()>::sub_ptr`
+note: inside `std::ptr::const_ptr::<impl *const ()>::offset_from_unsigned`
   --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
 note: inside `from_ptr_range::<'_, ()>`
   --> $SRC_DIR/core/src/slice/raw.rs:LL:COL
@@ -192,7 +192,7 @@ error[E0080]: could not evaluate static initializer
    |
    = note: `ptr_offset_from_unsigned` called on two different pointers that are not both derived from the same allocation
    |
-note: inside `std::ptr::const_ptr::<impl *const u32>::sub_ptr`
+note: inside `std::ptr::const_ptr::<impl *const u32>::offset_from_unsigned`
   --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
 note: inside `from_ptr_range::<'_, u32>`
   --> $SRC_DIR/core/src/slice/raw.rs:LL:COL
@@ -207,7 +207,7 @@ error[E0080]: could not evaluate static initializer
    |
    = note: `ptr_offset_from_unsigned` called on two different pointers that are not both derived from the same allocation
    |
-note: inside `std::ptr::const_ptr::<impl *const u32>::sub_ptr`
+note: inside `std::ptr::const_ptr::<impl *const u32>::offset_from_unsigned`
   --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
 note: inside `from_ptr_range::<'_, u32>`
   --> $SRC_DIR/core/src/slice/raw.rs:LL:COL
diff --git a/tests/ui/consts/offset_from.rs b/tests/ui/consts/offset_from.rs
index c06314ac7df..02e8d145f65 100644
--- a/tests/ui/consts/offset_from.rs
+++ b/tests/ui/consts/offset_from.rs
@@ -44,7 +44,7 @@ pub const OFFSET_EQUAL_INTS: isize = {
 pub const OFFSET_UNSIGNED: usize = {
     let a = ['a', 'b', 'c'];
     let ptr = a.as_ptr();
-    unsafe { ptr.add(2).sub_ptr(ptr) }
+    unsafe { ptr.add(2).offset_from_unsigned(ptr) }
 };
 
 fn main() {
diff --git a/tests/ui/intrinsics/intrinsic-nearby.rs b/tests/ui/intrinsics/intrinsic-nearby.rs
deleted file mode 100644
index 990ecfc2b70..00000000000
--- a/tests/ui/intrinsics/intrinsic-nearby.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-//@ run-pass
-#![feature(core_intrinsics)]
-
-use std::intrinsics::*;
-
-fn main() {
-    unsafe {
-        assert_eq!(nearbyintf32(5.234f32), 5f32);
-        assert_eq!(nearbyintf64(6.777f64), 7f64);
-    }
-}