Add tests

This commit is contained in:
Michael Goulet 2024-12-10 19:42:09 +00:00
parent 3f97c6be8d
commit c5d02237d3
9 changed files with 173 additions and 1 deletions

View file

@ -348,7 +348,9 @@ impl<'a> Parser<'a> {
TyKind::Err(guar)
}
}
} else if self.check_keyword(kw::Unsafe) {
} else if self.check_keyword(kw::Unsafe)
&& self.look_ahead(1, |tok| matches!(tok.kind, token::Lt))
{
self.parse_unsafe_binder_ty()?
} else {
let msg = format!("expected type, found {}", super::token_descr(&self.token));