Skip to content

Commit

Permalink
tests: error strings for ABI stability now match
Browse files Browse the repository at this point in the history
  • Loading branch information
workingjubilee committed Feb 5, 2025
1 parent ba5e201 commit 4e4fa2a
Show file tree
Hide file tree
Showing 24 changed files with 140 additions and 140 deletions.
28 changes: 14 additions & 14 deletions tests/ui/feature-gates/feature-gate-abi-avr-interrupt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,43 +9,43 @@ trait Sized { }
// feature gate is not used.

extern "avr-non-blocking-interrupt" fn fu() {}
//~^ ERROR avr-interrupt and avr-non-blocking-interrupt ABIs are experimental
//~^ ERROR avr-non-blocking-interrupt ABI is experimental
extern "avr-interrupt" fn f() {}
//~^ ERROR avr-interrupt and avr-non-blocking-interrupt ABIs are experimental
//~^ ERROR avr-interrupt ABI is experimental

trait T {
extern "avr-interrupt" fn m();
//~^ ERROR avr-interrupt and avr-non-blocking-interrupt ABIs are experimental
//~^ ERROR avr-interrupt ABI is experimental
extern "avr-non-blocking-interrupt" fn mu();
//~^ ERROR avr-interrupt and avr-non-blocking-interrupt ABIs are experimental
//~^ ERROR avr-non-blocking-interrupt ABI is experimental

extern "avr-interrupt" fn dm() {}
//~^ ERROR avr-interrupt and avr-non-blocking-interrupt ABIs are experimental
//~^ ERROR avr-interrupt ABI is experimental
extern "avr-non-blocking-interrupt" fn dmu() {}
//~^ ERROR avr-interrupt and avr-non-blocking-interrupt ABIs are experimental
//~^ ERROR avr-non-blocking-interrupt ABI is experimental
}

struct S;
impl T for S {
extern "avr-interrupt" fn m() {}
//~^ ERROR avr-interrupt and avr-non-blocking-interrupt ABIs are experimental
//~^ ERROR avr-interrupt ABI is experimental
extern "avr-non-blocking-interrupt" fn mu() {}
//~^ ERROR avr-interrupt and avr-non-blocking-interrupt ABIs are experimental
//~^ ERROR avr-non-blocking-interrupt ABI is experimental
}

impl S {
extern "avr-interrupt" fn im() {}
//~^ ERROR avr-interrupt and avr-non-blocking-interrupt ABIs are experimental
//~^ ERROR avr-interrupt ABI is experimental
extern "avr-non-blocking-interrupt" fn imu() {}
//~^ ERROR avr-interrupt and avr-non-blocking-interrupt ABIs are experimental
//~^ ERROR avr-non-blocking-interrupt ABI is experimental
}

type TA = extern "avr-interrupt" fn();
//~^ ERROR avr-interrupt and avr-non-blocking-interrupt ABIs are experimental
//~^ ERROR avr-interrupt ABI is experimental
type TAU = extern "avr-non-blocking-interrupt" fn();
//~^ ERROR avr-interrupt and avr-non-blocking-interrupt ABIs are experimental
//~^ ERROR avr-non-blocking-interrupt ABI is experimental

