diff options
| author | Nicholas Nethercote <nnethercote@mozilla.com> | 2019-05-08 13:21:18 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <nnethercote@mozilla.com> | 2019-05-13 09:29:22 +1000 |
| commit | fb084a48e2ca663de41b316dc6ece2dceb93e24e (patch) | |
| tree | b78379f996dceee6039ea4880c66e7fe30b3efad /src/libsyntax/std_inject.rs | |
| parent | 79602c87b561e26fa1a8fe58b9130cca37375f90 (diff) | |
| download | rust-fb084a48e2ca663de41b316dc6ece2dceb93e24e.tar.gz rust-fb084a48e2ca663de41b316dc6ece2dceb93e24e.zip | |
Pass a `Symbol` to `check_name`, `emit_feature_err`, and related functions.
Diffstat (limited to 'src/libsyntax/std_inject.rs')
| -rw-r--r-- | src/libsyntax/std_inject.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsyntax/std_inject.rs b/src/libsyntax/std_inject.rs index b9758bd655c..42ca8b7c23c 100644 --- a/src/libsyntax/std_inject.rs +++ b/src/libsyntax/std_inject.rs @@ -2,7 +2,7 @@ use crate::ast; use crate::attr; use crate::edition::Edition; use crate::ext::hygiene::{Mark, SyntaxContext}; -use crate::symbol::{Symbol, keywords}; +use crate::symbol::{Symbol, keywords, sym}; use crate::source_map::{ExpnInfo, MacroAttribute, dummy_spanned, hygiene, respan}; use crate::ptr::P; use crate::tokenstream::TokenStream; @@ -46,10 +46,10 @@ pub fn maybe_inject_crates_ref( let rust_2018 = edition >= Edition::Edition2018; // the first name in this list is the crate name of the crate with the prelude - let names: &[&str] = if attr::contains_name(&krate.attrs, "no_core") { + let names: &[&str] = if attr::contains_name(&krate.attrs, sym::no_core) { return krate; - } else if attr::contains_name(&krate.attrs, "no_std") { - if attr::contains_name(&krate.attrs, "compiler_builtins") { + } else if attr::contains_name(&krate.attrs, sym::no_std) { + if attr::contains_name(&krate.attrs, sym::compiler_builtins) { &["core"] } else { &["core", "compiler_builtins"] |
