Skip to content

Allow the unstable attribute on foreign type#158233

Draft
kantnero wants to merge 1 commit into
rust-lang:mainfrom
kantnero:allow-unstable-attr-on-target
Draft

Allow the unstable attribute on foreign type#158233
kantnero wants to merge 1 commit into
rust-lang:mainfrom
kantnero:allow-unstable-attr-on-target

Conversation

@kantnero

@kantnero kantnero commented Jun 22, 2026

Copy link
Copy Markdown

While working the FnPtr trait in #156176 @carbotaniuman was trying to implement Code as an extern type but got an error as the current stability infrastructure does not allow unstable attribute on foreign type. #158200

This PR fixes that by allowing the unstable attribute on ForeignTy and adds test to verify.

@rustbot r? @JonathanBrouwer

@rustbot

rustbot commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann, @JonathanBrouwer

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 22, 2026
@rustbot

rustbot commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the pull request, and welcome! The Rust Project is excited to review your changes, and you should hear from @JonathanBrouwer (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rust-log-analyzer

This comment has been minimized.

#![stable(feature = "rust1", since = "1.0.0")]

extern "C" {
#[unstable(feature = "fn_static", issue = "none")]

@JonathanBrouwer JonathanBrouwer Jun 22, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test doesn't actually test that the attribute has an effect, only that it is allowed. Maybe add this to the ui/lint/lint-stability tests instead?

View changes since the review

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd specifically like to see an error being produced for the use of the unstable foreign type

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 22, 2026
@rustbot

rustbot commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@kantnero kantnero force-pushed the allow-unstable-attr-on-target branch from b915a1c to 4b98d4c Compare June 22, 2026 17:25
@kantnero kantnero requested a review from JonathanBrouwer June 22, 2026 17:44
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 22, 2026
@kantnero kantnero marked this pull request as draft June 22, 2026 17:46
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 22, 2026
@kantnero kantnero force-pushed the allow-unstable-attr-on-target branch from 8fd861c to b973eb9 Compare June 22, 2026 18:03
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job aarch64-gnu-llvm-21-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
3    |
4 LL |     extern crate stability_cfg2;
5    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

8    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
9 
10 error[E0658]: use of unstable library feature `unstable_test_feature`
-   --> $DIR/lint-stability.rs:45:9
+   --> $DIR/lint-stability.rs:49:9
12    |
13 LL |         deprecated_unstable();
14    |         ^^^^^^^^^^^^^^^^^^^

17    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
18 
19 error[E0658]: use of unstable library feature `unstable_test_feature`
-   --> $DIR/lint-stability.rs:47:9
+   --> $DIR/lint-stability.rs:51:9
21    |
22 LL |         Trait::trait_deprecated_unstable(&foo);
23    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

26    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
27 
28 error[E0658]: use of unstable library feature `unstable_test_feature`
-   --> $DIR/lint-stability.rs:49:9
+   --> $DIR/lint-stability.rs:53:9
30    |
31 LL |         <Foo as Trait>::trait_deprecated_unstable(&foo);
32    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

35    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
36 
37 error[E0658]: use of unstable library feature `unstable_test_feature`
-   --> $DIR/lint-stability.rs:52:9
+   --> $DIR/lint-stability.rs:56:9
39    |
40 LL |         deprecated_unstable_text();
41    |         ^^^^^^^^^^^^^^^^^^^^^^^^

44    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
45 
46 error[E0658]: use of unstable library feature `unstable_test_feature`
-   --> $DIR/lint-stability.rs:54:9
+   --> $DIR/lint-stability.rs:58:9
48    |
49 LL |         Trait::trait_deprecated_unstable_text(&foo);
50    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

53    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
54 
55 error[E0658]: use of unstable library feature `unstable_test_feature`
-   --> $DIR/lint-stability.rs:56:9
+   --> $DIR/lint-stability.rs:60:9
57    |
58 LL |         <Foo as Trait>::trait_deprecated_unstable_text(&foo);
59    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

62    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
63 
64 error[E0658]: use of unstable library feature `unstable_test_feature`
-   --> $DIR/lint-stability.rs:59:9
+   --> $DIR/lint-stability.rs:63:9
66    |
67 LL |         unstable();
68    |         ^^^^^^^^

71    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
72 
73 error[E0658]: use of unstable library feature `unstable_test_feature`
-   --> $DIR/lint-stability.rs:60:9
+   --> $DIR/lint-stability.rs:64:9
75    |
76 LL |         Trait::trait_unstable(&foo);
77    |         ^^^^^^^^^^^^^^^^^^^^^

80    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
81 
82 error[E0658]: use of unstable library feature `unstable_test_feature`
-   --> $DIR/lint-stability.rs:61:9
+   --> $DIR/lint-stability.rs:65:9
84    |
85 LL |         <Foo as Trait>::trait_unstable(&foo);
86    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

89    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
90 
91 error[E0658]: use of unstable library feature `unstable_test_feature`: text
-   --> $DIR/lint-stability.rs:63:9
+   --> $DIR/lint-stability.rs:67:9
93    |
94 LL |         unstable_text();
95    |         ^^^^^^^^^^^^^

98    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
99 
100 error[E0658]: use of unstable library feature `unstable_test_feature`: text
-   --> $DIR/lint-stability.rs:65:9
+   --> $DIR/lint-stability.rs:69:9
102    |
103 LL |         Trait::trait_unstable_text(&foo);
104    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^

107    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
108 
109 error[E0658]: use of unstable library feature `unstable_test_feature`: text
-   --> $DIR/lint-stability.rs:67:9
+   --> $DIR/lint-stability.rs:71:9
111    |
112 LL |         <Foo as Trait>::trait_unstable_text(&foo);
113    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

116    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
117 
118 error[E0658]: use of unstable library feature `unstable_test_feature`
-   --> $DIR/lint-stability.rs:99:17
+   --> $DIR/lint-stability.rs:103:17
120    |
121 LL |         let _ = DeprecatedUnstableStruct {
122    |                 ^^^^^^^^^^^^^^^^^^^^^^^^

125    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
126 
127 error[E0658]: use of unstable library feature `unstable_test_feature`
-   --> $DIR/lint-stability.rs:103:17
+   --> $DIR/lint-stability.rs:107:17
129    |
130 LL |         let _ = UnstableStruct { i: 0 };
131    |                 ^^^^^^^^^^^^^^

134    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
135 
136 error[E0658]: use of unstable library feature `unstable_test_feature`
-   --> $DIR/lint-stability.rs:107:17
+   --> $DIR/lint-stability.rs:111:17
138    |
139 LL |         let _ = DeprecatedUnstableUnitStruct;
140    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

143    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
144 
145 error[E0658]: use of unstable library feature `unstable_test_feature`
-   --> $DIR/lint-stability.rs:109:17
+   --> $DIR/lint-stability.rs:113:17
147    |
148 LL |         let _ = UnstableUnitStruct;
149    |                 ^^^^^^^^^^^^^^^^^^

152    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
153 
154 error[E0658]: use of unstable library feature `unstable_test_feature`
-   --> $DIR/lint-stability.rs:113:17
+   --> $DIR/lint-stability.rs:117:17
156    |
157 LL |         let _ = Enum::DeprecatedUnstableVariant;
158    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

161    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
162 
163 error[E0658]: use of unstable library feature `unstable_test_feature`
-   --> $DIR/lint-stability.rs:115:17
+   --> $DIR/lint-stability.rs:119:17
165    |
166 LL |         let _ = Enum::UnstableVariant;
167    |                 ^^^^^^^^^^^^^^^^^^^^^

170    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
171 
172 error[E0658]: use of unstable library feature `unstable_test_feature`
-   --> $DIR/lint-stability.rs:119:17
+   --> $DIR/lint-stability.rs:123:17
174    |
175 LL |         let _ = DeprecatedUnstableTupleStruct (1);
176    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

179    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
180 
181 error[E0658]: use of unstable library feature `unstable_test_feature`
-   --> $DIR/lint-stability.rs:121:17
+   --> $DIR/lint-stability.rs:125:17
183    |
184 LL |         let _ = UnstableTupleStruct (1);
185    |                 ^^^^^^^^^^^^^^^^^^^

188    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
189 
190 error[E0658]: use of unstable library feature `unstable_test_feature`
-   --> $DIR/lint-stability.rs:130:25
+   --> $DIR/lint-stability.rs:134:25
192    |
193 LL |         macro_test_arg!(deprecated_unstable_text());
194    |                         ^^^^^^^^^^^^^^^^^^^^^^^^

197    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
198 
199 error[E0658]: use of unstable library feature `unstable_test_feature`
-   --> $DIR/lint-stability.rs:144:9
+   --> $DIR/lint-stability.rs:148:9
201    |
202 LL |         Trait::trait_deprecated_unstable(&foo);
203    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

206    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
207 
208 error[E0658]: use of unstable library feature `unstable_test_feature`
-   --> $DIR/lint-stability.rs:146:9
+   --> $DIR/lint-stability.rs:150:9
210    |
211 LL |         <Foo as Trait>::trait_deprecated_unstable(&foo);
212    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

215    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
216 
217 error[E0658]: use of unstable library feature `unstable_test_feature`
-   --> $DIR/lint-stability.rs:148:9
+   --> $DIR/lint-stability.rs:152:9
219    |
220 LL |         Trait::trait_deprecated_unstable_text(&foo);
221    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

224    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
225 
226 error[E0658]: use of unstable library feature `unstable_test_feature`
-   --> $DIR/lint-stability.rs:150:9
+   --> $DIR/lint-stability.rs:154:9
228    |
229 LL |         <Foo as Trait>::trait_deprecated_unstable_text(&foo);
230    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

233    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
234 
235 error[E0658]: use of unstable library feature `unstable_test_feature`
-   --> $DIR/lint-stability.rs:152:9
+   --> $DIR/lint-stability.rs:156:9
237    |
238 LL |         Trait::trait_unstable(&foo);
239    |         ^^^^^^^^^^^^^^^^^^^^^

242    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
243 
244 error[E0658]: use of unstable library feature `unstable_test_feature`
-   --> $DIR/lint-stability.rs:153:9
+   --> $DIR/lint-stability.rs:157:9
246    |
247 LL |         <Foo as Trait>::trait_unstable(&foo);
248    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

251    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
252 
253 error[E0658]: use of unstable library feature `unstable_test_feature`: text
-   --> $DIR/lint-stability.rs:154:9
+   --> $DIR/lint-stability.rs:158:9
255    |
256 LL |         Trait::trait_unstable_text(&foo);
257    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^

260    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
261 
262 error[E0658]: use of unstable library feature `unstable_test_feature`: text
-   --> $DIR/lint-stability.rs:156:9
+   --> $DIR/lint-stability.rs:160:9
264    |
265 LL |         <Foo as Trait>::trait_unstable_text(&foo);
266    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

269    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
270 
271 error[E0658]: use of unstable library feature `unstable_test_feature`
-   --> $DIR/lint-stability.rs:172:10
+   --> $DIR/lint-stability.rs:176:10
273    |
274 LL |     impl UnstableTrait for S { }
275    |          ^^^^^^^^^^^^^

278    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
279 
280 error[E0658]: use of unstable library feature `unstable_test_feature`
-   --> $DIR/lint-stability.rs:174:24
+   --> $DIR/lint-stability.rs:178:24
282    |
283 LL |     trait LocalTrait : UnstableTrait { }
284    |                        ^^^^^^^^^^^^^

287    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
288 
289 error[E0658]: use of unstable library feature `unstable_test_feature`
-   --> $DIR/lint-stability.rs:179:9
+   --> $DIR/lint-stability.rs:183:9
291    |
292 LL |         fn trait_unstable(&self) {}
293    |         ^^^^^^^^^^^^^^^^^^^^^^^^

296    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
297 
298 error[E0658]: use of unstable library feature `unstable_test_feature`
-   --> $DIR/lint-stability.rs:184:5
+   --> $DIR/lint-stability.rs:188:5
300    |
301 LL |     extern crate inherited_stability;
302    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

305    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
306 
307 error[E0658]: use of unstable library feature `unstable_test_feature`
-   --> $DIR/lint-stability.rs:185:9
+   --> $DIR/lint-stability.rs:189:9
309    |
310 LL |     use self::inherited_stability::*;
311    |         ^^^^^^^^^^^^^^^^^^^^^^^^^

314    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
315 
316 error[E0658]: use of unstable library feature `unstable_test_feature`
-   --> $DIR/lint-stability.rs:188:9
+   --> $DIR/lint-stability.rs:192:9
318    |
319 LL |         unstable();
320    |         ^^^^^^^^

323    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
324 
325 error[E0658]: use of unstable library feature `unstable_test_feature`
-   --> $DIR/lint-stability.rs:191:9
+   --> $DIR/lint-stability.rs:195:9
327    |
328 LL |         stable_mod::unstable();
329    |         ^^^^^^^^^^^^^^^^^^^^

332    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
333 
334 error[E0658]: use of unstable library feature `unstable_test_feature`
-   --> $DIR/lint-stability.rs:194:9
+   --> $DIR/lint-stability.rs:198:9
336    |
337 LL |         unstable_mod::deprecated();
338    |         ^^^^^^^^^^^^

341    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
342 
343 error[E0658]: use of unstable library feature `unstable_test_feature`
-   --> $DIR/lint-stability.rs:195:9
+   --> $DIR/lint-stability.rs:199:9
345    |
346 LL |         unstable_mod::unstable();
347    |         ^^^^^^^^^^^^^^^^^^^^^^

350    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
351 
352 error[E0658]: use of unstable library feature `unstable_test_feature`
-   --> $DIR/lint-stability.rs:197:17
+   --> $DIR/lint-stability.rs:201:17
354    |
355 LL |         let _ = Unstable::UnstableVariant;
356    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^

359    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
360 
361 error[E0658]: use of unstable library feature `unstable_test_feature`
-   --> $DIR/lint-stability.rs:198:17
+   --> $DIR/lint-stability.rs:202:17
363    |
364 LL |         let _ = Unstable::StableVariant;
365    |                 ^^^^^^^^

368    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
369 
370 error[E0658]: use of unstable library feature `unstable_test_feature`
-   --> $DIR/lint-stability.rs:88:48
+   --> $DIR/lint-stability.rs:92:48
372    |
373 LL |         struct S1<T: TraitWithAssociatedTypes>(T::TypeUnstable);
374    |                                                ^^^^^^^^^^^^^^^

377    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
378 
379 error[E0658]: use of unstable library feature `unstable_test_feature`
-   --> $DIR/lint-stability.rs:92:13
+   --> $DIR/lint-stability.rs:96:13
381    |
---
To only update this specific test, also pass `--test-args lint/lint-stability.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/lint/lint-stability.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/lint/lint-stability" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/lint/lint-stability/auxiliary"
stdout: none
--- stderr -------------------------------
error[E0658]: use of unstable library feature `unstable_test_feature`
##[error]  --> /checkout/tests/ui/lint/lint-stability.rs:21:5
   |
LL |     extern crate stability_cfg2; //~ ERROR use of unstable library feature
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add `#![feature(unstable_test_feature)]` 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]: use of unstable library feature `unstable_test_feature`
##[error]  --> /checkout/tests/ui/lint/lint-stability.rs:49:9
   |
LL |         deprecated_unstable();
   |         ^^^^^^^^^^^^^^^^^^^
   |
   = help: add `#![feature(unstable_test_feature)]` 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]: use of unstable library feature `unstable_test_feature`
##[error]  --> /checkout/tests/ui/lint/lint-stability.rs:51:9
   |
LL |         Trait::trait_deprecated_unstable(&foo);
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add `#![feature(unstable_test_feature)]` 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]: use of unstable library feature `unstable_test_feature`
##[error]  --> /checkout/tests/ui/lint/lint-stability.rs:53:9
   |
LL |         <Foo as Trait>::trait_deprecated_unstable(&foo);
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add `#![feature(unstable_test_feature)]` 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]: use of unstable library feature `unstable_test_feature`
##[error]  --> /checkout/tests/ui/lint/lint-stability.rs:56:9
   |