extern "avr-interrupt" {}
//~^ ERROR avr-interrupt and avr-non-blocking-interrupt ABIs are experimental
//~^ ERROR avr-interrupt ABI is experimental
extern "avr-non-blocking-interrupt" {}
//~^ ERROR avr-interrupt and avr-non-blocking-interrupt ABIs are experimental
//~^ ERROR avr-non-blocking-interrupt ABI is experimental
28 changes: 14 additions & 14 deletions tests/ui/feature-gates/feature-gate-abi-avr-interrupt.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error[E0658]: avr-interrupt and avr-non-blocking-interrupt ABIs are experimental and subject to change
error[E0658]: avr-non-blocking-interrupt ABI is experimental and subject to change
--> $DIR/feature-gate-abi-avr-interrupt.rs:11:8
|
LL | extern "avr-non-blocking-interrupt" fn fu() {}
Expand All @@ -8,7 +8,7 @@ LL | extern "avr-non-blocking-interrupt" fn fu() {}
= help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: avr-interrupt and avr-non-blocking-interrupt ABIs are experimental and subject to change
error[E0658]: avr-interrupt ABI is experimental and subject to change
--> $DIR/feature-gate-abi-avr-interrupt.rs:13:8
|
LL | extern "avr-interrupt" fn f() {}
Expand All @@ -18,7 +18,7 @@ LL | extern "avr-interrupt" fn f() {}
= help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: avr-interrupt and avr-non-blocking-interrupt ABIs are experimental and subject to change
error[E0658]: avr-interrupt ABI is experimental and subject to change
--> $DIR/feature-gate-abi-avr-interrupt.rs:17:12
|
LL | extern "avr-interrupt" fn m();
Expand All @@ -28,7 +28,7 @@ LL | extern "avr-interrupt" fn m();
= help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: avr-interrupt and avr-non-blocking-interrupt ABIs are experimental and subject to change
error[E0658]: avr-non-blocking-interrupt ABI is experimental and subject to change
--> $DIR/feature-gate-abi-avr-interrupt.rs:19:12
|
LL | extern "avr-non-blocking-interrupt" fn mu();
Expand All @@ -38,7 +38,7 @@ LL | extern "avr-non-blocking-interrupt" fn mu();
= help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: avr-interrupt and avr-non-blocking-interrupt ABIs are experimental and subject to change
error[E0658]: avr-interrupt ABI is experimental and subject to change
--> $DIR/feature-gate-abi-avr-interrupt.rs:22:12
|
LL | extern "avr-interrupt" fn dm() {}
Expand All @@ -48,7 +48,7 @@ LL | extern "avr-interrupt" fn dm() {}
= help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: avr-interrupt and avr-non-blocking-interrupt ABIs are experimental and subject to change
error[E0658]: avr-non-blocking-interrupt ABI is experimental and subject to change
--> $DIR/feature-gate-abi-avr-interrupt.rs:24:12
|
LL | extern "avr-non-blocking-interrupt" fn dmu() {}
Expand All @@ -58,7 +58,7 @@ LL | extern "avr-non-blocking-interrupt" fn dmu() {}
= help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: avr-interrupt and avr-non-blocking-interrupt ABIs are experimental and subject to change
error[E0658]: avr-interrupt ABI is experimental and subject to change
--> $DIR/feature-gate-abi-avr-interrupt.rs:30:12
|
LL | extern "avr-interrupt" fn m() {}
Expand All @@ -68,7 +68,7 @@ LL | extern "avr-interrupt" fn m() {}
= help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: avr-interrupt and avr-non-blocking-interrupt ABIs are experimental and subject to change
error[E0658]: avr-non-blocking-interrupt ABI is experimental and subject to change
--> $DIR/feature-gate-abi-avr-interrupt.rs:32:12
|
LL | extern "avr-non-blocking-interrupt" fn mu() {}
Expand All @@ -78,7 +78,7 @@ LL | extern "avr-non-blocking-interrupt" fn mu() {}
= help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: avr-interrupt and avr-non-blocking-interrupt ABIs are experimental and subject to change
error[E0658]: avr-interrupt ABI is experimental and subject to change
--> $DIR/feature-gate-abi-avr-interrupt.rs:37:12
|
LL | extern "avr-interrupt" fn im() {}
Expand All @@ -88,7 +88,7 @@ LL | extern "avr-interrupt" fn im() {}
= help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: avr-interrupt and avr-non-blocking-interrupt ABIs are experimental and subject to change
error[E0658]: avr-non-blocking-interrupt ABI is experimental and subject to change
--> $DIR/feature-gate-abi-avr-interrupt.rs:39:12
|
LL | extern "avr-non-blocking-interrupt" fn imu() {}
Expand All @@ -98,7 +98,7 @@ LL | extern "avr-non-blocking-interrupt" fn imu() {}
= help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: avr-interrupt and avr-non-blocking-interrupt ABIs are experimental and subject to change
error[E0658]: avr-interrupt ABI is experimental and subject to change
--> $DIR/feature-gate-abi-avr-interrupt.rs:43:18
|
LL | type TA = extern "avr-interrupt" fn();
Expand All @@ -108,7 +108,7 @@ LL | type TA = extern "avr-interrupt" fn();
= help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: avr-interrupt and avr-non-blocking-interrupt ABIs are experimental and subject to change
error[E0658]: avr-non-blocking-interrupt ABI is experimental and subject to change
--> $DIR/feature-gate-abi-avr-interrupt.rs:45:19
|
LL | type TAU = extern "avr-non-blocking-interrupt" fn();
Expand All @@ -118,7 +118,7 @@ LL | type TAU = extern "avr-non-blocking-interrupt" fn();
= help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: avr-interrupt and avr-non-blocking-interrupt ABIs are experimental and subject to change
error[E0658]: avr-interrupt ABI is experimental and subject to change
--> $DIR/feature-gate-abi-avr-interrupt.rs:48:8
|
LL | extern "avr-interrupt" {}
Expand All @@ -128,7 +128,7 @@ LL | extern "avr-interrupt" {}
= help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: avr-interrupt and avr-non-blocking-interrupt ABIs are experimental and subject to change
error[E0658]: avr-non-blocking-interrupt ABI is experimental and subject to change
--> $DIR/feature-gate-abi-avr-interrupt.rs:50:8
|
LL | extern "avr-non-blocking-interrupt" {}
Expand Down
12 changes: 6 additions & 6 deletions tests/ui/feature-gates/feature-gate-abi-riscv-interrupt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,25 @@ trait Sized {}
// feature gate is not used.

