Skip to content

Commit 3a4d93c

Browse files
committed
needless_lifetimes: macro test
Signed-off-by: Tyler Weaver <[email protected]>
1 parent 96c28d1 commit 3a4d93c

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/ui/needless_lifetimes.rs

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

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

0 commit comments

Comments
 (0)