Skip to content

Commit 176f8c2

Browse files
author
Alexander Regueiro
committed
Removed raw_identifiers feature gate.
1 parent b73535f commit 176f8c2

30 files changed

+42
-109
lines changed

src/librustc_lint/builtin.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1927,14 +1927,12 @@ impl Async2018 {
19271927
);
19281928

19291929
// Don't suggest about raw identifiers if the feature isn't active
1930-
if cx.sess.features_untracked().raw_identifiers {
1931-
lint.span_suggestion_with_applicability(
1932-
span,
1933-
"you can use a raw identifier to stay compatible",
1934-
"r#async".to_string(),
1935-
Applicability::MachineApplicable,
1936-
);
1937-
}
1930+
lint.span_suggestion_with_applicability(
1931+
span,
1932+
"you can use a raw identifier to stay compatible",
1933+
"r#async".to_string(),
1934+
Applicability::MachineApplicable,
1935+
);
19381936
lint.emit()
19391937
}
19401938
}

src/libsyntax/diagnostic_list.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,8 +382,9 @@ Erroneous code example:
382382
383383
```ignore (limited to a warning during 2018 edition development)
384384
#![feature(rust_2018_preview)]
385-
#![feature(raw_identifiers)] // error: the feature `raw_identifiers` is
386-
// included in the Rust 2018 edition
385+
#![feature(impl_header_lifetime_elision)] // error: the feature
386+
// `impl_header_lifetime_elision` is
387+
// included in the Rust 2018 edition
387388
```
388389
389390
"##,

src/libsyntax/feature_gate.rs

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -433,9 +433,6 @@ declare_features! (
433433
// `use path as _;` and `extern crate c as _;`
434434
(active, underscore_imports, "1.26.0", Some(48216), None),
435435

436-
// Allows keywords to be escaped for use as identifiers
437-
(active, raw_identifiers, "1.26.0", Some(48589), Some(Edition::Edition2018)),
438-
439436
// Allows macro invocations in `extern {}` blocks
440437
(active, macros_in_extern, "1.27.0", Some(49476), None),
441438

@@ -645,6 +642,8 @@ declare_features! (
645642
(accepted, repr_transparent, "1.28.0", Some(43036), None),
646643
// Defining procedural macros in `proc-macro` crates
647644
(accepted, proc_macro, "1.29.0", Some(38356), None),
645+
// Allows keywords to be escaped for use as identifiers
646+
(accepted, raw_identifiers, "1.30.0", Some(48589), None),
648647
);
649648

650649
// If you change this, please modify src/doc/unstable-book as well. You must
@@ -2015,16 +2014,6 @@ pub fn check_crate(krate: &ast::Crate,
20152014
plugin_attributes,
20162015
};
20172016

2018-
if !features.raw_identifiers {
2019-
for &span in sess.raw_identifier_spans.borrow().iter() {
2020-
if !span.allows_unstable() {
2021-
gate_feature!(&ctx, raw_identifiers, span,
2022-
"raw identifiers are experimental and subject to change"
2023-
);
2024-
}
2025-
}
2026-
}
2027-
20282017
let visitor = &mut PostExpansionVisitor { context: &ctx };
20292018
visitor.whole_crate_feature_gates(krate);
20302019
visit::walk_crate(visitor, krate);

src/test/run-pass/auxiliary/edition-kw-macro-2015.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010

1111
// edition:2015
1212

13-
#![feature(raw_identifiers)]
14-
1513
#[macro_export]
1614
macro_rules! produces_async {
1715
() => (pub fn async() {})

src/test/run-pass/edition-keywords-2015-2015.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
// edition:2015
1212
// aux-build:edition-kw-macro-2015.rs
1313

14-
#![feature(raw_identifiers)]
15-
1614
#[macro_use]
1715
extern crate edition_kw_macro_2015;
1816

src/test/run-pass/edition-keywords-2015-2018.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
// edition:2015
1212
// aux-build:edition-kw-macro-2018.rs
1313

14-
#![feature(raw_identifiers)]
15-
1614
#[macro_use]
1715
extern crate edition_kw_macro_2018;
1816

src/test/run-pass/rfc-2151-raw-identifiers/attr.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![feature(raw_identifiers)]
12-
1311
use std::mem;
1412

1513
#[r#repr(r#C, r#packed)]

src/test/run-pass/rfc-2151-raw-identifiers/basic.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![feature(raw_identifiers)]
12-
1311
fn r#fn(r#match: u32) -> u32 {
1412
r#match
1513
}

src/test/run-pass/rfc-2151-raw-identifiers/items.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![feature(raw_identifiers)]
12-
1311
#[derive(Debug, PartialEq, Eq)]
1412
struct IntWrapper(u32);
1513

src/test/run-pass/rfc-2151-raw-identifiers/macros.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
// except according to those terms.
1010

1111
#![feature(decl_macro)]
12-
#![feature(raw_identifiers)]
1312

1413
r#macro_rules! r#struct {
1514
($r#struct:expr) => { $r#struct }

0 commit comments

Comments
 (0)