LL |         deprecated_unstable_text();
   |         ^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add `#![feature(unstable_test_feature)]` 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]: use of unstable library feature `unstable_test_feature`
##[error]  --> /checkout/tests/ui/lint/lint-stability.rs:58:9
   |
LL |         Trait::trait_deprecated_unstable_text(&foo);
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add `#![feature(unstable_test_feature)]` 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]: use of unstable library feature `unstable_test_feature`
##[error]  --> /checkout/tests/ui/lint/lint-stability.rs:60:9
   |
LL |         <Foo as Trait>::trait_deprecated_unstable_text(&foo);
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add `#![feature(unstable_test_feature)]` 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]: use of unstable library feature `unstable_test_feature`
##[error]  --> /checkout/tests/ui/lint/lint-stability.rs:63:9
   |
LL |         unstable(); //~ ERROR use of unstable library feature
   |         ^^^^^^^^
   |
   = help: add `#![feature(unstable_test_feature)]` 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]: use of unstable library feature `unstable_test_feature`
##[error]  --> /checkout/tests/ui/lint/lint-stability.rs:64:9
   |
LL |         Trait::trait_unstable(&foo); //~ ERROR use of unstable library feature
   |         ^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add `#![feature(unstable_test_feature)]` 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]: use of unstable library feature `unstable_test_feature`
