summaryrefslogtreecommitdiff
path: root/src/hir/from_ast.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-10-23 20:58:48 +0800
committerJohn Hodge <tpg@mutabah.net>2016-10-23 20:58:48 +0800
commit74dfcc04f3acbe8409b06b7901ab2a4a0802a73a (patch)
tree512b5d4308293a12458478a83e34bab54a6c3d8f /src/hir/from_ast.cpp
parentab5e023d02ac46505c8c7fc733a195d07429860e (diff)
downloadmrust-74dfcc04f3acbe8409b06b7901ab2a4a0802a73a.tar.gz
HIR Lower - Don't panic on HRLs
Diffstat (limited to 'src/hir/from_ast.cpp')
-rw-r--r--src/hir/from_ast.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/hir/from_ast.cpp b/src/hir/from_ast.cpp
index bb40ece9..23cca0e2 100644
--- a/src/hir/from_ast.cpp
+++ b/src/hir/from_ast.cpp
@@ -703,8 +703,8 @@
}
),
(TraitObject,
- if( e.hrls.size() > 0 )
- TODO(ty.span(), "TraitObjects with HRLS - " << ty);
+ //if( e.hrls.size() > 0 )
+ // TODO(ty.span(), "TraitObjects with HRLS - " << ty);
::HIR::TypeRef::Data::Data_TraitObject v;
// TODO: Lifetime
for(const auto& t : e.traits)
@@ -726,13 +726,11 @@
v.m_trait = LowerHIR_TraitPath(ty.span(), t);
}
}
- // TODO: This is possible - &Send is for some reason a valid trait object
- //ASSERT_BUG(ty.span(), v.m_trait.m_path.m_path != ::HIR::SimplePath(), "TraitObject type didn't contain a data trait - " << ty);
return ::HIR::TypeRef( ::HIR::TypeRef::Data::make_TraitObject( mv$(v) ) );
),
(ErasedType,
- if( e.hrls.size() > 0 )
- TODO(ty.span(), "ErasedType with HRLS - " << ty);
+ //if( e.hrls.size() > 0 )
+ // TODO(ty.span(), "ErasedType with HRLS - " << ty);
ASSERT_BUG(ty.span(), e.traits.size() > 0, "ErasedType with no traits");
::std::vector< ::HIR::TraitPath> traits;