Skip to content

Commit

Permalink
Rollup merge of #96776 - liuw:hir, r=oli-obk
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
GuillaumeGomez authored May 6, 2022
2 parents 6db969e + fcb385c commit a411a32
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions compiler/rustc_hir/src/hir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1441,7 +1441,7 @@ pub enum AsyncGeneratorKind {
/// An explicit `async` block written by the user.
Block,

/// An explicit `async` block written by the user.
/// An explicit `async` closure written by the user.
Closure,

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

impl YieldSource {
pub fn is_await(&self) -> bool {
match self {
YieldSource::Await { .. } => true,
YieldSource::Yield => false,
}
matches!(self, YieldSource::Await { .. })
}
}

Expand Down

0 comments on commit a411a32

Please sign in to comment.