Pass a Symbol
to check_name
, emit_feature_err
, and related functions.
This commit is contained in:
parent
79602c87b5
commit
fb084a48e2
114 changed files with 671 additions and 621 deletions
|
@ -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"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue