From c959813bfd376322491f0a7b89d7dce79d5af942 Mon Sep 17 00:00:00 2001 From: Tyler Weaver Date: Mon, 30 Jan 2023 07:59:01 -0700 Subject: [PATCH] needless_lifetimes: macro test Signed-off-by: Tyler Weaver --- tests/ui/needless_lifetimes.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/ui/needless_lifetimes.rs b/tests/ui/needless_lifetimes.rs index 2efc936752e..ac467cbbdf1 100644 --- a/tests/ui/needless_lifetimes.rs +++ b/tests/ui/needless_lifetimes.rs @@ -495,4 +495,17 @@ fn multiple_inputs_output_would_be_elided<'a, 'b>(x: &'a u8, y: &'b u8, z: &'b u } } +mod skip_inside_macros { + macro_rules! print_with_one_input { + ($a:expr) => { + fn print_with_one_input<'a>(x: &'a u8) -> &'a u8 { + println!("{}", $a); + unimplemented!() + } + }; + } + + print_with_one_input!("this is a dandy little string literal"); +} + fn main() {}