Skip to content

Commit f12d4eb

Browse files
refactor: update Attribute path access
1 parent 580d6e9 commit f12d4eb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

rustfmt-core/rustfmt-lib/src/skip.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ impl SkipContext {
2929
}
3030
}
3131
for attr in attrs {
32-
if is_skip_attr_with(&attr.item.path.segments, |s| s == sym!(macros)) {
32+
if is_skip_attr_with(&attr.get_normal_item().path.segments, |s| s == sym!(macros)) {
3333
get_skip_names(&mut self.macros, attr)
34-
} else if is_skip_attr_with(&attr.item.path.segments, |s| s == sym::attributes) {
34+
} else if is_skip_attr_with(&attr.get_normal_item().path.segments, |s| s == sym::attributes) {
3535
get_skip_names(&mut self.attributes, attr)
3636
}
3737
}

rustfmt-core/rustfmt-lib/src/visitor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,7 @@ impl<'b, 'a: 'b> FmtVisitor<'a> {
781781
ErrorKind::DeprecatedAttr,
782782
)],
783783
);
784-
} else if self.is_unknown_rustfmt_attr(&attr.path.segments) {
784+
} else if self.is_unknown_rustfmt_attr(&attr.get_normal_item().path.segments) {
785785
let file_name = self.parse_sess.span_to_filename(attr.span);
786786
self.report.append(
787787
file_name,

0 commit comments

Comments
 (0)