about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorlilasta <lilaceous@proton.me>2024-03-21 22:19:57 +0900
committerlilasta <lilaceous@proton.me>2024-03-21 22:19:57 +0900
commitd324d6de0e9a0c3f2413b75de71b175e74057b59 (patch)
tree31bc8eb9a2e2ff9313e23ed537acc472a1af3adb /tests
parent3521a2f2f317cb978063842485c7d1bc86ec82b6 (diff)
downloadrust-d324d6de0e9a0c3f2413b75de71b175e74057b59.tar.gz
rust-d324d6de0e9a0c3f2413b75de71b175e74057b59.zip
Stabilize `const_caller_location` and `const_location_fields`
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/rfcs/rfc-2091-track-caller/caller-location-fnptr-rt-ctfe-equiv.rs2
-rw-r--r--tests/ui/rfcs/rfc-2091-track-caller/const-caller-location.rs12
2 files changed, 6 insertions, 8 deletions
diff --git a/tests/ui/rfcs/rfc-2091-track-caller/caller-location-fnptr-rt-ctfe-equiv.rs b/tests/ui/rfcs/rfc-2091-track-caller/caller-location-fnptr-rt-ctfe-equiv.rs
index 2ae8eb9c56d..ef970ebd14b 100644
--- a/tests/ui/rfcs/rfc-2091-track-caller/caller-location-fnptr-rt-ctfe-equiv.rs
+++ b/tests/ui/rfcs/rfc-2091-track-caller/caller-location-fnptr-rt-ctfe-equiv.rs
@@ -6,7 +6,7 @@
 //@ run-pass
 //@ compile-flags: -Z unleash-the-miri-inside-of-you
 
-#![feature(core_intrinsics, const_caller_location)]
+#![feature(core_intrinsics)]
 
 type L = &'static std::panic::Location<'static>;
 
diff --git a/tests/ui/rfcs/rfc-2091-track-caller/const-caller-location.rs b/tests/ui/rfcs/rfc-2091-track-caller/const-caller-location.rs
index 2c699437c83..c4e1f3ae48a 100644
--- a/tests/ui/rfcs/rfc-2091-track-caller/const-caller-location.rs
+++ b/tests/ui/rfcs/rfc-2091-track-caller/const-caller-location.rs
@@ -2,15 +2,13 @@
 //@ revisions: default mir-opt
 //@[mir-opt] compile-flags: -Zmir-opt-level=4
 
-#![feature(const_caller_location)]
-
 use std::panic::Location;
 
 const LOCATION: &Location = Location::caller();
 
 const TRACKED: &Location = tracked();
 #[track_caller]
-const fn tracked() -> &'static Location <'static> {
+const fn tracked() -> &'static Location<'static> {
     Location::caller()
 }
 
@@ -26,18 +24,18 @@ const fn contained() -> &'static Location<'static> {
 
 fn main() {
     assert_eq!(LOCATION.file(), file!());
-    assert_eq!(LOCATION.line(), 9);
+    assert_eq!(LOCATION.line(), 7);
     assert_eq!(LOCATION.column(), 29);
 
     assert_eq!(TRACKED.file(), file!());
-    assert_eq!(TRACKED.line(), 11);
+    assert_eq!(TRACKED.line(), 9);
     assert_eq!(TRACKED.column(), 28);
 
     assert_eq!(NESTED.file(), file!());
-    assert_eq!(NESTED.line(), 19);
+    assert_eq!(NESTED.line(), 17);
     assert_eq!(NESTED.column(), 5);
 
     assert_eq!(CONTAINED.file(), file!());
-    assert_eq!(CONTAINED.line(), 24);
+    assert_eq!(CONTAINED.line(), 22);
     assert_eq!(CONTAINED.column(), 5);
 }