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/std_prelude.cpp | |
parent | 74868acb8e3db00cbab565abd6fbd76cbf763674 (diff) | |
download | mrust-23cba420f497b5da5b0a63f078cea2ef2291078a.tar.gz |
AST - Spans, spans everywhere!
Diffstat (limited to 'src/expand/std_prelude.cpp')
-rw-r--r-- | src/expand/std_prelude.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/expand/std_prelude.cpp b/src/expand/std_prelude.cpp index c8ad6471..b7493570 100644 --- a/src/expand/std_prelude.cpp +++ b/src/expand/std_prelude.cpp @@ -9,9 +9,9 @@ class Decorator_NoStd: public: AttrStage stage() const override { return AttrStage::EarlyPre; } - void handle(const AST::MetaItem& mi, AST::Crate& crate) const override { + void handle(const Span& sp, const AST::MetaItem& mi, AST::Crate& crate) const override { if( crate.m_load_std != AST::Crate::LOAD_STD ) { - ERROR(Span()/*mi.span()*/, E0000, "Invalid use of #![no_std] with itself or #![no_core]"); + ERROR(sp, E0000, "Invalid use of #![no_std] with itself or #![no_core]"); } crate.m_load_std = AST::Crate::LOAD_CORE; } @@ -22,9 +22,9 @@ class Decorator_NoCore: public: AttrStage stage() const override { return AttrStage::EarlyPre; } - void handle(const AST::MetaItem& mi, AST::Crate& crate) const override { + void handle(const Span& sp, const AST::MetaItem& mi, AST::Crate& crate) const override { if( crate.m_load_std != AST::Crate::LOAD_STD ) { - ERROR(Span()/*mi.span()*/, E0000, "Invalid use of #![no_core] with itself or #![no_std]"); + ERROR(sp, E0000, "Invalid use of #![no_core] with itself or #![no_std]"); } crate.m_load_std = AST::Crate::LOAD_NONE; } |