1
Fork 0

Rollup merge of #129590 - compiler-errors:ref-tykind, r=fmease

Avoid taking reference of &TyKind

It's already a ref anyways. Just a tiny cleanup here.
This commit is contained in:
Matthias Krüger 2024-08-26 01:49:04 +02:00 committed by GitHub
commit d6a3aa4fc4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 18 additions and 18 deletions

View file

@ -1104,7 +1104,7 @@ where
}
fn is_never(this: TyAndLayout<'tcx>) -> bool {
this.ty.kind() == &ty::Never
matches!(this.ty.kind(), ty::Never)
}
fn is_tuple(this: TyAndLayout<'tcx>) -> bool {

View file

@ -296,7 +296,7 @@ impl<'tcx> TyCtxt<'tcx> {
) -> (Ty<'tcx>, Ty<'tcx>) {
let (mut a, mut b) = (source, target);
loop {
match (&a.kind(), &b.kind()) {
match (a.kind(), b.kind()) {
(&ty::Adt(a_def, a_args), &ty::Adt(b_def, b_args))
if a_def == b_def && a_def.is_struct() =>
{