Pass a Symbol to check_name, emit_feature_err, and related functions.
This commit is contained in:
@@ -46,7 +46,7 @@ use crate::ptr::P;
|
||||
use crate::parse::PResult;
|
||||
use crate::ThinVec;
|
||||
use crate::tokenstream::{self, DelimSpan, TokenTree, TokenStream, TreeAndJoint};
|
||||
use crate::symbol::{keywords, Symbol};
|
||||
use crate::symbol::{keywords, sym, Symbol};
|
||||
|
||||
use errors::{Applicability, DiagnosticBuilder, DiagnosticId, FatalError};
|
||||
use rustc_target::spec::abi::{self, Abi};
|
||||
@@ -7263,7 +7263,7 @@ impl<'a> Parser<'a> {
|
||||
}
|
||||
|
||||
fn push_directory(&mut self, id: Ident, attrs: &[Attribute]) {
|
||||
if let Some(path) = attr::first_attr_value_str_by_name(attrs, "path") {
|
||||
if let Some(path) = attr::first_attr_value_str_by_name(attrs, sym::path) {
|
||||
self.directory.path.to_mut().push(&path.as_str());
|
||||
self.directory.ownership = DirectoryOwnership::Owned { relative: None };
|
||||
} else {
|
||||
@@ -7283,7 +7283,7 @@ impl<'a> Parser<'a> {
|
||||
}
|
||||
|
||||
pub fn submod_path_from_attr(attrs: &[Attribute], dir_path: &Path) -> Option<PathBuf> {
|
||||
if let Some(s) = attr::first_attr_value_str_by_name(attrs, "path") {
|
||||
if let Some(s) = attr::first_attr_value_str_by_name(attrs, sym::path) {
|
||||
let s = s.as_str();
|
||||
|
||||
// On windows, the base path might have the form
|
||||
|
||||
Reference in New Issue
Block a user