mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-05 17:36:20 +00:00
It is an enum with three variant, and all the variants have identical fields, which is silly. This commit does the following. - Renames it as `CoroutineMarker`, because the `Kind` suffix is used for enums. (The existing doc comment already uses the word "marker".) - Renames the existing `GenBlockKind` as `CoroutineKind`, uses it within `CoroutineMarker`, and adds `CoroutineKind::is_gen`. This removes the need for the `span`, `closure_id` and `return_id` methods; direct field access now suffices.
The rustc_ast crate contains those things concerned purely with syntax
– that is, the AST ("abstract syntax tree"), along with some definitions for tokens and token streams, data structures/traits for mutating ASTs, and shared definitions for other AST-related parts of the compiler (like the lexer and macro-expansion).
For more information about how these things work in rustc, see the rustc dev guide: