Skip to content

Commit 01800ca

Browse files
committed
Add test of qpath interpolations
1 parent dd549dc commit 01800ca

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/test/ui/macros/macro-interpolation.rs

+8-1
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,15 @@ macro_rules! overly_complicated {
1414

1515
}
1616

17+
macro_rules! qpath {
18+
(<$type:ty as $trait:path>::$name:ident) => {
19+
<$type as $trait>::$name
20+
};
21+
}
22+
1723
pub fn main() {
24+
let _: qpath!(<str as ToOwned>::Owned);
25+
1826
assert!(overly_complicated!(f, x, Option<usize>, { return Some(x); },
1927
Some(8), Some(y), y) == 8)
20-
2128
}

0 commit comments

Comments
 (0)