1
Fork 0

Improve some attributes error spans

This commit is contained in:
Guillaume Gomez 2020-11-28 17:53:20 +01:00
parent 7df0052df8
commit 63816da5ed
6 changed files with 33 additions and 31 deletions

View file

@ -182,7 +182,9 @@ impl Attribute {
pub fn name_value_literal_span(&self) -> Option<Span> {
match self.kind {
AttrKind::Normal(ref item, _) => item.meta(self.span).and_then(|meta| meta.name_value_literal_span()),
AttrKind::Normal(ref item, _) => {
item.meta(self.span).and_then(|meta| meta.name_value_literal_span())
}
AttrKind::DocComment(..) => None,
}
}