summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-10-12 10:32:41 +0800
committerJohn Hodge <tpg@mutabah.net>2016-10-12 10:32:41 +0800
commit27f45b3a201ff3bd39a331c685c1db648a4f11ed (patch)
tree404c08e543855beb5f336ae3bb2d52d2818bb7cc
parentef736aa229872419a6fa159844d3899315416aec (diff)
downloadmrust-27f45b3a201ff3bd39a331c685c1db648a4f11ed.tar.gz
HIR Expand Closures - Use a different name for closures from impl blocks
-rw-r--r--src/hir_expand/closures.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hir_expand/closures.cpp b/src/hir_expand/closures.cpp
index fb481ff5..ca117c5d 100644
--- a/src/hir_expand/closures.cpp
+++ b/src/hir_expand/closures.cpp
@@ -925,7 +925,7 @@ namespace {
::HIR::SimplePath root_mod_path("",{});
m_cur_mod_path = &root_mod_path;
m_new_type = [&](auto s)->auto {
- auto name = FMT("closure_" << closure_count);
+ auto name = FMT("closure_I_" << closure_count);
closure_count += 1;
auto boxed = box$(( ::HIR::VisEnt< ::HIR::TypeItem> { false, ::HIR::TypeItem( mv$(s) ) } ));
crate.m_root_module.m_mod_items.insert( ::std::make_pair(name, mv$(boxed)) );