##[error]  --> /checkout/tests/ui/lint/lint-stability.rs:65:9
   |
LL |         <Foo as Trait>::trait_unstable(&foo); //~ ERROR use of unstable library feature
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add `#![feature(unstable_test_feature)]` 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]: use of unstable library feature `unstable_test_feature`: text
##[error]  --> /checkout/tests/ui/lint/lint-stability.rs:67:9
   |
LL |         unstable_text();
   |         ^^^^^^^^^^^^^
   |
   = help: add `#![feature(unstable_test_feature)]` 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]: use of unstable library feature `unstable_test_feature`: text
##[error]  --> /checkout/tests/ui/lint/lint-stability.rs:69:9
   |
LL |         Trait::trait_unstable_text(&foo);
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add `#![feature(unstable_test_feature)]` 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]: use of unstable library feature `unstable_test_feature`: text
##[error]  --> /checkout/tests/ui/lint/lint-stability.rs:71:9
   |
LL |         <Foo as Trait>::trait_unstable_text(&foo);
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add `#![feature(unstable_test_feature)]` 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]: use of unstable library feature `unstable_test_feature`
##[error]  --> /checkout/tests/ui/lint/lint-stability.rs:103:17
   |
LL |         let _ = DeprecatedUnstableStruct {
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add `#![feature(unstable_test_feature)]` 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]: use of unstable library feature `unstable_test_feature`
##[error]  --> /checkout/tests/ui/lint/lint-stability.rs:107:17
   |
