diff options
author | John Hodge <tpg@ucc.asn.au> | 2019-11-02 11:07:23 +0800 |
---|---|---|
committer | John Hodge <tpg@ucc.asn.au> | 2019-11-02 11:07:23 +0800 |
commit | 1d02810c3cf908bfba7c15ae50eb5314603b9d85 (patch) | |
tree | 79dd5e4ef4c3ff79db0912ba546f08e61a7a8c10 /src/expand/std_prelude.cpp | |
parent | 7111acba04d72fe4084b1a1f3209ff83efe8614d (diff) | |
parent | 8b53b38f40625ab0510f541d69db3f83332a830a (diff) | |
download | mrust-1d02810c3cf908bfba7c15ae50eb5314603b9d85.tar.gz |
Merge branch 'nightly-1.29' - #95 Working support for rustc 1.29
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 d6022959..58b56cf7 100644 --- a/src/expand/std_prelude.cpp +++ b/src/expand/std_prelude.cpp @@ -47,7 +47,7 @@ class Decorator_NoPrelude: public: AttrStage stage() const override { return AttrStage::Pre; } - void handle(const Span& sp, const AST::Attribute& mi, ::AST::Crate& crate, const AST::Path& path, AST::Module& mod, AST::Item&i) const override { + void handle(const Span& sp, const AST::Attribute& mi, ::AST::Crate& crate, const AST::Path& path, AST::Module& mod, slice<const AST::Attribute> attrs, AST::Item&i) const override { if( i.is_Module() ) { i.as_Module().m_insert_prelude = false; } @@ -63,14 +63,14 @@ class Decorator_PreludeImport: public: AttrStage stage() const override { return AttrStage::Post; } - void handle(const Span& sp, const AST::Attribute& mi, ::AST::Crate& crate, const AST::Path& path, AST::Module& mod, AST::Item&i) const override { + void handle(const Span& sp, const AST::Attribute& mi, ::AST::Crate& crate, const AST::Path& path, AST::Module& mod, slice<const AST::Attribute> attrs, AST::Item&i) const override { if( i.is_Use() ) { - const auto& p = i.as_Use().path; + const auto& p = i.as_Use().entries.front().path; // TODO: Ensure that this statement is a glob (has a name of "") crate.m_prelude_path = AST::Path(p); } else { - ERROR(sp, E0000, "Invalid use of #[no_prelude] on non-module"); + ERROR(sp, E0000, "Invalid use of #[prelude_import] on non-module"); } } }; |