diff options
| author | Yuki Okushi <yuki.okushi@huawei.com> | 2021-06-17 07:11:13 +0900 |
|---|---|---|
| committer | Yuki Okushi <yuki.okushi@huawei.com> | 2021-06-17 08:04:54 +0900 |
| commit | 4f8e0ebcc58613b1095a9f47753547698b0b34fa (patch) | |
| tree | d9cc3c28cd8e13f037a0cb06c21ece5468be0188 /src/tools/rustfmt | |
| parent | 9fef8d91b4a6c5bfe07c025c434f2d623ad83337 (diff) | |
| download | rust-4f8e0ebcc58613b1095a9f47753547698b0b34fa.tar.gz rust-4f8e0ebcc58613b1095a9f47753547698b0b34fa.zip | |
Use `AttrVec` for `Arm`, `FieldDef`, and `Variant`
Diffstat (limited to 'src/tools/rustfmt')
| -rw-r--r-- | src/tools/rustfmt/src/types.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tools/rustfmt/src/types.rs b/src/tools/rustfmt/src/types.rs index 5597af9ee32..974c0c5990c 100644 --- a/src/tools/rustfmt/src/types.rs +++ b/src/tools/rustfmt/src/types.rs @@ -1,7 +1,7 @@ use std::iter::ExactSizeIterator; use std::ops::Deref; -use rustc_ast::ast::{self, FnRetTy, Mutability}; +use rustc_ast::ast::{self, AttrVec, FnRetTy, Mutability}; use rustc_span::{symbol::kw, symbol::Ident, BytePos, Pos, Span}; use crate::config::lists::*; @@ -776,7 +776,7 @@ impl Rewrite for ast::Ty { ); let data = ast::VariantData::Struct(fields.clone(), recovered); let variant = ast::Variant { - attrs: vec![], + attrs: AttrVec::new(), id: self.id, span: self.span, vis: DEFAULT_VISIBILITY, @@ -800,7 +800,7 @@ impl Rewrite for ast::Ty { ); let data = ast::VariantData::Struct(fields.clone(), recovered); let variant = ast::Variant { - attrs: vec![], + attrs: AttrVec::new(), id: self.id, span: self.span, vis: DEFAULT_VISIBILITY, |
