summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/parse/paths.cpp2
-rw-r--r--src/parse/root.cpp2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/parse/paths.cpp b/src/parse/paths.cpp
index d103840e..26311d83 100644
--- a/src/parse/paths.cpp
+++ b/src/parse/paths.cpp
@@ -39,6 +39,8 @@ AST::Path Parse_Path(TokenStream& lex, eParsePathGenericMode generic_mode)
return AST::Path(AST::Path::TagSuper(), count, Parse_PathNodes(lex, generic_mode));
}
+ case TOK_RWORD_CRATE:
+ GET_CHECK_TOK(tok, lex, TOK_DOUBLE_COLON);
case TOK_DOUBLE_COLON:
return Parse_Path(lex, true, generic_mode);
diff --git a/src/parse/root.cpp b/src/parse/root.cpp
index 5fc90f0c..5eae2488 100644
--- a/src/parse/root.cpp
+++ b/src/parse/root.cpp
@@ -1396,6 +1396,8 @@ void Parse_Use(TokenStream& lex, ::std::function<void(AST::UseStmt, ::std::strin
case TOK_IDENT:
path.append( AST::PathNode(mv$(tok.str()), {}) );
break;
+ case TOK_RWORD_CRATE:
+ break;
// Leading :: is allowed and ignored for the $crate feature
case TOK_DOUBLE_COLON:
// Absolute path