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