about summary refs log tree commit diff
path: root/src/libsyntax_ext
diff options
context:
space:
mode:
authorNicholas Nethercote <nnethercote@mozilla.com>2019-10-24 06:40:35 +1100
committerNicholas Nethercote <nnethercote@mozilla.com>2019-11-06 23:01:02 +1100
commit69bc4aba785e071740d2d46f109623b9951aae5d (patch)
treec21cbc01c951ccece7ee9cbef03142811e8ccc78 /src/libsyntax_ext
parente8b190ac4ad79e58d21ee1d573529ff74d8eedaa (diff)
downloadrust-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_ext')
-rw-r--r--src/libsyntax_ext/proc_macro_harness.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libsyntax_ext/proc_macro_harness.rs b/src/libsyntax_ext/proc_macro_harness.rs
index fc4a7a0a0fe..bef91399927 100644
--- a/src/libsyntax_ext/proc_macro_harness.rs
+++ b/src/libsyntax_ext/proc_macro_harness.rs
@@ -249,9 +249,9 @@ impl<'a> Visitor<'a> for CollectProcMacros<'a> {
         for attr in &item.attrs {
             if is_proc_macro_attr(&attr) {
                 if let Some(prev_attr) = found_attr {
-                    let path_str = pprust::path_to_string(&attr.path);
-                    let msg = if attr.path.segments[0].ident.name ==
-                                 prev_attr.path.segments[0].ident.name {
+                    let path_str = pprust::path_to_string(&attr.item.path);
+                    let msg = if attr.item.path.segments[0].ident.name ==
+                                 prev_attr.item.path.segments[0].ident.name {
                         format!(
                             "only one `#[{}]` attribute is allowed on any given function",
                             path_str,
@@ -261,7 +261,7 @@ impl<'a> Visitor<'a> for CollectProcMacros<'a> {
                             "`#[{}]` and `#[{}]` attributes cannot both be applied
                             to the same function",
                             path_str,
-                            pprust::path_to_string(&prev_attr.path),
+                            pprust::path_to_string(&prev_attr.item.path),
                         )
                     };
 
@@ -290,7 +290,7 @@ impl<'a> Visitor<'a> for CollectProcMacros<'a> {
         if !is_fn {
             let msg = format!(
                 "the `#[{}]` attribute may only be used on bare functions",
-                pprust::path_to_string(&attr.path),
+                pprust::path_to_string(&attr.item.path),
             );
 
             self.handler.span_err(attr.span, &msg);
@@ -304,7 +304,7 @@ impl<'a> Visitor<'a> for CollectProcMacros<'a> {
         if !self.is_proc_macro_crate {
             let msg = format!(
                 "the `#[{}]` attribute is only usable with crates of the `proc-macro` crate type",
-                pprust::path_to_string(&attr.path),
+                pprust::path_to_string(&attr.item.path),
             );
 
             self.handler.span_err(attr.span, &msg);