From 878c7bc03640ded25dd6e704aa443845cfd6d144 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sun, 20 Jan 2019 15:45:59 +0800 Subject: macro_rules - Handle `dyn Trait` in :ty --- src/macro_rules/eval.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/macro_rules/eval.cpp b/src/macro_rules/eval.cpp index 3315b24c..e864537c 100644 --- a/src/macro_rules/eval.cpp +++ b/src/macro_rules/eval.cpp @@ -1073,9 +1073,11 @@ namespace case TOK_PAREN_OPEN: case TOK_SQUARE_OPEN: return consume_tt(lex); + case TOK_IDENT: + if( TARGETVER_1_29 && lex.next_tok().str() == "dyn" ) + lex.consume(); case TOK_RWORD_SUPER: case TOK_RWORD_SELF: - case TOK_IDENT: case TOK_DOUBLE_COLON: case TOK_INTERPOLATED_IDENT: case TOK_INTERPOLATED_PATH: -- cgit v1.2.3