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:
commit
d6a3aa4fc4
14 changed files with 18 additions and 18 deletions
|
@ -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)
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue