diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-10-02 14:33:48 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-10-07 09:50:51 +1100 |
| commit | e80096747853fc5a0c8a98e8532c2f74ba770aa2 (patch) | |
| tree | a52d8824cdca97269bf06267d649ccc867869682 /compiler/rustc_middle/src | |
| parent | 3386530c9166f5b1177f81fb2037dd0e0b5a50f1 (diff) | |
| download | rust-e80096747853fc5a0c8a98e8532c2f74ba770aa2.tar.gz rust-e80096747853fc5a0c8a98e8532c2f74ba770aa2.zip | |
Simplify two matches.
Matches involving `GenericArgKind` pairs typically use a single `_` for the impossible case. This commit shortens two verbose matches in this way.
Diffstat (limited to 'compiler/rustc_middle/src')
| -rw-r--r-- | compiler/rustc_middle/src/ty/relate.rs | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/compiler/rustc_middle/src/ty/relate.rs b/compiler/rustc_middle/src/ty/relate.rs index 61c03922ac0..4c7bcb1bf2e 100644 --- a/compiler/rustc_middle/src/ty/relate.rs +++ b/compiler/rustc_middle/src/ty/relate.rs @@ -212,15 +212,7 @@ impl<'tcx> Relate<TyCtxt<'tcx>> for ty::GenericArg<'tcx> { (ty::GenericArgKind::Const(a_ct), ty::GenericArgKind::Const(b_ct)) => { Ok(relation.relate(a_ct, b_ct)?.into()) } - (ty::GenericArgKind::Lifetime(unpacked), x) => { - bug!("impossible case reached: can't relate: {:?} with {:?}", unpacked, x) - } - (ty::GenericArgKind::Type(unpacked), x) => { - bug!("impossible case reached: can't relate: {:?} with {:?}", unpacked, x) - } - (ty::GenericArgKind::Const(unpacked), x) => { - bug!("impossible case reached: can't relate: {:?} with {:?}", unpacked, x) - } + _ => bug!("impossible case reached: can't relate: {a:?} with {b:?}"), } } } |