extern "riscv-interrupt-m" fn f() {}
//~^ ERROR riscv-interrupt ABIs are experimental
//~^ ERROR riscv-interrupt-m ABI is experimental
extern "riscv-interrupt-s" fn f_s() {}
//~^ ERROR riscv-interrupt ABIs are experimental
//~^ ERROR riscv-interrupt-s ABI is experimental

trait T {
extern "riscv-interrupt-m" fn m();
//~^ ERROR riscv-interrupt ABIs are experimental
//~^ ERROR riscv-interrupt-m ABI is experimental
}

struct S;
impl T for S {
extern "riscv-interrupt-m" fn m() {}
//~^ ERROR riscv-interrupt ABIs are experimental
//~^ ERROR riscv-interrupt-m ABI is experimental
}

impl S {
extern "riscv-interrupt-m" fn im() {}
//~^ ERROR riscv-interrupt ABIs are experimental
//~^ ERROR riscv-interrupt-m ABI is experimental
}

type TA = extern "riscv-interrupt-m" fn();
//~^ ERROR riscv-interrupt ABIs are experimental
//~^ ERROR riscv-interrupt-m ABI is experimental
12 changes: 6 additions & 6 deletions tests/ui/feature-gates/feature-gate-abi-riscv-interrupt.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error[E0658]: riscv-interrupt ABIs are experimental and subject to change
error[E0658]: riscv-interrupt-m ABI is experimental and subject to change
--> $DIR/feature-gate-abi-riscv-interrupt.rs:11:8
|
LL | extern "riscv-interrupt-m" fn f() {}
Expand All @@ -8,7 +8,7 @@ LL | extern "riscv-interrupt-m" fn f() {}
= help: add `#![feature(abi_riscv_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: riscv-interrupt ABIs are experimental and subject to change
error[E0658]: riscv-interrupt-s ABI is experimental and subject to change
--> $DIR/feature-gate-abi-riscv-interrupt.rs:13:8
|
LL | extern "riscv-interrupt-s" fn f_s() {}
Expand All @@ -18,7 +18,7 @@ LL | extern "riscv-interrupt-s" fn f_s() {}
= help: add `#![feature(abi_riscv_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: riscv-interrupt ABIs are experimental and subject to change
error[E0658]: riscv-interrupt-m ABI is experimental and subject to change
--> $DIR/feature-gate-abi-riscv-interrupt.rs:17:12
|
LL | extern "riscv-interrupt-m" fn m();
Expand All @@ -28,7 +28,7 @@ LL | extern "riscv-interrupt-m" fn m();
= help: add `#![feature(abi_riscv_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: riscv-interrupt ABIs are experimental and subject to change
error[E0658]: riscv-interrupt-m ABI is experimental and subject to change
--> $DIR/feature-gate-abi-riscv-interrupt.rs:23:12
|
LL | extern "riscv-interrupt-m" fn m() {}
Expand All @@ -38,7 +38,7 @@ LL | extern "riscv-interrupt-m" fn m() {}
= help: add `#![feature(abi_riscv_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: riscv-interrupt ABIs are experimental and subject to change
error[E0658]: riscv-interrupt-m ABI is experimental and subject to change
--> $DIR/feature-gate-abi-riscv-interrupt.rs:28:12
|
LL | extern "riscv-interrupt-m" fn im() {}
Expand All @@ -48,7 +48,7 @@ LL | extern "riscv-interrupt-m" fn im() {}
= help: add `#![feature(abi_riscv_interrupt)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: riscv-interrupt ABIs are experimental and subject to change
error[E0658]: riscv-interrupt-m ABI is experimental and subject to change
--> $DIR/feature-gate-abi-riscv-interrupt.rs:32:18
|
LL | type TA = extern "riscv-interrupt-m" fn();
Expand Down
38 changes: 19 additions & 19 deletions tests/ui/feature-gates/feature-gate-abi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,49 +11,49 @@ trait Sized { }
trait Tuple { }

// Functions
extern "rust-intrinsic" fn f1() {} //~ ERROR intrinsics are subject to change
extern "rust-intrinsic" fn f1() {} //~ ERROR rust-intrinsic ABI is an implementation detail
//~^ ERROR intrinsic must be in
extern "rust-intrinsic" fn f2() {} //~ ERROR intrinsics are subject to change
extern "rust-intrinsic" fn f2() {} //~ ERROR rust-intrinsic ABI is an implementation detail
//~^ ERROR intrinsic must be in
extern "rust-call" fn f4(_: ()) {} //~ ERROR rust-call ABI is subject to change
extern "rust-call" fn f4(_: ()) {} //~ ERROR rust-call ABI is experimental and subject to change

// Methods in trait definition
trait Tr {
extern "rust-intrinsic" fn m1(); //~ ERROR intrinsics are subject to change
extern "rust-intrinsic" fn m1(); //~ ERROR rust-intrinsic ABI is an implementation detail
//~^ ERROR intrinsic must be in
extern "rust-intrinsic" fn m2(); //~ ERROR intrinsics are subject to change
extern "rust-intrinsic" fn m2(); //~ ERROR rust-intrinsic ABI is an implementation detail
//~^ ERROR intrinsic must be in
extern "rust-call" fn m4(_: ()); //~ ERROR rust-call ABI is subject to change
extern "rust-call" fn m4(_: ()); //~ ERROR rust-call ABI is experimental and subject to change

extern "rust-call" fn dm4(_: ()) {} //~ ERROR rust-call ABI is subject to change
extern "rust-call" fn dm4(_: ()) {} //~ ERROR rust-call ABI is experimental and subject to change
}

struct S;

// Methods in trait impl
impl Tr for S {
extern "rust-intrinsic" fn m1() {} //~ ERROR intrinsics are subject to change
extern "rust-intrinsic" fn m1() {} //~ ERROR rust-intrinsic ABI is an implementation detail
//~^ ERROR intrinsic must be in
extern "rust-intrinsic" fn m2() {} //~ ERROR intrinsics are subject to change
extern "rust-intrinsic" fn m2() {} //~ ERROR rust-intrinsic ABI is an implementation detail
//~^ ERROR intrinsic must be in
extern "rust-call" fn m4(_: ()) {} //~ ERROR rust-call ABI is subject to change
extern "rust-call" fn m4(_: ()) {} //~ ERROR rust-call ABI is experimental and subject to change
}

// Methods in inherent impl
impl S {
extern "rust-intrinsic" fn im1() {} //~ ERROR intrinsics are subject to change
extern "rust-intrinsic" fn im1() {} //~ ERROR rust-intrinsic ABI is an implementation detail
//~^ ERROR intrinsic must be in
extern "rust-intrinsic" fn im2() {} //~ ERROR intrinsics are subject to change
extern "rust-intrinsic" fn im2() {} //~ ERROR rust-intrinsic ABI is an implementation detail
//~^ ERROR intrinsic must be in
extern "rust-call" fn im4(_: ()) {} //~ ERROR rust-call ABI is subject to change
extern "rust-call" fn im4(_: ()) {} //~ ERROR rust-call ABI is experimental and subject to change
}

// Function pointer types
type A1 = extern "rust-intrinsic" fn(); //~ ERROR intrinsics are subject to change
type A2 = extern "rust-intrinsic" fn(); //~ ERROR intrinsics are subject to change
type A4 = extern "rust-call" fn(_: ()); //~ ERROR rust-call ABI is subject to change
type A1 = extern "rust-intrinsic" fn(); //~ ERROR rust-intrinsic ABI is an implementation detail
type A2 = extern "rust-intrinsic" fn(); //~ ERROR rust-intrinsic ABI is an implementation detail
type A4 = extern "rust-call" fn(_: ()); //~ ERROR rust-call ABI is experimental and subject to change

// Foreign modules
extern "rust-intrinsic" {} //~ ERROR intrinsics are subject to change
extern "rust-intrinsic" {} //~ ERROR intrinsics are subject to change
extern "rust-call" {} //~ ERROR rust-call ABI is subject to change
extern "rust-intrinsic" {} //~ ERROR rust-intrinsic ABI is an implementation detail
extern "rust-intrinsic" {} //~ ERROR rust-intrinsic ABI is an implementation detail
extern "rust-call" {} //~ ERROR rust-call ABI is experimental and subject to change
Loading

0 comments on commit 4e4fa2a

Please # to comment.