LL |         let _ = UnstableStruct { i: 0 }; //~ ERROR use of unstable library feature
   |                 ^^^^^^^^^^^^^^
   |
   = help: add `#![feature(unstable_test_feature)]` 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]: use of unstable library feature `unstable_test_feature`
##[error]  --> /checkout/tests/ui/lint/lint-stability.rs:111:17
   |
LL |         let _ = DeprecatedUnstableUnitStruct;
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add `#![feature(unstable_test_feature)]` 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]: use of unstable library feature `unstable_test_feature`
##[error]  --> /checkout/tests/ui/lint/lint-stability.rs:113:17
   |
LL |         let _ = UnstableUnitStruct; //~ ERROR use of unstable library feature
   |                 ^^^^^^^^^^^^^^^^^^
   |
   = help: add `#![feature(unstable_test_feature)]` 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]: use of unstable library feature `unstable_test_feature`
##[error]  --> /checkout/tests/ui/lint/lint-stability.rs:117:17
   |
LL |         let _ = Enum::DeprecatedUnstableVariant;
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add `#![feature(unstable_test_feature)]` 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]: use of unstable library feature `unstable_test_feature`
##[error]  --> /checkout/tests/ui/lint/lint-stability.rs:119:17
   |
LL |         let _ = Enum::UnstableVariant; //~ ERROR use of unstable library feature
   |                 ^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add `#![feature(unstable_test_feature)]` 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]: use of unstable library feature `unstable_test_feature`
