diff options
author | John Hodge <tpg@mutabah.net> | 2016-05-24 21:55:06 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-05-24 21:55:06 +0800 |
commit | 23cba420f497b5da5b0a63f078cea2ef2291078a (patch) | |
tree | 96d60ee57ac0014f3a359b94a0ae3db94bae7acd /src/expand/lang_item.cpp | |
parent | 74868acb8e3db00cbab565abd6fbd76cbf763674 (diff) | |
download | mrust-23cba420f497b5da5b0a63f078cea2ef2291078a.tar.gz |
AST - Spans, spans everywhere!
Diffstat (limited to 'src/expand/lang_item.cpp')
-rw-r--r-- | src/expand/lang_item.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/expand/lang_item.cpp b/src/expand/lang_item.cpp index f794bb32..d381d17c 100644 --- a/src/expand/lang_item.cpp +++ b/src/expand/lang_item.cpp @@ -101,11 +101,11 @@ class Decorator_LangItem: { public: AttrStage stage() const override { return AttrStage::EarlyPost; } - void handle(const AST::MetaItem& attr, AST::Crate& crate, const AST::Path& path, AST::Module& mod, AST::Item& i) const override + void handle(const Span& sp, const AST::MetaItem& attr, AST::Crate& crate, const AST::Path& path, AST::Module& mod, AST::Item& i) const override { TU_MATCH_DEF(::AST::Item, (i), (e), ( - TODO(Span(), "Unknown item type with #[lang=\""<<attr<<"\"] attached at " << path); + TODO(sp, "Unknown item type with #[lang=\""<<attr<<"\"] attached at " << path); ), (Function, handle_lang_item(crate, path, attr.string(), AST::ITEM_FN); @@ -119,7 +119,7 @@ public: ) } - void handle(const AST::MetaItem& mi, AST::Crate& crate, const AST::Module& mod, AST::ImplDef& impl) const override { + void handle(const Span& sp, const AST::MetaItem& mi, AST::Crate& crate, const AST::Module& mod, AST::ImplDef& impl) const override { const ::std::string& name = mi.string(); if( name == "i8" ) {} @@ -135,7 +135,7 @@ public: else if( name == "const_ptr" ) {} else if( name == "mut_ptr" ) {} else { - throw CompileError::Generic(FMT("Unknown lang item '" << name << "' on impl")); + ERROR(sp, E0000, "Unknown lang item '" << name << "' on impl"); } } }; |