Reserve gen keyword for gen {} blocks and gen fn in 2024 edition

This commit is contained in:
Oli Scherer 2023-10-05 11:30:55 +00:00
parent ccb160d343
commit a61cf673cd
14 changed files with 138 additions and 4 deletions

View file

@ -2357,6 +2357,12 @@ pub enum Async {
No,
}
#[derive(Copy, Clone, Encodable, Decodable, Debug)]
pub enum Gen {
Yes { span: Span, closure_id: NodeId, return_impl_trait_id: NodeId },
No,
}
impl Async {
pub fn is_async(self) -> bool {
matches!(self, Async::Yes { .. })