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

@ -608,7 +608,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
let mut bound_span_label = |self_ty: Ty<'_>, obligation: &str, quiet: &str| {
let msg = format!("`{}`", if obligation.len() > 50 { quiet } else { obligation });
match &self_ty.kind() {
match self_ty.kind() {
// Point at the type that couldn't satisfy the bound.
ty::Adt(def, _) => {
bound_spans.get_mut_or_insert_default(tcx.def_span(def.did())).push(msg)

View file

@ -1056,7 +1056,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
// Find the type of the associated item, and the trait where the associated
// item is declared.
let bound = match (&qself_ty.kind(), qself_res) {
let bound = match (qself_ty.kind(), qself_res) {
(_, Res::SelfTyAlias { alias_to: impl_def_id, is_trait_impl: true, .. }) => {
// `Self` in an impl of a trait -- we have a concrete self type and a
// trait reference.