diff options
| author | bors <bors@rust-lang.org> | 2019-08-03 12:20:42 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-08-03 12:20:42 +0000 |
| commit | a45743345659c775b01484574af2818c46a2cb03 (patch) | |
| tree | d67ee435402185e455f061464f9bba447abb7c1f /src/libsyntax/parse | |
| parent | 8e917f48382c6afaf50568263b89d35fba5d98e4 (diff) | |
| parent | 42dfdc5aa56aaeda1e4c54c2508ca2212070f797 (diff) | |
| download | rust-a45743345659c775b01484574af2818c46a2cb03.tar.gz rust-a45743345659c775b01484574af2818c46a2cb03.zip | |
Auto merge of #63234 - Centril:rollup-h9t731z, r=Centril
Rollup of 5 pull requests Successful merges: - #62954 (Fix typo in Delimited::open_tt) - #63146 (Cleanup syntax::attr) - #63218 (rustbuild: RISC-V is no longer an experimental LLVM target) - #63227 (dead_code: Properly inspect fields in struct patterns with type relative paths) - #63229 (A bit of Miri error cleanup) Failed merges: r? @ghost
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/attr.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 11 |
2 files changed, 4 insertions, 11 deletions
diff --git a/src/libsyntax/parse/attr.rs b/src/libsyntax/parse/attr.rs index af484c886ab..a42da112360 100644 --- a/src/libsyntax/parse/attr.rs +++ b/src/libsyntax/parse/attr.rs @@ -53,7 +53,7 @@ impl<'a> Parser<'a> { just_parsed_doc_comment = false; } token::DocComment(s) => { - let attr = attr::mk_sugared_doc_attr(attr::mk_attr_id(), s, self.token.span); + let attr = attr::mk_sugared_doc_attr(s, self.token.span); if attr.style != ast::AttrStyle::Outer { let mut err = self.fatal("expected outer doc comment"); err.note("inner doc comments like this (starting with \ @@ -239,7 +239,7 @@ impl<'a> Parser<'a> { } token::DocComment(s) => { // we need to get the position of this token before we bump. - let attr = attr::mk_sugared_doc_attr(attr::mk_attr_id(), s, self.token.span); + let attr = attr::mk_sugared_doc_attr(s, self.token.span); if attr.style == ast::AttrStyle::Inner { attrs.push(attr); self.bump(); diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index eca1e218fca..880dd6e1649 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -6395,15 +6395,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); } |
