Fix parsing of interpolated paths
This commit is contained in:
parent
371be3c6c4
commit
9bed0ddb0e
2 changed files with 18 additions and 1 deletions
16
src/test/run-pass/macro-path.rs
Normal file
16
src/test/run-pass/macro-path.rs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
mod m {
|
||||
pub type t = int;
|
||||
}
|
||||
|
||||
fn macros() {
|
||||
macro_rules! foo {
|
||||
($p:path) => {
|
||||
fn f() -> $p { 10 }
|
||||
f()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
assert foo!(m::t) == 10;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue