diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2019-05-13 22:46:20 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2019-05-22 20:20:12 +0300 |
| commit | a1885cdba38a63448ceec02f951ddc0844d0ff38 (patch) | |
| tree | 8c45eb2a7169a49b8a6e66fc3193c8d99ffc7632 /src/libsyntax/feature_gate.rs | |
| parent | c389a39c9728d5c912a9ce1bc4c04eb1a3f31fe8 (diff) | |
| download | rust-a1885cdba38a63448ceec02f951ddc0844d0ff38.tar.gz rust-a1885cdba38a63448ceec02f951ddc0844d0ff38.zip | |
Restore the old behavior of the rustdoc keyword check + Fix rebase
Diffstat (limited to 'src/libsyntax/feature_gate.rs')
| -rw-r--r-- | src/libsyntax/feature_gate.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index 5b1a9bb739f..57a6656140f 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -22,7 +22,7 @@ use crate::source_map::Spanned; use crate::edition::{ALL_EDITIONS, Edition}; use crate::visit::{self, FnKind, Visitor}; use crate::parse::{token, ParseSess}; -use crate::symbol::{Symbol, keywords, sym}; +use crate::symbol::{Symbol, kw, sym}; use crate::tokenstream::TokenTree; use errors::{DiagnosticBuilder, Handler}; @@ -1948,7 +1948,7 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> { fn visit_item(&mut self, i: &'a ast::Item) { match i.node { ast::ItemKind::Const(_,_) => { - if i.ident.name == keywords::Underscore.name() { + if i.ident.name == kw::Underscore { gate_feature_post!(&self, underscore_const_names, i.span, "naming constants with `_` is unstable"); } |
