about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAntoni Boucher <bouanto@zoho.com>2022-08-27 09:32:45 -0400
committerAntoni Boucher <bouanto@zoho.com>2022-08-27 09:50:38 -0400
commit7d01d51e9f77ce1416ff1268831c8a201492dae1 (patch)
treeab18f39ac0f657e836d95c5f2300a752b5111e39
parent9a6b75515e64d943d0812c4ace5eab570dfded78 (diff)
downloadrust-7d01d51e9f77ce1416ff1268831c8a201492dae1.tar.gz
rust-7d01d51e9f77ce1416ff1268831c8a201492dae1.zip
Fix tests
-rw-r--r--tests/run/array.rs2
-rw-r--r--tests/run/assign.rs2
-rw-r--r--tests/run/closure.rs2
-rw-r--r--tests/run/condition.rs2
-rw-r--r--tests/run/fun_ptr.rs2
-rw-r--r--tests/run/int_overflow.rs2
-rw-r--r--tests/run/mut_ref.rs2
-rw-r--r--tests/run/operations.rs2
-rw-r--r--tests/run/ptr_cast.rs2
9 files changed, 9 insertions, 9 deletions
diff --git a/tests/run/array.rs b/tests/run/array.rs
index 8b621d8a353..c53d98340f0 100644
--- a/tests/run/array.rs
+++ b/tests/run/array.rs
@@ -79,7 +79,7 @@ pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
 #[lang = "panic"]
 #[track_caller]
 #[no_mangle]
-pub fn panic(_msg: &str) -> ! {
+pub fn panic(_msg: &'static str) -> ! {
     unsafe {
         libc::puts("Panicking\0" as *const str as *const u8);
         intrinsics::abort();
diff --git a/tests/run/assign.rs b/tests/run/assign.rs
index eb38a8a3835..b95a7b71415 100644
--- a/tests/run/assign.rs
+++ b/tests/run/assign.rs
@@ -64,7 +64,7 @@ mod intrinsics {
 #[lang = "panic"]
 #[track_caller]
 #[no_mangle]
-pub fn panic(_msg: &str) -> ! {
+pub fn panic(_msg: &'static str) -> ! {
     unsafe {
         libc::puts("Panicking\0" as *const str as *const u8);
         libc::fflush(libc::stdout);
diff --git a/tests/run/closure.rs b/tests/run/closure.rs
index 7121a5f0d52..4d01d879dc1 100644
--- a/tests/run/closure.rs
+++ b/tests/run/closure.rs
@@ -177,7 +177,7 @@ impl Add for isize {
 #[lang = "panic"]
 #[track_caller]
 #[no_mangle]
-pub fn panic(_msg: &str) -> ! {
+pub fn panic(_msg: &'static str) -> ! {
     unsafe {
         libc::puts("Panicking\0" as *const str as *const u8);
         intrinsics::abort();
diff --git a/tests/run/condition.rs b/tests/run/condition.rs
index 6a2e2d5bb11..38b3084cb6c 100644
--- a/tests/run/condition.rs
+++ b/tests/run/condition.rs
@@ -82,7 +82,7 @@ pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
 #[lang = "panic"]
 #[track_caller]
 #[no_mangle]
-pub fn panic(_msg: &str) -> ! {
+pub fn panic(_msg: &'static str) -> ! {
     unsafe {
         libc::puts("Panicking\0" as *const str as *const u8);
         intrinsics::abort();
diff --git a/tests/run/fun_ptr.rs b/tests/run/fun_ptr.rs
index a226fff79e5..995fc5ca5d2 100644
--- a/tests/run/fun_ptr.rs
+++ b/tests/run/fun_ptr.rs
@@ -76,7 +76,7 @@ pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
 #[lang = "panic"]
 #[track_caller]
 #[no_mangle]
-pub fn panic(_msg: &str) -> ! {
+pub fn panic(_msg: &'static str) -> ! {
     unsafe {
         libc::puts("Panicking\0" as *const str as *const u8);
         intrinsics::abort();
diff --git a/tests/run/int_overflow.rs b/tests/run/int_overflow.rs
index ea2c5add962..4ca62362539 100644
--- a/tests/run/int_overflow.rs
+++ b/tests/run/int_overflow.rs
@@ -62,7 +62,7 @@ mod intrinsics {
 #[lang = "panic"]
 #[track_caller]
 #[no_mangle]
-pub fn panic(_msg: &str) -> ! {
+pub fn panic(_msg: &'static str) -> ! {
     unsafe {
         // Panicking is expected iff overflow checking is enabled.
         #[cfg(debug_assertions)]
diff --git a/tests/run/mut_ref.rs b/tests/run/mut_ref.rs
index 52de20021f3..814bb1a612e 100644
--- a/tests/run/mut_ref.rs
+++ b/tests/run/mut_ref.rs
@@ -66,7 +66,7 @@ mod intrinsics {
 #[lang = "panic"]
 #[track_caller]
 #[no_mangle]
-pub fn panic(_msg: &str) -> ! {
+pub fn panic(_msg: &'static str) -> ! {
     unsafe {
         libc::puts("Panicking\0" as *const str as *const u8);
         libc::fflush(libc::stdout);
diff --git a/tests/run/operations.rs b/tests/run/operations.rs
index e078b37b4ab..affe12067ff 100644
--- a/tests/run/operations.rs
+++ b/tests/run/operations.rs
@@ -72,7 +72,7 @@ mod intrinsics {
 #[lang = "panic"]
 #[track_caller]
 #[no_mangle]
-pub fn panic(_msg: &str) -> ! {
+pub fn panic(_msg: &'static str) -> ! {
     unsafe {
         libc::puts("Panicking\0" as *const str as *const u8);
         libc::fflush(libc::stdout);
diff --git a/tests/run/ptr_cast.rs b/tests/run/ptr_cast.rs
index 6ac099ea145..08481739a7f 100644
--- a/tests/run/ptr_cast.rs
+++ b/tests/run/ptr_cast.rs
@@ -76,7 +76,7 @@ pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
 #[lang = "panic"]
 #[track_caller]
 #[no_mangle]
-pub fn panic(_msg: &str) -> ! {
+pub fn panic(_msg: &'static str) -> ! {
     unsafe {
         libc::puts("Panicking\0" as *const str as *const u8);
         intrinsics::abort();