diff --git a/src/test/ui/macros/macro-interpolation.rs b/src/test/ui/macros/macro-interpolation.rs index abe1f2aaf15..2dee804fb31 100644 --- a/src/test/ui/macros/macro-interpolation.rs +++ b/src/test/ui/macros/macro-interpolation.rs @@ -14,8 +14,15 @@ fn $fnname($arg: $ty) -> Option<$ty> $body } +macro_rules! qpath { + (<$type:ty as $trait:path>::$name:ident) => { + <$type as $trait>::$name + }; +} + pub fn main() { + let _: qpath!(::Owned); + assert!(overly_complicated!(f, x, Option, { return Some(x); }, Some(8), Some(y), y) == 8) - }