Skip to content

Commit 6dba3e6

Browse files
committed
Migrate even more feature gate tests to ui
We also rename some of the files to conform to the feature-gate-<feat_name>.rs pattern that is most common.
1 parent 38438c6 commit 6dba3e6

File tree

71 files changed

+1012
-71
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+1012
-71
lines changed

src/test/compile-fail/no-core-gated.rs

Lines changed: 0 additions & 15 deletions
This file was deleted.

src/test/compile-fail/unadjusted-unstable.rs renamed to src/test/ui/feature-gate-abi_unadjusted.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// gate-test-abi_unadjusted
12-
1311
extern "unadjusted" fn foo() {
1412
//~^ ERROR: unadjusted ABI is an implementation detail and perma-unstable
1513
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
error: unadjusted ABI is an implementation detail and perma-unstable
2+
--> $DIR/feature-gate-abi_unadjusted.rs:11:1
3+
|
4+
11 | / extern "unadjusted" fn foo() {
5+
12 | | //~^ ERROR: unadjusted ABI is an implementation detail and perma-unstable
6+
13 | | }
7+
| |_^
8+
|
9+
= help: add #![feature(abi_unadjusted)] to the crate attributes to enable
10+
11+
error: aborting due to previous error
12+

src/test/compile-fail/asm-gated.rs renamed to src/test/ui/feature-gate-asm.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// gate-test-asm
12-
1311
fn main() {
1412
unsafe {
1513
asm!(""); //~ ERROR inline assembly is not stable enough

src/test/ui/feature-gate-asm.stderr

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
error: inline assembly is not stable enough for use and is subject to change (see issue #29722)
2+
--> $DIR/feature-gate-asm.rs:13:9
3+
|
4+
13 | asm!(""); //~ ERROR inline assembly is not stable enough
5+
| ^^^^^^^^^
6+
|
7+
= help: add #![feature(asm)] to the crate attributes to enable
8+
9+
error: aborting due to previous error
10+

src/test/ui/feature-gate-asm2.stderr

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
error: inline assembly is not stable enough for use and is subject to change (see issue #29722)
2+
--> $DIR/feature-gate-asm2.rs:15:24
3+
|
4+
15 | println!("{}", asm!("")); //~ ERROR inline assembly is not stable
5+
| ^^^^^^^^
6+
|
7+
= help: add #![feature(asm)] to the crate attributes to enable
8+
9+
error: aborting due to previous error
10+

src/test/ui/feature-gate-box-pat.rs renamed to src/test/ui/feature-gate-box_patterns.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// gate-test-box_patterns
12-
1311
fn main() {
1412
let box x = Box::new('c'); //~ ERROR box pattern syntax is experimental
1513
println!("x: {}", x);

src/test/ui/feature-gate-box-pat.stderr renamed to src/test/ui/feature-gate-box_patterns.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
error: box pattern syntax is experimental (see issue #29641)
2-
--> $DIR/feature-gate-box-pat.rs:14:9
2+
--> $DIR/feature-gate-box_patterns.rs:12:9
33
|
4-
14 | let box x = Box::new('c'); //~ ERROR box pattern syntax is experimental
4+
12 | let box x = Box::new('c'); //~ ERROR box pattern syntax is experimental
55
| ^^^^^
66
|
77
= help: add #![feature(box_patterns)] to the crate attributes to enable

src/test/compile-fail/gated-box-syntax.rs renamed to src/test/ui/feature-gate-box_syntax.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010

1111
// Test that the use of the box syntax is gated by `box_syntax` feature gate.
1212

13-
// gate-test-box_syntax
14-
1513
fn main() {
1614
let x = box 3;
1715
//~^ ERROR box expression syntax is experimental; you can call `Box::new` instead.

0 commit comments

Comments
 (0)