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:
Guillaume Gomez 2022-05-06 20:05:45 +02:00 committed by GitHub
commit a411a32cae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 { .. })
}
}