diff options
-rw-r--r-- | src/parse/root.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/parse/root.cpp b/src/parse/root.cpp index 9eedd319..4c7d9551 100644 --- a/src/parse/root.cpp +++ b/src/parse/root.cpp @@ -148,7 +148,11 @@ void Parse_WhereClause(TokenStream& lex, AST::GenericParams& params) if( tok.type() == TOK_LIFETIME )
{
- throw ParseError::Todo(lex, "Lifetime bounds in 'where' clauses");
+ auto lhs = mv$(tok.str());
+ GET_CHECK_TOK(tok, lex, TOK_COLON);
+ GET_CHECK_TOK(tok, lex, TOK_LIFETIME);
+ auto rhs = mv$(tok.str());
+ params.add_bound( AST::GenericBound::make_Lifetime({lhs, rhs}) );
}
// Higher-ranked types/lifetimes
else if( tok.type() == TOK_RWORD_FOR )
|