##[error]  --> /checkout/tests/ui/lint/lint-stability.rs:123:17
   |
LL |         let _ = DeprecatedUnstableTupleStruct (1);
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add `#![feature(unstable_test_feature)]` 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]: use of unstable library feature `unstable_test_feature`
##[error]  --> /checkout/tests/ui/lint/lint-stability.rs:125:17
   |
LL |         let _ = UnstableTupleStruct (1); //~ ERROR use of unstable library feature
   |                 ^^^^^^^^^^^^^^^^^^^
   |
   = help: add `#![feature(unstable_test_feature)]` 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]: use of unstable library feature `unstable_test_feature`
##[error]  --> /checkout/tests/ui/lint/lint-stability.rs:134:25
   |
LL |         macro_test_arg!(deprecated_unstable_text());
   |                         ^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add `#![feature(unstable_test_feature)]` 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]: use of unstable library feature `unstable_test_feature`
##[error]  --> /checkout/tests/ui/lint/lint-stability.rs:148:9
   |
LL |         Trait::trait_deprecated_unstable(&foo);
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add `#![feature(unstable_test_feature)]` 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]: use of unstable library feature `unstable_test_feature`
##[error]  --> /checkout/tests/ui/lint/lint-stability.rs:150:9
   |
LL |         <Foo as Trait>::trait_deprecated_unstable(&foo);
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add `#![feature(unstable_test_feature)]` 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]: use of unstable library feature `unstable_test_feature`
##[error]  --> /checkout/tests/ui/lint/lint-stability.rs:152:9
   |
