Skip to content

Commit 06251e3

Browse files
committed
fix span() for warn_directory_ownership case
1 parent d810c30 commit 06251e3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/spanned.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,12 @@ macro_rules! span_with_attrs_lo_hi {
3131
if attrs.is_empty() {
3232
mk_sp($lo, $hi)
3333
} else {
34-
mk_sp(attrs[0].span.lo(), $hi)
34+
// this path is already gone at latest rust-ap-* 627.0.0
35+
if attrs[0].item.path.to_string() == "warn_directory_ownership" {
36+
mk_sp($lo, $hi)
37+
} else {
38+
mk_sp(attrs[0].span.lo(), $hi)
39+
}
3540
}
3641
}};
3742
}

0 commit comments

Comments
 (0)