Skip to content

Commit 38438c6

Browse files
committed
Migrate a few feature gate tests to ui
Renames only in this commit, and obviously .stderr file additions.
1 parent 8ba9f9e commit 38438c6

File tree

207 files changed

+3518
-0
lines changed

Some content is hidden

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

207 files changed

+3518
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
error: msp430-interrupt ABI is experimental and subject to change (see issue #38487)
2+
--> $DIR/feature-gate-abi-msp430-interrupt.rs:14:1
3+
|
4+
14 | extern "msp430-interrupt" fn foo() {}
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6+
|
7+
= help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable
8+
9+
error: aborting due to previous error
10+

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

+450
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
error: multiple-element slice matches anywhere but at the end of a slice (e.g. `[0, ..xs, 0]`) are experimental (see issue #23121)
2+
--> $DIR/feature-gate-advanced-slice-features.rs:18:9
3+
|
4+
18 | [ xs.., 4, 5 ] => {} //~ ERROR multiple-element slice matches
5+
| ^^^^^^^^^^^^^^
6+
|
7+
= help: add #![feature(advanced_slice_patterns)] to the crate attributes to enable
8+
9+
error: multiple-element slice matches anywhere but at the end of a slice (e.g. `[0, ..xs, 0]`) are experimental (see issue #23121)
10+
--> $DIR/feature-gate-advanced-slice-features.rs:19:9
11+
|
12+
19 | [ 1, xs.., 5 ] => {} //~ ERROR multiple-element slice matches
13+
| ^^^^^^^^^^^^^^
14+
|
15+
= help: add #![feature(advanced_slice_patterns)] to the crate attributes to enable
16+
17+
error: aborting due to 2 previous errors
18+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
error: the `#[default_lib_allocator]` attribute is an experimental feature
2+
--> $DIR/feature-gate-allocator_internals.rs:11:1
3+
|
4+
11 | #![default_lib_allocator] //~ ERROR: attribute is an experimental feature
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^
6+
|
7+
= help: add #![feature(allocator_internals)] to the crate attributes to enable
8+
9+
error: aborting due to previous error
10+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
error: allow_internal_unsafe side-steps the unsafe_code lint
2+
--> $DIR/feature-gate-allow-internal-unsafe-nested-macro.rs:18:9
3+
|
4+
18 | #[allow_internal_unsafe] //~ ERROR allow_internal_unsafe side-steps
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^
6+
...
7+
25 | bar!();
8+
| ------- in this macro invocation
9+
|
10+
= help: add #![feature(allow_internal_unsafe)] to the crate attributes to enable
11+
12+
error: aborting due to previous error
13+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
error: allow_internal_unstable side-steps feature gating and stability checks
2+
--> $DIR/feature-gate-allow-internal-unstable-nested-macro.rs:18:9
3+
|
4+
18 | #[allow_internal_unstable] //~ ERROR allow_internal_unstable side-steps
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
6+
...
7+
25 | bar!();
8+
| ------- in this macro invocation
9+
|
10+
= help: add #![feature(allow_internal_unstable)] to the crate attributes to enable
11+
12+
error: aborting due to previous error
13+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
error: allow_internal_unstable side-steps feature gating and stability checks
2+
--> $DIR/feature-gate-allow-internal-unstable-struct.rs:14:1
3+
|
4+
14 | #[allow_internal_unstable] //~ ERROR allow_internal_unstable side-steps
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
6+
|
7+
= help: add #![feature(allow_internal_unstable)] to the crate attributes to enable
8+
9+
error: aborting due to previous error
10+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
error: allow_internal_unstable side-steps feature gating and stability checks
2+
--> $DIR/feature-gate-allow-internal-unstable.rs:13:1
3+
|
4+
13 | #[allow_internal_unstable] //~ ERROR allow_internal_unstable side-steps
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
6+
|
7+
= help: add #![feature(allow_internal_unstable)] to the crate attributes to enable
8+
9+
error: aborting due to previous error
10+
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
error: allow_fail attribute is currently unstable (see issue #42219)
2+
--> $DIR/feature-gate-allow_fail.rs:13:1
3+
|
4+
13 | #[allow_fail] //~ ERROR allow_fail attribute is currently unstable
5+
| ^^^^^^^^^^^^^
6+
|
7+
= help: add #![feature(allow_fail)] to the crate attributes to enable
8+
9+
error: aborting due to previous error
10+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
error: arbitrary `self` types are unstable (see issue #44874)
2+
--> $DIR/feature-gate-arbitrary-self-types.rs:14:18
3+
|
4+
14 | fn foo(self: Rc<Box<Self>>); //~ ERROR arbitrary `self` types are unstable
5+
| ^^^^^^^^^^^^^
6+
|
7+
= help: add #![feature(arbitrary_self_types)] to the crate attributes to enable
8+
= help: consider changing to `self`, `&self`, `&mut self`, or `self: Box<Self>`
9+
10+
error: arbitrary `self` types are unstable (see issue #44874)
11+
--> $DIR/feature-gate-arbitrary-self-types.rs:20:18
12+
|
13+
20 | fn foo(self: Rc<Box<Self>>) {} //~ ERROR arbitrary `self` types are unstable
14+
| ^^^^^^^^^^^^^
15+
|
16+
= help: add #![feature(arbitrary_self_types)] to the crate attributes to enable
17+
= help: consider changing to `self`, `&self`, `&mut self`, or `self: Box<Self>`
18+
19+
error: arbitrary `self` types are unstable (see issue #44874)
20+
--> $DIR/feature-gate-arbitrary-self-types.rs:24:18
21+
|
22+
24 | fn bar(self: Box<Rc<Self>>) {} //~ ERROR arbitrary `self` types are unstable
23+
| ^^^^^^^^^^^^^
24+
|
25+
= help: add #![feature(arbitrary_self_types)] to the crate attributes to enable
26+
= help: consider changing to `self`, `&self`, `&mut self`, or `self: Box<Self>`
27+
28+
error: aborting due to 3 previous errors
29+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
error: associated type defaults are unstable (see issue #29661)
2+
--> $DIR/feature-gate-assoc-type-defaults.rs:14:5
3+
|
4+
14 | type Bar = u8; //~ ERROR associated type defaults are unstable
5+
| ^^^^^^^^^^^^^^
6+
|
7+
= help: add #![feature(associated_type_defaults)] to the crate attributes to enable
8+
9+
error: aborting due to previous error
10+
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
error: box expression syntax is experimental; you can call `Box::new` instead. (see issue #27779)
2+
--> $DIR/feature-gate-box-expr.rs:22:13
3+
|
4+
22 | let x = box 'c'; //~ ERROR box expression syntax is experimental
5+
| ^^^^^^^
6+
|
7+
= help: add #![feature(box_syntax)] to the crate attributes to enable
8+
9+
error: aborting due to previous error
10+
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
error: box pattern syntax is experimental (see issue #29641)
2+
--> $DIR/feature-gate-box-pat.rs:14:9
3+
|
4+
14 | let box x = Box::new('c'); //~ ERROR box pattern syntax is experimental
5+
| ^^^^^
6+
|
7+
= help: add #![feature(box_patterns)] to the crate attributes to enable
8+
9+
error: aborting due to previous error
10+
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
error: `catch` expression is experimental (see issue #31436)
2+
--> $DIR/feature-gate-catch_expr.rs:12:24
3+
|
4+
12 | let catch_result = do catch { //~ ERROR `catch` expression is experimental
5+
| ________________________^
6+
13 | | let x = 5;
7+
14 | | x
8+
15 | | };
9+
| |_____^
10+
|
11+
= help: add #![feature(catch_expr)] to the crate attributes to enable
12+
13+
error: aborting due to previous error
14+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
error: `cfg(target_feature)` is experimental and subject to change (see issue #29717)
2+
--> $DIR/feature-gate-cfg-target-feature.rs:12:12
3+
|
4+
12 | #[cfg_attr(target_feature = "x", x)] //~ ERROR `cfg(target_feature)` is experimental
5+
| ^^^^^^^^^^^^^^^^^^^^
6+
|
7+
= help: add #![feature(cfg_target_feature)] to the crate attributes to enable
8+
9+
error: `cfg(target_feature)` is experimental and subject to change (see issue #29717)
10+
--> $DIR/feature-gate-cfg-target-feature.rs:11:7
11+
|
12+
11 | #[cfg(target_feature = "x")] //~ ERROR `cfg(target_feature)` is experimental
13+
| ^^^^^^^^^^^^^^^^^^^^
14+
|
15+
= help: add #![feature(cfg_target_feature)] to the crate attributes to enable
16+
17+
error: `cfg(target_feature)` is experimental and subject to change (see issue #29717)
18+
--> $DIR/feature-gate-cfg-target-feature.rs:15:19
19+
|
20+
15 | #[cfg(not(any(all(target_feature = "x"))))] //~ ERROR `cfg(target_feature)` is experimental
21+
| ^^^^^^^^^^^^^^^^^^^^
22+
|
23+
= help: add #![feature(cfg_target_feature)] to the crate attributes to enable
24+
25+
error: `cfg(target_feature)` is experimental and subject to change (see issue #29717)
26+
--> $DIR/feature-gate-cfg-target-feature.rs:19:10
27+
|
28+
19 | cfg!(target_feature = "x");
29+
| ^^^^^^^^^^^^^^^^^^^^
30+
|
31+
= help: add #![feature(cfg_target_feature)] to the crate attributes to enable
32+
33+
error: aborting due to 4 previous errors
34+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
2+
--> $DIR/feature-gate-cfg-target-has-atomic.rs:23:7
3+
|
4+
23 | #[cfg(target_has_atomic = "8")]
5+
| ^^^^^^^^^^^^^^^^^^^^^^^
6+
|
7+
= help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable
8+
9+
error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
10+
--> $DIR/feature-gate-cfg-target-has-atomic.rs:29:7
11+
|
12+
29 | #[cfg(target_has_atomic = "8")]
13+
| ^^^^^^^^^^^^^^^^^^^^^^^
14+
|
15+
= help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable
16+
17+
error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
18+
--> $DIR/feature-gate-cfg-target-has-atomic.rs:34:7
19+
|
20+
34 | #[cfg(target_has_atomic = "16")]
21+
| ^^^^^^^^^^^^^^^^^^^^^^^^
22+
|
23+
= help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable
24+
25+
error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
26+
--> $DIR/feature-gate-cfg-target-has-atomic.rs:39:7
27+
|
28+
39 | #[cfg(target_has_atomic = "16")]
29+
| ^^^^^^^^^^^^^^^^^^^^^^^^
30+
|
31+
= help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable
32+
33+
error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
34+
--> $DIR/feature-gate-cfg-target-has-atomic.rs:44:7
35+
|
36+
44 | #[cfg(target_has_atomic = "32")]
37+
| ^^^^^^^^^^^^^^^^^^^^^^^^
38+
|
39+
= help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable
40+
41+
error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
42+
--> $DIR/feature-gate-cfg-target-has-atomic.rs:49:7
43+
|
44+
49 | #[cfg(target_has_atomic = "32")]
45+
| ^^^^^^^^^^^^^^^^^^^^^^^^
46+
|
47+
= help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable
48+
49+
error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
50+
--> $DIR/feature-gate-cfg-target-has-atomic.rs:54:7
51+
|
52+
54 | #[cfg(target_has_atomic = "64")]
53+
| ^^^^^^^^^^^^^^^^^^^^^^^^
54+
|
55+
= help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable
56+
57+
error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
58+
--> $DIR/feature-gate-cfg-target-has-atomic.rs:59:7
59+
|
60+
59 | #[cfg(target_has_atomic = "64")]
61+
| ^^^^^^^^^^^^^^^^^^^^^^^^
62+
|
63+
= help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable
64+
65+
error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
66+
--> $DIR/feature-gate-cfg-target-has-atomic.rs:64:7
67+
|
68+
64 | #[cfg(target_has_atomic = "ptr")]
69+
| ^^^^^^^^^^^^^^^^^^^^^^^^^
70+
|
71+
= help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable
72+
73+
error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
74+
--> $DIR/feature-gate-cfg-target-has-atomic.rs:69:7
75+
|
76+
69 | #[cfg(target_has_atomic = "ptr")]
77+
| ^^^^^^^^^^^^^^^^^^^^^^^^^
78+
|
79+
= help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable
80+
81+
error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
82+
--> $DIR/feature-gate-cfg-target-has-atomic.rs:76:10
83+
|
84+
76 | cfg!(target_has_atomic = "8");
85+
| ^^^^^^^^^^^^^^^^^^^^^^^
86+
|
87+
= help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable
88+
89+
error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
90+
--> $DIR/feature-gate-cfg-target-has-atomic.rs:78:10
91+
|
92+
78 | cfg!(target_has_atomic = "16");
93+
| ^^^^^^^^^^^^^^^^^^^^^^^^
94+
|
95+
= help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable
96+
97+
error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
98+
--> $DIR/feature-gate-cfg-target-has-atomic.rs:80:10
99+
|
100+
80 | cfg!(target_has_atomic = "32");
101+
| ^^^^^^^^^^^^^^^^^^^^^^^^
102+
|
103+
= help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable
104+
105+
error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
106+
--> $DIR/feature-gate-cfg-target-has-atomic.rs:82:10
107+
|
108+
82 | cfg!(target_has_atomic = "64");
109+
| ^^^^^^^^^^^^^^^^^^^^^^^^
110+
|
111+
= help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable
112+
113+
error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
114+
--> $DIR/feature-gate-cfg-target-has-atomic.rs:84:10
115+
|
116+
84 | cfg!(target_has_atomic = "ptr");
117+
| ^^^^^^^^^^^^^^^^^^^^^^^^^
118+
|
119+
= help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable
120+
121+
error: aborting due to 15 previous errors
122+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
error: `cfg(target_thread_local)` is experimental and subject to change (see issue #29594)
2+
--> $DIR/feature-gate-cfg-target-thread-local.rs:19:16
3+
|
4+
19 | #[cfg_attr(target_thread_local, thread_local)]
5+
| ^^^^^^^^^^^^^^^^^^^
6+
|
7+
= help: add #![feature(cfg_target_thread_local)] to the crate attributes to enable
8+
9+
error: aborting due to previous error
10+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
error: `cfg(target_vendor)` is experimental and subject to change (see issue #29718)
2+
--> $DIR/feature-gate-cfg-target-vendor.rs:12:12
3+
|
4+
12 | #[cfg_attr(target_vendor = "x", x)] //~ ERROR `cfg(target_vendor)` is experimental
5+
| ^^^^^^^^^^^^^^^^^^^
6+
|
7+
= help: add #![feature(cfg_target_vendor)] to the crate attributes to enable
8+
9+
error: `cfg(target_vendor)` is experimental and subject to change (see issue #29718)
10+
--> $DIR/feature-gate-cfg-target-vendor.rs:11:7
11+
|
12+
11 | #[cfg(target_vendor = "x")] //~ ERROR `cfg(target_vendor)` is experimental
13+
| ^^^^^^^^^^^^^^^^^^^
14+
|
15+
= help: add #![feature(cfg_target_vendor)] to the crate attributes to enable
16+
17+
error: `cfg(target_vendor)` is experimental and subject to change (see issue #29718)
18+
--> $DIR/feature-gate-cfg-target-vendor.rs:15:19
19+
|
20+
15 | #[cfg(not(any(all(target_vendor = "x"))))] //~ ERROR `cfg(target_vendor)` is experimental
21+
| ^^^^^^^^^^^^^^^^^^^
22+
|
23+
= help: add #![feature(cfg_target_vendor)] to the crate attributes to enable
24+
25+
error: `cfg(target_vendor)` is experimental and subject to change (see issue #29718)
26+
--> $DIR/feature-gate-cfg-target-vendor.rs:19:10
27+
|
28+
19 | cfg!(target_vendor = "x");
29+
| ^^^^^^^^^^^^^^^^^^^
30+
|
31+
= help: add #![feature(cfg_target_vendor)] to the crate attributes to enable
32+
33+
error: aborting due to 4 previous errors
34+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
error[E0599]: no method named `clone` found for type `[closure@$DIR/feature-gate-clone-closures.rs:16:17: 18:6 a:_]` in the current scope
2+
--> $DIR/feature-gate-clone-closures.rs:20:23
3+
|
4+
20 | let hello = hello.clone(); //~ ERROR no method named `clone` found for type
5+
| ^^^^^
6+
|
7+
= note: hello is a function, perhaps you wish to call it
8+
9+
error: aborting due to previous error
10+

0 commit comments

Comments
 (0)