LL |         Trait::trait_deprecated_unstable_text(&foo);
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add `#![feature(unstable_test_feature)]` 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]: use of unstable library feature `unstable_test_feature`
##[error]  --> /checkout/tests/ui/lint/lint-stability.rs:154:9
   |
LL |         <Foo as Trait>::trait_deprecated_unstable_text(&foo);
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add `#![feature(unstable_test_feature)]` 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]: use of unstable library feature `unstable_test_feature`
##[error]  --> /checkout/tests/ui/lint/lint-stability.rs:156:9
   |
LL |         Trait::trait_unstable(&foo); //~ ERROR use of unstable library feature
   |         ^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add `#![feature(unstable_test_feature)]` 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]: use of unstable library feature `unstable_test_feature`
##[error]  --> /checkout/tests/ui/lint/lint-stability.rs:157:9
   |
LL |         <Foo as Trait>::trait_unstable(&foo); //~ ERROR use of unstable library feature
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add `#![feature(unstable_test_feature)]` 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]: use of unstable library feature `unstable_test_feature`: text
##[error]  --> /checkout/tests/ui/lint/lint-stability.rs:158:9
   |
LL |         Trait::trait_unstable_text(&foo);
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add `#![feature(unstable_test_feature)]` 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]: use of unstable library feature `unstable_test_feature`: text
##[error]  --> /checkout/tests/ui/lint/lint-stability.rs:160:9
   |
LL |         <Foo as Trait>::trait_unstable_text(&foo);
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add `#![feature(unstable_test_feature)]` 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]: use of unstable library feature `unstable_test_feature`
##[error]  --> /checkout/tests/ui/lint/lint-stability.rs:176:10
   |
LL |     impl UnstableTrait for S { } //~ ERROR use of unstable library feature
   |          ^^^^^^^^^^^^^
   |
   = help: add `#![feature(unstable_test_feature)]` 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]: use of unstable library feature `unstable_test_feature`
