We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c1e9b7b commit a36e7c7Copy full SHA for a36e7c7
src/matches.rs
@@ -45,6 +45,7 @@ impl<'a> ArmWrapper<'a> {
45
impl<'a> Spanned for ArmWrapper<'a> {
46
fn span(&self) -> Span {
47
if let Some(lo) = self.beginning_vert {
48
+ let lo = std::cmp::min(lo, self.arm.span().lo());
49
mk_sp(lo, self.arm.span().hi())
50
} else {
51
self.arm.span()
tests/target/issue-3974.rs
@@ -0,0 +1,10 @@
1
+fn emulate_foreign_item() {
2
+ match link_name {
3
+ // A comment here will duplicate the attribute
4
+ #[rustfmt::skip]
5
+ | "pthread_mutexattr_init"
6
+ | "pthread_mutexattr_settype"
7
+ | "pthread_mutex_init"
8
+ => {}
9
+ }
10
+}
0 commit comments