diff options
| author | Nicholas Nethercote <nnethercote@mozilla.com> | 2019-10-24 06:40:35 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <nnethercote@mozilla.com> | 2019-11-06 23:01:02 +1100 |
| commit | 69bc4aba785e071740d2d46f109623b9951aae5d (patch) | |
| tree | c21cbc01c951ccece7ee9cbef03142811e8ccc78 /src/libsyntax/attr/builtin.rs | |
| parent | e8b190ac4ad79e58d21ee1d573529ff74d8eedaa (diff) | |
| download | rust-69bc4aba785e071740d2d46f109623b9951aae5d.tar.gz rust-69bc4aba785e071740d2d46f109623b9951aae5d.zip | |
Remove unnecessary `Deref` impl for `Attribute`.
This kind of thing just makes the code harder to read.
Diffstat (limited to 'src/libsyntax/attr/builtin.rs')
| -rw-r--r-- | src/libsyntax/attr/builtin.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsyntax/attr/builtin.rs b/src/libsyntax/attr/builtin.rs index 84c86c9651f..e77d9ef326a 100644 --- a/src/libsyntax/attr/builtin.rs +++ b/src/libsyntax/attr/builtin.rs @@ -228,7 +228,7 @@ fn find_stability_generic<'a, I>(sess: &ParseSess, sym::stable, sym::rustc_promotable, sym::rustc_allow_const_fn_ptr, - ].iter().any(|&s| attr.path == s) { + ].iter().any(|&s| attr.item.path == s) { continue // not a stability level } @@ -236,10 +236,10 @@ fn find_stability_generic<'a, I>(sess: &ParseSess, let meta = attr.meta(); - if attr.path == sym::rustc_promotable { + if attr.item.path == sym::rustc_promotable { promotable = true; } - if attr.path == sym::rustc_allow_const_fn_ptr { + if attr.item.path == sym::rustc_allow_const_fn_ptr { allow_const_fn_ptr = true; } // attributes with data @@ -778,7 +778,7 @@ pub fn find_repr_attrs(sess: &ParseSess, attr: &Attribute) -> Vec<ReprAttr> { let mut acc = Vec::new(); let diagnostic = &sess.span_diagnostic; - if attr.path == sym::repr { + if attr.item.path == sym::repr { if let Some(items) = attr.meta_item_list() { mark_used(attr); for item in items { |
