-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
71 changed files
with
1,012 additions
and
71 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
error: unadjusted ABI is an implementation detail and perma-unstable | ||
--> $DIR/feature-gate-abi_unadjusted.rs:11:1 | ||
| | ||
11 | / extern "unadjusted" fn foo() { | ||
12 | | //~^ ERROR: unadjusted ABI is an implementation detail and perma-unstable | ||
13 | | } | ||
| |_^ | ||
| | ||
= help: add #![feature(abi_unadjusted)] to the crate attributes to enable | ||
|
||
error: aborting due to previous error | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
error: inline assembly is not stable enough for use and is subject to change (see issue #29722) | ||
--> $DIR/feature-gate-asm.rs:13:9 | ||
| | ||
13 | asm!(""); //~ ERROR inline assembly is not stable enough | ||
| ^^^^^^^^^ | ||
| | ||
= help: add #![feature(asm)] to the crate attributes to enable | ||
|
||
error: aborting due to previous error | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
error: inline assembly is not stable enough for use and is subject to change (see issue #29722) | ||
--> $DIR/feature-gate-asm2.rs:15:24 | ||
| | ||
15 | println!("{}", asm!("")); //~ ERROR inline assembly is not stable | ||
| ^^^^^^^^ | ||
| | ||
= help: add #![feature(asm)] to the crate attributes to enable | ||
|
||
error: aborting due to previous error | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/test/ui/feature-gate-box-pat.stderr → src/test/ui/feature-gate-box_patterns.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
error: box expression syntax is experimental; you can call `Box::new` instead. (see issue #27779) | ||
--> $DIR/feature-gate-box_syntax.rs:14:13 | ||
| | ||
14 | let x = box 3; | ||
| ^^^^^ | ||
| | ||
= help: add #![feature(box_syntax)] to the crate attributes to enable | ||
|
||
error: aborting due to previous error | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
error: `concat_idents` is not stable enough for use and is subject to change (see issue #29599) | ||
--> $DIR/feature-gate-concat_idents.rs:15:13 | ||
| | ||
15 | let a = concat_idents!(X, Y_1); //~ ERROR `concat_idents` is not stable | ||
| ^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= help: add #![feature(concat_idents)] to the crate attributes to enable | ||
|
||
error: `concat_idents` is not stable enough for use and is subject to change (see issue #29599) | ||
--> $DIR/feature-gate-concat_idents.rs:16:13 | ||
| | ||
16 | let b = concat_idents!(X, Y_2); //~ ERROR `concat_idents` is not stable | ||
| ^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= help: add #![feature(concat_idents)] to the crate attributes to enable | ||
|
||
error: aborting due to 2 previous errors | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
error: `concat_idents` is not stable enough for use and is subject to change (see issue #29599) | ||
--> $DIR/feature-gate-concat_idents2.rs:14:5 | ||
| | ||
14 | concat_idents!(a, b); //~ ERROR `concat_idents` is not stable enough | ||
| ^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= help: add #![feature(concat_idents)] to the crate attributes to enable | ||
|
||
error: aborting due to previous error | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
error: `concat_idents` is not stable enough for use and is subject to change (see issue #29599) | ||
--> $DIR/feature-gate-concat_idents3.rs:17:20 | ||
| | ||
17 | assert_eq!(10, concat_idents!(X, Y_1)); //~ ERROR `concat_idents` is not stable | ||
| ^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= help: add #![feature(concat_idents)] to the crate attributes to enable | ||
|
||
error: `concat_idents` is not stable enough for use and is subject to change (see issue #29599) | ||
--> $DIR/feature-gate-concat_idents3.rs:18:20 | ||
| | ||
18 | assert_eq!(20, concat_idents!(X, Y_2)); //~ ERROR `concat_idents` is not stable | ||
| ^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= help: add #![feature(concat_idents)] to the crate attributes to enable | ||
|
||
error: aborting due to 2 previous errors | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
error: `impl Trait` in return position is experimental (see issue #34511) | ||
--> $DIR/feature-gate-conservative_impl_trait.rs:11:13 | ||
| | ||
11 | fn foo() -> impl Fn() { || {} } | ||
| ^^^^^^^^^ | ||
| | ||
= help: add #![feature(conservative_impl_trait)] to the crate attributes to enable | ||
|
||
error: aborting due to previous error | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
error[E0379]: trait fns cannot be declared const | ||
--> $DIR/feature-gate-const_fn.rs:16:5 | ||
| | ||
16 | const fn foo() -> u32; //~ ERROR const fn is unstable | ||
| ^^^^^ trait fns cannot be const | ||
|
||
error[E0379]: trait fns cannot be declared const | ||
--> $DIR/feature-gate-const_fn.rs:18:5 | ||
| | ||
18 | const fn bar() -> u32 { 0 } //~ ERROR const fn is unstable | ||
| ^^^^^ trait fns cannot be const | ||
|
||
error[E0379]: trait fns cannot be declared const | ||
--> $DIR/feature-gate-const_fn.rs:27:5 | ||
| | ||
27 | const fn foo() -> u32 { 0 } //~ ERROR const fn is unstable | ||
| ^^^^^ trait fns cannot be const | ||
|
||
error: const fn is unstable (see issue #24111) | ||
--> $DIR/feature-gate-const_fn.rs:13:1 | ||
| | ||
13 | const fn foo() -> usize { 0 } //~ ERROR const fn is unstable | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= help: add #![feature(const_fn)] to the crate attributes to enable | ||
|
||
error: const fn is unstable (see issue #24111) | ||
--> $DIR/feature-gate-const_fn.rs:16:5 | ||
| | ||
16 | const fn foo() -> u32; //~ ERROR const fn is unstable | ||
| ^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= help: add #![feature(const_fn)] to the crate attributes to enable | ||
|
||
error: const fn is unstable (see issue #24111) | ||
--> $DIR/feature-gate-const_fn.rs:18:5 | ||
| | ||
18 | const fn bar() -> u32 { 0 } //~ ERROR const fn is unstable | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= help: add #![feature(const_fn)] to the crate attributes to enable | ||
|
||
error: const fn is unstable (see issue #24111) | ||
--> $DIR/feature-gate-const_fn.rs:23:5 | ||
| | ||
23 | const fn baz() -> u32 { 0 } //~ ERROR const fn is unstable | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= help: add #![feature(const_fn)] to the crate attributes to enable | ||
|
||
error: const fn is unstable (see issue #24111) | ||
--> $DIR/feature-gate-const_fn.rs:27:5 | ||
| | ||
27 | const fn foo() -> u32 { 0 } //~ ERROR const fn is unstable | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= help: add #![feature(const_fn)] to the crate attributes to enable | ||
|
||
error: aborting due to 8 previous errors | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) | ||
--> $DIR/feature-gate-custom_attribute.rs:17:1 | ||
| | ||
17 | #[fake_attr] //~ ERROR attribute `fake_attr` is currently unknown | ||
| ^^^^^^^^^^^^ | ||
| | ||
= help: add #![feature(custom_attribute)] to the crate attributes to enable | ||
|
||
error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) | ||
--> $DIR/feature-gate-custom_attribute.rs:18:1 | ||
| | ||
18 | #[fake_attr(100)] //~ ERROR attribute `fake_attr` is currently unknown | ||
| ^^^^^^^^^^^^^^^^^ | ||
| | ||
= help: add #![feature(custom_attribute)] to the crate attributes to enable | ||
|
||
error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) | ||
--> $DIR/feature-gate-custom_attribute.rs:19:1 | ||
| | ||
19 | #[fake_attr(1, 2, 3)] //~ ERROR attribute `fake_attr` is currently unknown | ||
| ^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= help: add #![feature(custom_attribute)] to the crate attributes to enable | ||
|
||
error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) | ||
--> $DIR/feature-gate-custom_attribute.rs:20:1 | ||
| | ||
20 | #[fake_attr("hello")] //~ ERROR attribute `fake_attr` is currently unknown | ||
| ^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= help: add #![feature(custom_attribute)] to the crate attributes to enable | ||
|
||
error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) | ||
--> $DIR/feature-gate-custom_attribute.rs:21:1 | ||
| | ||
21 | #[fake_attr(name = "hello")] //~ ERROR attribute `fake_attr` is currently unknown | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= help: add #![feature(custom_attribute)] to the crate attributes to enable | ||
|
||
error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) | ||
--> $DIR/feature-gate-custom_attribute.rs:22:1 | ||
| | ||
22 | #[fake_attr(1, "hi", key = 12, true, false)] //~ ERROR attribute `fake_attr` is currently unknown | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= help: add #![feature(custom_attribute)] to the crate attributes to enable | ||
|
||
error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) | ||
--> $DIR/feature-gate-custom_attribute.rs:23:1 | ||
| | ||
23 | #[fake_attr(key = "hello", val = 10)] //~ ERROR attribute `fake_attr` is currently unknown | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= help: add #![feature(custom_attribute)] to the crate attributes to enable | ||
|
||
error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) | ||
--> $DIR/feature-gate-custom_attribute.rs:24:1 | ||
| | ||
24 | #[fake_attr(key("hello"), val(10))] //~ ERROR attribute `fake_attr` is currently unknown | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= help: add #![feature(custom_attribute)] to the crate attributes to enable | ||
|
||
error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) | ||
--> $DIR/feature-gate-custom_attribute.rs:25:1 | ||
| | ||
25 | #[fake_attr(enabled = true, disabled = false)] //~ ERROR attribute `fake_attr` is currently unknown | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= help: add #![feature(custom_attribute)] to the crate attributes to enable | ||
|
||
error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) | ||
--> $DIR/feature-gate-custom_attribute.rs:26:1 | ||
| | ||
26 | #[fake_attr(true)] //~ ERROR attribute `fake_attr` is currently unknown | ||
| ^^^^^^^^^^^^^^^^^^ | ||
| | ||
= help: add #![feature(custom_attribute)] to the crate attributes to enable | ||
|
||
error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) | ||
--> $DIR/feature-gate-custom_attribute.rs:27:1 | ||
| | ||
27 | #[fake_attr(pi = 3.14159)] //~ ERROR attribute `fake_attr` is currently unknown | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= help: add #![feature(custom_attribute)] to the crate attributes to enable | ||
|
||
error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) | ||
--> $DIR/feature-gate-custom_attribute.rs:28:1 | ||
| | ||
28 | #[fake_attr(b"hi")] //~ ERROR attribute `fake_attr` is currently unknown | ||
| ^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= help: add #![feature(custom_attribute)] to the crate attributes to enable | ||
|
||
error: The attribute `fake_doc` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) | ||
--> $DIR/feature-gate-custom_attribute.rs:29:1 | ||
| | ||
29 | #[fake_doc(r"doc")] //~ ERROR attribute `fake_doc` is currently unknown | ||
| ^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= help: add #![feature(custom_attribute)] to the crate attributes to enable | ||
|
||
error: aborting due to 13 previous errors | ||
|
File renamed without changes.
Oops, something went wrong.