Skip to content

Commit c959813

Browse files
committed
needless_lifetimes: macro test
Signed-off-by: Tyler Weaver <[email protected]>
1 parent d020fd7 commit c959813

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/ui/needless_lifetimes.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,4 +495,17 @@ mod pr_9743_output_lifetime_checks {
495495
}
496496
}
497497

498+
mod skip_inside_macros {
499+
macro_rules! print_with_one_input {
500+
($a:expr) => {
501+
fn print_with_one_input<'a>(x: &'a u8) -> &'a u8 {
502+
println!("{}", $a);
503+
unimplemented!()
504+
}
505+
};
506+
}
507+
508+
print_with_one_input!("this is a dandy little string literal");
509+
}
510+
498511
fn main() {}

0 commit comments

Comments
 (0)