Rollup merge of #119239 - compiler-errors:yield-coercion, r=davidtwco

Remove unnecessary arm in `check_expr_yield`

We always set up the `resume_yield_tys` for async blocks and fns, so this arm was unreachable.
This commit is contained in:
León Orell Valerian Liehr
2024-01-03 16:08:24 +01:00
committed by GitHub
2 changed files with 1 additions and 16 deletions

View File

@@ -2110,12 +2110,6 @@ pub enum YieldSource {
Yield,
}
impl YieldSource {
pub fn is_await(&self) -> bool {
matches!(self, YieldSource::Await { .. })
}
}
impl fmt::Display for YieldSource {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str(match self {