Shrink ast::Attribute.
This commit is contained in:
parent
76be14b5ca
commit
e97825ed5e
2 changed files with 4 additions and 4 deletions
|
|
@ -58,8 +58,8 @@ fn get_skip_names(kind: &str, attrs: &[ast::Attribute]) -> Vec<String> {
|
|||
for attr in attrs {
|
||||
// rustc_ast::ast::Path is implemented partialEq
|
||||
// but it is designed for segments.len() == 1
|
||||
if let ast::AttrKind::Normal(attr_item, _) = &attr.kind {
|
||||
if pprust::path_to_string(&attr_item.path) != path {
|
||||
if let ast::AttrKind::Normal(normal) = &attr.kind {
|
||||
if pprust::path_to_string(&normal.item.path) != path {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -811,8 +811,8 @@ impl<'b, 'a: 'b> FmtVisitor<'a> {
|
|||
);
|
||||
} else {
|
||||
match &attr.kind {
|
||||
ast::AttrKind::Normal(ref attribute_item, _)
|
||||
if self.is_unknown_rustfmt_attr(&attribute_item.path.segments) =>
|
||||
ast::AttrKind::Normal(ref normal)
|
||||
if self.is_unknown_rustfmt_attr(&normal.item.path.segments) =>
|
||||
{
|
||||
let file_name = self.parse_sess.span_to_filename(attr.span);
|
||||
self.report.append(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue