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 /compiler/rustc_parse/src | |
| parent | 9fef8d91b4a6c5bfe07c025c434f2d623ad83337 (diff) | |
| download | rust-4f8e0ebcc58613b1095a9f47753547698b0b34fa.tar.gz rust-4f8e0ebcc58613b1095a9f47753547698b0b34fa.zip | |
Use `AttrVec` for `Arm`, `FieldDef`, and `Variant`
Diffstat (limited to 'compiler/rustc_parse/src')
| -rw-r--r-- | compiler/rustc_parse/src/parser/expr.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_parse/src/parser/item.rs | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs index c8789abc142..88ebf4aca23 100644 --- a/compiler/rustc_parse/src/parser/expr.rs +++ b/compiler/rustc_parse/src/parser/expr.rs @@ -2116,7 +2116,7 @@ impl<'a> Parser<'a> { let span = body.span; return Ok(( ast::Arm { - attrs, + attrs: attrs.into(), pat, guard, body, @@ -2170,7 +2170,7 @@ impl<'a> Parser<'a> { Ok(( ast::Arm { - attrs, + attrs: attrs.into(), pat, guard, body: expr, diff --git a/compiler/rustc_parse/src/parser/item.rs b/compiler/rustc_parse/src/parser/item.rs index 54e6ff6272c..2daa9e2485b 100644 --- a/compiler/rustc_parse/src/parser/item.rs +++ b/compiler/rustc_parse/src/parser/item.rs @@ -1143,7 +1143,7 @@ impl<'a> Parser<'a> { ident, vis, id: DUMMY_NODE_ID, - attrs: variant_attrs, + attrs: variant_attrs.into(), data: struct_def, disr_expr, span: vlo.to(this.prev_token.span), @@ -1286,7 +1286,7 @@ impl<'a> Parser<'a> { ident: None, id: DUMMY_NODE_ID, ty, - attrs, + attrs: attrs.into(), is_placeholder: false, }, TrailingToken::MaybeComma, @@ -1460,7 +1460,7 @@ impl<'a> Parser<'a> { vis, id: DUMMY_NODE_ID, ty, - attrs, + attrs: attrs.into(), is_placeholder: false, }) } |
