Skip to content

File tree

4 files changed

+16
-10
lines changed

4 files changed

+16
-10
lines changed
 

‎src/libsyntax/diagnostic_list.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -375,15 +375,15 @@ and likely to change in the future.
375375

376376
E0705: r##"
377377
A `#![feature]` attribute was declared for a feature that is stable in
378-
the current edition.
378+
the current edition, but not in all editions.
379379
380380
Erroneous code example:
381381
382382
```ignore (limited to a warning during 2018 edition development)
383383
#![feature(rust_2018_preview)]
384-
#![feature(impl_header_lifetime_elision)] // error: the feature
385-
// `impl_header_lifetime_elision` is
386-
// included in the Rust 2018 edition
384+
#![feature(test_2018_feature)] // error: the feature
385+
// `test_2018_feature` is
386+
// included in the Rust 2018 edition
387387
```
388388
389389
"##,

‎src/libsyntax/feature_gate.rs

+3
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,9 @@ declare_features! (
462462

463463
(active, abi_amdgpu_kernel, "1.29.0", Some(51575), None),
464464

465+
// Perma-unstable; added for testing E0705
466+
(active, test_2018_feature, "1.31.0", Some(0), Some(Edition::Edition2018)),
467+
465468
// Support for arbitrary delimited token streams in non-macro attributes
466469
(active, unrestricted_attribute_tokens, "1.30.0", Some(44690), None),
467470

‎src/test/ui/E0705.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@
1010

1111
// compile-pass
1212

13-
#![feature(impl_header_lifetime_elision)]
14-
//~^ WARN the feature `impl_header_lifetime_elision` is included in the Rust 2018 edition
13+
// This is a stub feature that doesn't control anything, so to make tidy happy,
14+
// gate-test-test_2018_feature
15+
16+
#![feature(test_2018_feature)]
17+
//~^ WARN the feature `test_2018_feature` is included in the Rust 2018 edition
1518
#![feature(rust_2018_preview)]
1619

1720
fn main() {}

‎src/test/ui/E0705.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
warning[E0705]: the feature `impl_header_lifetime_elision` is included in the Rust 2018 edition
2-
--> $DIR/E0705.rs:13:12
1+
warning[E0705]: the feature `test_2018_feature` is included in the Rust 2018 edition
2+
--> $DIR/E0705.rs:16:12
33
|
4-
LL | #![feature(impl_header_lifetime_elision)]
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4+
LL | #![feature(test_2018_feature)]
5+
| ^^^^^^^^^^^^^^^^^
66

0 commit comments

Comments
 (0)
Please sign in to comment.