1
Fork 0

Avoid taking reference of &TyKind

This commit is contained in:
Michael Goulet 2024-08-25 16:02:11 -04:00
parent 89103466d7
commit 48f43fa0ed
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() =>
{