Skip to content

Commit

Permalink
Lower HIR - GATs, inferred array sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
thepowersgang committed Dec 17, 2023
1 parent 35757fa commit b068e8b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/hir/from_ast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -911,7 +911,7 @@ ::HIR::TypeRef LowerHIR_Type(const ::TypeRef& ty)
return ::HIR::TypeRef::new_array( mv$(inner), HIR::ConstGeneric::make_Unevaluated(std::make_shared<HIR::ExprPtr>(LowerHIR_Expr(e.size))) );
}
else {
TODO(ty.span(), "Array with inferred size");
return ::HIR::TypeRef::new_array( mv$(inner), HIR::ConstGeneric::make_Infer({}) );
}
}
TU_ARMA(Slice, e) {
Expand Down Expand Up @@ -1463,11 +1463,9 @@ ::HIR::Trait LowerHIR_Trait(::HIR::SimplePath trait_path, const ::AST::Trait& f)
{
TU_MATCH_HDRA( (b), {)
TU_ARMA(TypeLifetime, be) {
ASSERT_BUG(item.span, be.type == ::HIR::TypeRef("Self", 0xFFFF), "Invalid lifetime bound on associated type");
lifetime_bound = mv$(be.valid_for);
}
TU_ARMA(TraitBound, be) {
ASSERT_BUG(item.span, be.type == ::HIR::TypeRef("Self", 0xFFFF), "Invalid trait bound on associated type");
trait_bounds.push_back( mv$(be.trait) );
}
TU_ARMA(Lifetime, be) {
Expand Down

0 comments on commit b068e8b

Please sign in to comment.