about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorMark Rousskov <mark.simulacrum@gmail.com>2019-07-30 14:49:46 -0400
committerMark Rousskov <mark.simulacrum@gmail.com>2019-07-31 08:55:37 -0400
commitc9bd4a05bf9acfaf5e26f7b8b07dae0012c93d92 (patch)
tree5abcb7493ec9ccf5e6f904fc6afb3c7f0e14607f /src/libsyntax/parse
parentf78bf50dec172630a03eab1d8abb3bfaa14b9627 (diff)
downloadrust-c9bd4a05bf9acfaf5e26f7b8b07dae0012c93d92.tar.gz
rust-c9bd4a05bf9acfaf5e26f7b8b07dae0012c93d92.zip
Replace a few Attribute constructors with mk_attr
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/parser.rs11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 7fda9158b4b..01d9afab079 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -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);
                 }