Rollup merge of #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.
This commit is contained in:
commit
a411a32cae
1 changed files with 2 additions and 5 deletions
|
|
@ -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.
|
||||
|
|
@ -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 { .. })
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue