summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2017-09-23 14:51:48 +0800
committerJohn Hodge <tpg@mutabah.net>2017-09-23 14:51:48 +0800
commit60ad3249e0f48379ecf916631b42286b89174c4d (patch)
tree4744210ba4114c11a532dea4e1441dfca285efd9
parent4d99850792a83b0416459ed930403304f450f8f6 (diff)
downloadmrust-60ad3249e0f48379ecf916631b42286b89174c4d.tar.gz
Expand - Little fixes for libpanic_unwind win32
-rw-r--r--src/ast/ast.hpp1
-rw-r--r--src/expand/lang_item.cpp6
-rw-r--r--src/macro_rules/eval.cpp3
3 files changed, 10 insertions, 0 deletions
diff --git a/src/ast/ast.hpp b/src/ast/ast.hpp
index 3e0545ed..2ef17718 100644
--- a/src/ast/ast.hpp
+++ b/src/ast/ast.hpp
@@ -46,6 +46,7 @@ enum eItemType
ITEM_TRAIT,
ITEM_STRUCT,
ITEM_FN,
+ ITEM_STATIC,
};
struct StructItem
diff --git a/src/expand/lang_item.cpp b/src/expand/lang_item.cpp
index 5c92cd76..53606bea 100644
--- a/src/expand/lang_item.cpp
+++ b/src/expand/lang_item.cpp
@@ -85,6 +85,9 @@ void handle_lang_item(const Span& sp, AST::Crate& crate, const AST::Path& path,
else if( name == "range_to" ) { }
else if( name == "unsafe_cell" ) { }
+ // Statics
+ else if( name == "msvc_try_filter" ) { }
+
// Functions
else if( name == "panic" ) { }
else if( name == "panic_bounds_check" ) { }
@@ -139,6 +142,9 @@ public:
//handle_lang_item(sp, crate, path, attr.string(), AST::ITEM_EXTERN_FN);
}
),
+ (Static,
+ handle_lang_item(sp, crate, path, attr.string(), AST::ITEM_STATIC);
+ ),
(Struct,
handle_lang_item(sp, crate, path, attr.string(), AST::ITEM_STRUCT);
),
diff --git a/src/macro_rules/eval.cpp b/src/macro_rules/eval.cpp
index 61a190ab..8f7072e5 100644
--- a/src/macro_rules/eval.cpp
+++ b/src/macro_rules/eval.cpp
@@ -1026,6 +1026,9 @@ namespace
TRACE_FUNCTION;
switch(lex.next())
{
+ case TOK_UNDERSCORE:
+ lex.consume();
+ return true;
case TOK_INTERPOLATED_TYPE:
lex.consume();
return true;