Skip to content

Commit dbb1388

Browse files
committed
Additional testcase.
1 parent 3604f36 commit dbb1388

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/test/run-pass/qquote.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,11 @@ fn main() {
5656
let expr4 = #ast{2 - $(#(3)) + 9};
5757
check_pp(expr4, pprust::print_expr, "2 - 3 + 9");
5858

59-
let ty = #ast(ty){option<int>};
60-
check_pp(ty, pprust::print_type, "option<int>");
59+
let ty = #ast(ty){int};
60+
check_pp(ty, pprust::print_type, "int");
61+
62+
let ty2 = #ast(ty){option<$(ty)>};
63+
check_pp(ty2, pprust::print_type, "option<int>");
6164

6265
let item = #ast(item){const x : int = 10;};
6366
check_pp(item, pprust::print_item, "const x: int = 10;");
@@ -68,8 +71,8 @@ fn main() {
6871
let stmt = #ast(stmt){let x = 20;};
6972
check_pp(*stmt, pprust::print_stmt, "let x = 20;");
7073

71-
let stmt2 = #ast(stmt){let x : $(ty) = some($(abc));};
72-
check_pp(*stmt2, pprust::print_stmt, "let x: option<int> = some(23);");
74+
let stmt2 = #ast(stmt){let x : $(ty) = $(abc);};
75+
check_pp(*stmt2, pprust::print_stmt, "let x: int = 23;");
7376

7477
let pat = #ast(pat){some(_)};
7578
check_pp(pat, pprust::print_pat, "some(_)");

0 commit comments

Comments
 (0)