Store finer grained tokens of Signature
This is required in order for function pointers like `fn(&CxxString)` to
work, which requires the cxx bridge to emit `fn(&::cxx::CxxString)`
rather than a straight copy of the input tokens.
diff --git a/syntax/impls.rs b/syntax/impls.rs
index 27aa43a..34fb851 100644
--- a/syntax/impls.rs
+++ b/syntax/impls.rs
@@ -116,7 +116,8 @@
args,
ret,
throws,
- tokens: _,
+ paren_token: _,
+ throws_tokens: _,
} = self;
let Signature {
fn_token: _,
@@ -124,9 +125,14 @@
args: args2,
ret: ret2,
throws: throws2,
- tokens: _,
+ paren_token: _,
+ throws_tokens: _,
} = other;
- receiver == receiver2 && args == args2 && ret == ret2 && throws == throws2
+ receiver == receiver2
+ && ret == ret2
+ && throws == throws2
+ && args.len() == args2.len()
+ && args.iter().zip(args2).all(|(arg, arg2)| arg == arg2)
}
}
@@ -138,10 +144,13 @@
args,
ret,
throws,
- tokens: _,
+ paren_token: _,
+ throws_tokens: _,
} = self;
receiver.hash(state);
- args.hash(state);
+ for arg in args {
+ arg.hash(state);
+ }
ret.hash(state);
throws.hash(state);
}