We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
ttdelim_span
1 parent 8771282 commit 53379a7Copy full SHA for 53379a7
compiler/rustc_expand/src/parse/tests.rs
@@ -294,9 +294,7 @@ fn ttdelim_span() {
294
.unwrap();
295
296
let ast::ExprKind::MacCall(mac) = &expr.kind else { panic!("not a macro") };
297
- let tts: Vec<_> = mac.args.tokens.clone().into_trees().collect();
298
-
299
- let span = tts.iter().rev().next().unwrap().span();
+ let span = mac.args.tokens.trees().last().unwrap().span();
300
301
match sess.source_map().span_to_snippet(span) {
302
Ok(s) => assert_eq!(&s[..], "{ body }"),
0 commit comments