Remove Spanned from mk_name_value_item_str and expr_to_spanned_string
This commit is contained in:
parent
1cdcea920e
commit
73d2da0894
8 changed files with 31 additions and 29 deletions
|
|
@ -3,7 +3,6 @@ use super::*;
|
|||
use syntax_pos::DUMMY_SP;
|
||||
use syntax::ast::*;
|
||||
use syntax::attr;
|
||||
use syntax::source_map::dummy_spanned;
|
||||
use syntax::symbol::Symbol;
|
||||
use syntax::with_default_globals;
|
||||
|
||||
|
|
@ -181,7 +180,8 @@ fn test_parse_ok() {
|
|||
|
||||
let mi = attr::mk_name_value_item_str(
|
||||
Ident::from_str("all"),
|
||||
dummy_spanned(Symbol::intern("done"))
|
||||
Symbol::intern("done"),
|
||||
DUMMY_SP,
|
||||
);
|
||||
assert_eq!(Cfg::parse(&mi), Ok(name_value_cfg("all", "done")));
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ use rustc::util::nodemap::{FxHashMap, FxHashSet};
|
|||
use syntax::ast::{self, AttrStyle, Ident};
|
||||
use syntax::attr;
|
||||
use syntax::ext::base::MacroKind;
|
||||
use syntax::source_map::{dummy_spanned, Spanned};
|
||||
use syntax::source_map::{DUMMY_SP, Spanned};
|
||||
use syntax::symbol::{Symbol, kw, sym};
|
||||
use syntax::symbol::InternedString;
|
||||
use syntax_pos::{self, Pos, FileName};
|
||||
|
|
@ -930,8 +930,8 @@ impl Attributes {
|
|||
if attr.check_name(sym::enable) {
|
||||
if let Some(feat) = attr.value_str() {
|
||||
let meta = attr::mk_name_value_item_str(
|
||||
Ident::with_empty_ctxt(sym::target_feature),
|
||||
dummy_spanned(feat));
|
||||
Ident::with_empty_ctxt(sym::target_feature), feat, DUMMY_SP
|
||||
);
|
||||
if let Ok(feat_cfg) = Cfg::parse(&meta) {
|
||||
cfg &= feat_cfg;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue