Skip to content

Commit a411a32

Browse files
Rollup merge of rust-lang#96776 - liuw:hir, r=oli-obk
Fix two minor issues in hir.rs I found these two places in hir.rs which could use a bit of improvements while going through the code. No functional change.
2 parents 6db969e + fcb385c commit a411a32

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

compiler/rustc_hir/src/hir.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -1441,7 +1441,7 @@ pub enum AsyncGeneratorKind {
14411441
/// An explicit `async` block written by the user.
14421442
Block,
14431443

1444-
/// An explicit `async` block written by the user.
1444+
/// An explicit `async` closure written by the user.
14451445
Closure,
14461446

14471447
/// The `async` block generated as the body of an async function.
@@ -2078,10 +2078,7 @@ pub enum YieldSource {
20782078

20792079
impl YieldSource {
20802080
pub fn is_await(&self) -> bool {
2081-
match self {
2082-
YieldSource::Await { .. } => true,
2083-
YieldSource::Yield => false,
2084-
}
2081+
matches!(self, YieldSource::Await { .. })
20852082
}
20862083
}
20872084

0 commit comments

Comments
 (0)