Skip to content

Commit de492a3

Browse files
committed
Update tests
1 parent 723aee2 commit de492a3

26 files changed

+36
-230
lines changed

tests/run-make/c-unwind-abi-catch-lib-panic/main.rs

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
//!
33
//! This test triggers a panic in a Rust library that our foreign function invokes. This shows
44
//! that we can unwind through the C code in that library, and catch the underlying panic.
5-
#![feature(c_unwind)]
65
76
use std::panic::{catch_unwind, AssertUnwindSafe};
87

tests/run-make/c-unwind-abi-catch-lib-panic/panic.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#![crate_type = "staticlib"]
2-
#![feature(c_unwind)]
32

43
/// This function will panic if `x` is greater than 10.
54
///

tests/run-make/c-unwind-abi-catch-panic/main.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//! A test for calling `C-unwind` functions across foreign function boundaries.
22
//!
33
//! This test triggers a panic when calling a foreign function that calls *back* into Rust.
4-
#![feature(c_unwind)]
54
65
use std::panic::{catch_unwind, AssertUnwindSafe};
76

tests/run-make/foreign-double-unwind/foo.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Tests that C++ double unwinding through Rust code will be properly guarded
22
// against instead of exhibiting undefined behaviour.
33

4-
#![feature(c_unwind)]
5-
64
extern "C-unwind" {
75
fn throw_cxx_exception();
86
fn cxx_catch_callback(cb: extern "C-unwind" fn());

tests/run-make/foreign-exceptions/foo.rs

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// are caught by catch_unwind. Also tests that Rust panics can unwind through
33
// C++ code.
44

5-
#![feature(c_unwind)]
6-
75
use std::panic::{catch_unwind, AssertUnwindSafe};
86

97
struct DropCheck<'a>(&'a mut bool);

tests/run-make/foreign-rust-exceptions/bar.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#![crate_type = "cdylib"]
2-
#![feature(c_unwind)]
32

