Skip to content

Commit

Permalink
Delete unused span field from ForeignName
Browse files Browse the repository at this point in the history
    warning: field is never read: `span`
      --> macro/src/syntax/names.rs:12:5
       |
    12 |     span: Span,
       |     ^^^^^^^^^^
       |
       = note: `#[warn(dead_code)]` on by default
  • Loading branch information
dtolnay committed Sep 12, 2021
1 parent fccef86 commit d9a561c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions syntax/names.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ use syn::punctuated::Punctuated;
#[derive(Clone)]
pub struct ForeignName {
text: String,
span: Span,
}

impl Pair {
Expand Down Expand Up @@ -56,7 +55,7 @@ impl ForeignName {
match syn::parse_str::<Ident>(text) {
Ok(ident) => {
let text = ident.to_string();
Ok(ForeignName { text, span })
Ok(ForeignName { text })
}
Err(err) => Err(Error::new(span, err)),
}
Expand Down

0 comments on commit d9a561c

Please sign in to comment.