##[error]  --> /checkout/tests/ui/lint/lint-stability.rs:178:24
   |
LL |     trait LocalTrait : UnstableTrait { } //~ ERROR use of unstable library feature
   |                        ^^^^^^^^^^^^^
   |
   = help: add `#![feature(unstable_test_feature)]` 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]: use of unstable library feature `unstable_test_feature`
##[error]  --> /checkout/tests/ui/lint/lint-stability.rs:183:9
   |
LL |         fn trait_unstable(&self) {} //~ ERROR use of unstable library feature
   |         ^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add `#![feature(unstable_test_feature)]` 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]: use of unstable library feature `unstable_test_feature`
##[error]  --> /checkout/tests/ui/lint/lint-stability.rs:188:5
   |
LL |     extern crate inherited_stability; //~ ERROR use of unstable library feature
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add `#![feature(unstable_test_feature)]` 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]: use of unstable library feature `unstable_test_feature`
##[error]  --> /checkout/tests/ui/lint/lint-stability.rs:189:9
   |
LL |     use self::inherited_stability::*; //~ ERROR use of unstable library feature
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add `#![feature(unstable_test_feature)]` 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]: use of unstable library feature `unstable_test_feature`
##[error]  --> /checkout/tests/ui/lint/lint-stability.rs:192:9
   |
LL |         unstable(); //~ ERROR use of unstable library feature
   |         ^^^^^^^^
   |
   = help: add `#![feature(unstable_test_feature)]` 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]: use of unstable library feature `unstable_test_feature`
##[error]  --> /checkout/tests/ui/lint/lint-stability.rs:195:9
   |
LL |         stable_mod::unstable(); //~ ERROR use of unstable library feature
   |         ^^^^^^^^^^^^^^^^^^^^
   |
   = help: add `#![feature(unstable_test_feature)]` 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]: use of unstable library feature `unstable_test_feature`
##[error]  --> /checkout/tests/ui/lint/lint-stability.rs:198:9
   |
LL |         unstable_mod::deprecated(); //~ ERROR use of unstable library feature
   |         ^^^^^^^^^^^^
   |
   = help: add `#![feature(unstable_test_feature)]` 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]: use of unstable library feature `unstable_test_feature`
##[error]  --> /checkout/tests/ui/lint/lint-stability.rs:199:9
   |
LL |         unstable_mod::unstable(); //~ ERROR use of unstable library feature
   |         ^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add `#![feature(unstable_test_feature)]` 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]: use of unstable library feature `unstable_test_feature`
##[error]  --> /checkout/tests/ui/lint/lint-stability.rs:201:17
   |
LL |         let _ = Unstable::UnstableVariant; //~ ERROR use of unstable library feature
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add `#![feature(unstable_test_feature)]` 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]: use of unstable library feature `unstable_test_feature`
##[error]  --> /checkout/tests/ui/lint/lint-stability.rs:202:17
   |
LL |         let _ = Unstable::StableVariant; //~ ERROR use of unstable library feature
   |                 ^^^^^^^^
   |
   = help: add `#![feature(unstable_test_feature)]` 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]: use of unstable library feature `unstable_test_feature`
##[error]  --> /checkout/tests/ui/lint/lint-stability.rs:92:48
   |
LL |         struct S1<T: TraitWithAssociatedTypes>(T::TypeUnstable);
   |                                                ^^^^^^^^^^^^^^^
   |
   = help: add `#![feature(unstable_test_feature)]` 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]: use of unstable library feature `unstable_test_feature`
##[error]  --> /checkout/tests/ui/lint/lint-stability.rs:96:13
   |
LL |             TypeUnstable = u8, //~ ERROR use of unstable library feature
   |             ^^^^^^^^^^^^^^^^^
   |
   = help: add `#![feature(unstable_test_feature)]` 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: aborting due to 43 previous errors

For more information about this error, try `rustc --explain E0658`.
------------------------------------------

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants