diff options
author | John Hodge <tpg@mutabah.net> | 2016-09-28 18:00:07 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-09-28 18:00:07 +0800 |
commit | 93f81a5e8fb13fd08a39026555754bd0cbb43fd7 (patch) | |
tree | 787080c8e189489a4b861480c31eaf0eaeda360c | |
parent | 50e8a245ed44ebbc5f3459e4f4eab5ed5c218017 (diff) | |
download | mrust-93f81a5e8fb13fd08a39026555754bd0cbb43fd7.tar.gz |
Expand lang - Handle #[lang] on extern fn-s by ignoring them
-rw-r--r-- | src/expand/lang_item.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/expand/lang_item.cpp b/src/expand/lang_item.cpp index f8aea8c3..7fcfedc9 100644 --- a/src/expand/lang_item.cpp +++ b/src/expand/lang_item.cpp @@ -87,7 +87,9 @@ void handle_lang_item(const Span& sp, AST::Crate& crate, const AST::Path& path, // Functions else if( name == "panic" ) { } else if( name == "panic_bounds_check" ) { } - else if( name == "panic_fmt" ) { } + else if( name == "panic_fmt" ) { + + } else if( name == "str_eq" ) { } // - builtin `box` support else if( name == "exchange_malloc" ) { } @@ -123,7 +125,12 @@ public: TODO(sp, "Unknown item type with #[lang=\""<<attr<<"\"] attached at " << path); ), (Function, - handle_lang_item(sp, crate, path, attr.string(), AST::ITEM_FN); + if( e.code().is_valid() ) { + handle_lang_item(sp, crate, path, attr.string(), AST::ITEM_FN); + } + else { + //handle_lang_item(sp, crate, path, attr.string(), AST::ITEM_EXTERN_FN); + } ), (Struct, handle_lang_item(sp, crate, path, attr.string(), AST::ITEM_STRUCT); |