43
#[no_mangle]
54
extern "C-unwind" fn panic() {

tests/run-make/foreign-rust-exceptions/foo.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![feature(c_unwind)]
2-
31
#[cfg_attr(not(windows), link(name = "bar"))]
42
#[cfg_attr(windows, link(name = "bar.dll"))]
53
extern "C-unwind" {

tests/rustdoc-json/fn_pointer/abi.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// ignore-tidy-linelength
22

33
#![feature(abi_vectorcall)]
4-
#![feature(c_unwind)]
54

65
// @is "$.index[*][?(@.name=='AbiRust')].inner.type.inner.header.abi" \"Rust\"
76
pub type AbiRust = fn();

tests/rustdoc-json/fns/abi.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// ignore-tidy-linelength
22

33
#![feature(abi_vectorcall)]
4-
#![feature(c_unwind)]
54

65
// @is "$.index[*][?(@.name=='abi_rust')].inner.header.abi" \"Rust\"
76
pub fn abi_rust() {}

tests/rustdoc-json/methods/abi.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// ignore-tidy-linelength
22

33
#![feature(abi_vectorcall)]
4-
#![feature(c_unwind)]
54
#![feature(no_core)]
65
#![no_core]
76

tests/ui/unwind-abis/feature-gate-thiscall-unwind.rs renamed to tests/ui/feature-gates/feature-gate-thiscall.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
// gate-test-abi_thiscall
2-
// gate-test-c_unwind
32
// needs-llvm-components: x86
43
// compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib
54
#![no_core]
65
#![feature(no_core, lang_items)]
76
#[lang="sized"]
87
trait Sized { }
98

10-
// Test that the "thiscall-unwind" ABI is feature-gated, and cannot be used when
11-
// the `c_unwind` feature gate is not used.
9+
// Test that the "thiscall" ABI is feature-gated, and cannot be used when
10+
// the `abi_thiscall` feature gate is not used.
1211

1312
extern "thiscall-unwind" fn fu() {} //~ ERROR thiscall-unwind ABI is experimental
1413
extern "thiscall" fn f() {} //~ ERROR thiscall is experimental

tests/ui/unwind-abis/feature-gate-thiscall-unwind.stderr renamed to tests/ui/feature-gates/feature-gate-thiscall.stderr

+21-28
Original file line numberDiff line numberDiff line change
@@ -1,121 +1,114 @@
11
error[E0658]: thiscall-unwind ABI is experimental and subject to change
2-
--> $DIR/feature-gate-thiscall-unwind.rs:13:8
2+
--> $DIR/feature-gate-thiscall.rs:12:8
33
|
44
LL | extern "thiscall-unwind" fn fu() {}
55
| ^^^^^^^^^^^^^^^^^
66
|
7-
= note: see issue #74990 <https://github.com/rust-lang/rust/issues/74990> for more information
8-
= help: add `#![feature(c_unwind)]` to the crate attributes to enable
7+
= help: add `#![feature(abi_thiscall)]` to the crate attributes to enable
98

109
error[E0658]: thiscall is experimental and subject to change
11-
--> $DIR/feature-gate-thiscall-unwind.rs:14:8
10+
--> $DIR/feature-gate-thiscall.rs:13:8
1211
|
1312
LL | extern "thiscall" fn f() {}
1413
| ^^^^^^^^^^
1514
|
1615
= help: add `#![feature(abi_thiscall)]` to the crate attributes to enable
1716

1817
error[E0658]: thiscall is experimental and subject to change
19-
--> $DIR/feature-gate-thiscall-unwind.rs:17:12
18+
--> $DIR/feature-gate-thiscall.rs:16:12
2019
|
2120
LL | extern "thiscall" fn m();
2221
| ^^^^^^^^^^
2322
|
2423
= help: add `#![feature(abi_thiscall)]` to the crate attributes to enable
2524

2625
error[E0658]: thiscall-unwind ABI is experimental and subject to change
27-
--> $DIR/feature-gate-thiscall-unwind.rs:18:12
26+
--> $DIR/feature-gate-thiscall.rs:17:12
2827
|
2928
LL | extern "thiscall-unwind" fn mu();
3029
| ^^^^^^^^^^^^^^^^^
3130
|
32-
= note: see issue #74990 <https://github.com/rust-lang/rust/issues/74990> for more information
33-
= help: add `#![feature(c_unwind)]` to the crate attributes to enable
31+
= help: add `#![feature(abi_thiscall)]` to the crate attributes to enable
3432

3533
error[E0658]: thiscall is experimental and subject to change
36-
--> $DIR/feature-gate-thiscall-unwind.rs:20:12
34+
--> $DIR/feature-gate-thiscall.rs:19:12
3735
|
3836
LL | extern "thiscall" fn dm() {}
3937
| ^^^^^^^^^^
4038
|
4139
= help: add `#![feature(abi_thiscall)]` to the crate attributes to enable
4240

4341
error[E0658]: thiscall-unwind ABI is experimental and subject to change
44-
--> $DIR/feature-gate-thiscall-unwind.rs:21:12
42+
--> $DIR/feature-gate-thiscall.rs:20:12
4543
|
4644
LL | extern "thiscall-unwind" fn dmu() {}
4745
| ^^^^^^^^^^^^^^^^^
4846
|
49-
= note: see issue #74990 <https://github.com/rust-lang/rust/issues/74990> for more information
50-
= help: add `#![feature(c_unwind)]` to the crate attributes to enable
47+
= help: add `#![feature(abi_thiscall)]` to the crate attributes to enable
5148

5249
error[E0658]: thiscall is experimental and subject to change
53-
--> $DIR/feature-gate-thiscall-unwind.rs:26:12
50+
--> $DIR/feature-gate-thiscall.rs:25:12
5451
|
5552
LL | extern "thiscall" fn m() {}
5653
| ^^^^^^^^^^
5754
|
5855
= help: add `#![feature(abi_thiscall)]` to the crate attributes to enable
5956

6057
error[E0658]: thiscall-unwind ABI is experimental and subject to change
61-
--> $DIR/feature-gate-thiscall-unwind.rs:27:12
58+
--> $DIR/feature-gate-thiscall.rs:26:12
6259
|
6360
LL | extern "thiscall-unwind" fn mu() {}
6461
| ^^^^^^^^^^^^^^^^^
6562
|
66-
= note: see issue #74990 <https://github.com/rust-lang/rust/issues/74990> for more information
67-
= help: add `#![feature(c_unwind)]` to the crate attributes to enable
63+
= help: add `#![feature(abi_thiscall)]` to the crate attributes to enable
6864

6965
error[E0658]: thiscall is experimental and subject to change
70-
--> $DIR/feature-gate-thiscall-unwind.rs:31:12
66+
--> $DIR/feature-gate-thiscall.rs:30:12
7167
|
7268
LL | extern "thiscall" fn im() {}
7369
| ^^^^^^^^^^
7470
|
7571
= help: add `#![feature(abi_thiscall)]` to the crate attributes to enable
7672

7773
error[E0658]: thiscall-unwind ABI is experimental and subject to change
78-
--> $DIR/feature-gate-thiscall-unwind.rs:32:12
74+
--> $DIR/feature-gate-thiscall.rs:31:12
7975
|
8076
LL | extern "thiscall-unwind" fn imu() {}
8177
| ^^^^^^^^^^^^^^^^^
8278
|
83-
= note: see issue #74990 <https://github.com/rust-lang/rust/issues/74990> for more information
84-
= help: add `#![feature(c_unwind)]` to the crate attributes to enable
79+
= help: add `#![feature(abi_thiscall)]` to the crate attributes to enable
8580

8681
error[E0658]: thiscall is experimental and subject to change
87-
--> $DIR/feature-gate-thiscall-unwind.rs:35:18
82+
--> $DIR/feature-gate-thiscall.rs:34:18
8883
|
8984
LL | type TA = extern "thiscall" fn();
9085
| ^^^^^^^^^^
9186
|
9287
= help: add `#![feature(abi_thiscall)]` to the crate attributes to enable
9388

9489
error[E0658]: thiscall-unwind ABI is experimental and subject to change
95-
--> $DIR/feature-gate-thiscall-unwind.rs:36:19
90+
--> $DIR/feature-gate-thiscall.rs:35:19
9691
|
9792
LL | type TAU = extern "thiscall-unwind" fn();
9893
| ^^^^^^^^^^^^^^^^^
9994
|
100-
= note: see issue #74990 <https://github.com/rust-lang/rust/issues/74990> for more information
101-
= help: add `#![feature(c_unwind)]` to the crate attributes to enable
95+
= help: add `#![feature(abi_thiscall)]` to the crate attributes to enable
10296

10397
error[E0658]: thiscall is experimental and subject to change
104-
--> $DIR/feature-gate-thiscall-unwind.rs:38:8
98+
--> $DIR/feature-gate-thiscall.rs:37:8
10599
|
106100
LL | extern "thiscall" {}
107101
| ^^^^^^^^^^
108102
|
109103
= help: add `#![feature(abi_thiscall)]` to the crate attributes to enable
110104

111105
error[E0658]: thiscall-unwind ABI is experimental and subject to change
112-
--> $DIR/feature-gate-thiscall-unwind.rs:39:8
106+
--> $DIR/feature-gate-thiscall.rs:38:8
113107
|
114108
LL | extern "thiscall-unwind" {}
115109
| ^^^^^^^^^^^^^^^^^
116110
|
117-
= note: see issue #74990 <https://github.com/rust-lang/rust/issues/74990> for more information
118-
= help: add `#![feature(c_unwind)]` to the crate attributes to enable
111+
= help: add `#![feature(abi_thiscall)]` to the crate attributes to enable
119112

120113
error: aborting due to 14 previous errors
121114

tests/ui/feature-gates/feature-gate-vectorcall.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
#[lang="sized"]
77
trait Sized { }
88

9-
// Test that the "vectorcall-unwind" ABI is feature-gated, and cannot be used when
10-
// the `c_unwind` feature gate is not used.
9+
// Test that the "vectorcall" ABI is feature-gated, and cannot be used when
10+
// the `vectorcall` feature gate is not used.
1111

1212
extern "vectorcall" fn f() {} //~ ERROR vectorcall is experimental
1313

tests/ui/panic-runtime/auxiliary/needs-unwind.rs

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
#![crate_type = "rlib"]
55
#![no_std]
6-
#![feature(c_unwind)]
76

87
extern "C-unwind" fn foo() {}
98

tests/ui/stability-attribute/stability-attribute-trait-impl.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(staged_api, never_type, c_unwind)]
1+
#![feature(staged_api, never_type, rust_cold_cc)]
22
//~^ ERROR module has missing stability attribute
33

44
#[stable(feature = "a", since = "1")]
@@ -25,9 +25,9 @@ impl UnstableTrait for StableType {}
2525
#[unstable(feature = "h", issue = "none")]
2626
impl StableTrait for ! {}
2727

28-
// Note: If C-unwind is stabilized, switch this to another (unstable) ABI.
28+
// Note: If rust_cold_cc is stabilized, switch this to another (unstable) ABI.
2929
#[unstable(feature = "i", issue = "none")]
30-
impl StableTrait for extern "C-unwind" fn() {}
30+
impl StableTrait for extern "rust-cold" fn() {}
3131

3232
#[unstable(feature = "j", issue = "none")]
3333
//~^ ERROR an `#[unstable]` annotation here has no effect [ineffective_unstable_trait_impl]

tests/ui/stability-attribute/stability-attribute-trait-impl.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ LL | #[unstable(feature = "k", issue = "none")]
1818
error: module has missing stability attribute
1919
--> $DIR/stability-attribute-trait-impl.rs:1:1
2020
|
21-
LL | / #![feature(staged_api, never_type, c_unwind)]
21+
LL | / #![feature(staged_api, never_type, rust_cold_cc)]
2222
LL | |
2323
LL | |
2424
LL | | #[stable(feature = "a", since = "1")]

tests/ui/unwind-abis/feature-gate-c-unwind-enabled.rs

-12
This file was deleted.

tests/ui/unwind-abis/feature-gate-c-unwind.rs

-13
This file was deleted.

tests/ui/unwind-abis/feature-gate-c-unwind.stderr

-33
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// ignore-test
2+
3+
// After partial stabilisation, `c_unwind` only contains codegen behaviour changes
4+
// and are tested in `src/test/codegen/unwind-abis`

tests/ui/unwind-abis/feature-gate-stdcall-unwind.rs

-30
This file was deleted.

0 commit comments

Comments
 (0)