diff options
author | John Hodge (Mutabah) <acessdev@gmail.com> | 2018-09-30 21:35:32 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-30 21:35:32 +0800 |
commit | bd3d69813cc54439fdc0db33943fa1254db3df06 (patch) | |
tree | 389b3f9fff419bd38275fddbf63fcbf3142d2f1c /src/mir/cleanup.cpp | |
parent | d85ac84278fa0322f1df0b16a45a1cdde83cba57 (diff) | |
parent | fe8018c3b2e2be2c3153a5c1a1bb73cd9c6ca370 (diff) | |
download | mrust-bd3d69813cc54439fdc0db33943fa1254db3df06.tar.gz |
Merge pull request #84 from thepowersgang/ondemand-generation
Generate MIR when required for constant evaluation
Diffstat (limited to 'src/mir/cleanup.cpp')
-rw-r--r-- | src/mir/cleanup.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mir/cleanup.cpp b/src/mir/cleanup.cpp index 78939f78..37d256df 100644 --- a/src/mir/cleanup.cpp +++ b/src/mir/cleanup.cpp @@ -1219,7 +1219,7 @@ void MIR_Cleanup(const StaticTraitResolve& resolve, const ::HIR::ItemPath& path, void MIR_CleanupCrate(::HIR::Crate& crate) { ::MIR::OuterVisitor ov { crate, [&](const auto& res, const auto& p, auto& expr_ptr, const auto& args, const auto& ty){ - MIR_Cleanup(res, p, *expr_ptr.m_mir, args, ty); + MIR_Cleanup(res, p, expr_ptr.get_mir_or_error_mut(Span()), args, ty); } }; ov.visit_crate(crate); } |