1
Fork 0

Replace a few Attribute constructors with mk_attr

This commit is contained in:
Mark Rousskov 2019-07-30 14:49:46 -04:00
parent f78bf50dec
commit c9bd4a05bf
3 changed files with 6 additions and 26 deletions

View file

@ -6396,15 +6396,8 @@ impl<'a> Parser<'a> {
self.eval_src_mod(path, directory_ownership, id.to_string(), id_span)?;
// Record that we fetched the mod from an external file
if warn {
let attr = Attribute {
id: attr::mk_attr_id(),
style: ast::AttrStyle::Outer,
path: ast::Path::from_ident(
Ident::with_empty_ctxt(sym::warn_directory_ownership)),
tokens: TokenStream::empty(),
is_sugared_doc: false,
span: DUMMY_SP,
};
let attr = attr::mk_attr_outer(
attr::mk_word_item(Ident::with_empty_ctxt(sym::warn_directory_ownership)));
attr::mark_known(&attr);
attrs.push(attr);
}