diff options
| author | bors <bors@rust-lang.org> | 2018-08-21 13:52:11 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-08-21 13:52:11 +0000 |
| commit | a9d496796f091f42c8bac60c5c9ca05e6ca5dcda (patch) | |
| tree | 57cb3a87fe61a702a5379cb630856ce22e99dddd /src/libsyntax | |
| parent | 70c33bb8e2649a019e48515128a0b447dfe66f6b (diff) | |
| parent | e221fcce66ed8fd9e7c89988596d28e768193f98 (diff) | |
| download | rust-a9d496796f091f42c8bac60c5c9ca05e6ca5dcda.tar.gz rust-a9d496796f091f42c8bac60c5c9ca05e6ca5dcda.zip | |
Auto merge of #53236 - alexreg:stabilise-raw-idents, r=cramertj
Stabilise raw_identifiers feature * [Reference PR](https://github.com/rust-lang-nursery/reference/pull/395) * [Book PR](https://github.com/rust-lang/book/pull/1480) * [Rust by Example PR](https://github.com/rust-lang/rust-by-example/pull/1095) Closes #48589. r? @cramertj CC @cuviper @centril
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/diagnostic_list.rs | 5 | ||||
| -rw-r--r-- | src/libsyntax/feature_gate.rs | 15 |
2 files changed, 5 insertions, 15 deletions
diff --git a/src/libsyntax/diagnostic_list.rs b/src/libsyntax/diagnostic_list.rs index 15abad555f4..89af57a0858 100644 --- a/src/libsyntax/diagnostic_list.rs +++ b/src/libsyntax/diagnostic_list.rs @@ -382,8 +382,9 @@ Erroneous code example: ```ignore (limited to a warning during 2018 edition development) #![feature(rust_2018_preview)] -#![feature(raw_identifiers)] // error: the feature `raw_identifiers` is - // included in the Rust 2018 edition +#![feature(impl_header_lifetime_elision)] // error: the feature + // `impl_header_lifetime_elision` is + // included in the Rust 2018 edition ``` "##, diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index 74f573fceba..8a595113fcb 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -423,9 +423,6 @@ declare_features! ( // `use path as _;` and `extern crate c as _;` (active, underscore_imports, "1.26.0", Some(48216), None), - // Allows keywords to be escaped for use as identifiers - (active, raw_identifiers, "1.26.0", Some(48589), Some(Edition::Edition2018)), - // Allows macro invocations in `extern {}` blocks (active, macros_in_extern, "1.27.0", Some(49476), None), @@ -651,6 +648,8 @@ declare_features! ( // Allows importing and reexporting macros with `use`, // enables macro modularization in general. (accepted, use_extern_macros, "1.30.0", Some(35896), None), + // Allows keywords to be escaped for use as identifiers + (accepted, raw_identifiers, "1.30.0", Some(48589), None), ); // If you change this, please modify src/doc/unstable-book as well. You must @@ -2072,16 +2071,6 @@ pub fn check_crate(krate: &ast::Crate, plugin_attributes, }; - if !features.raw_identifiers { - for &span in sess.raw_identifier_spans.borrow().iter() { - if !span.allows_unstable() { - gate_feature!(&ctx, raw_identifiers, span, - "raw identifiers are experimental and subject to change" - ); - } - } - } - let visitor = &mut PostExpansionVisitor { context: &ctx }; visitor.whole_crate_feature_gates(krate); visit::walk_crate(visitor, krate); |
