about summary refs log tree commit diff
path: root/compiler/rustc_ty_utils/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-04-23 00:05:31 +0000
committerbors <bors@rust-lang.org>2024-04-23 00:05:31 +0000
commit9cf10bcf5b368de79abc24fc4d50a9d85b377ffa (patch)
tree975fed41d85532188712e2944555a73106f0f538 /compiler/rustc_ty_utils/src
parent25087e02b34775520856b6cc15e50f5ed0c35f50 (diff)
parent000d0f9116c24c0e24a30e18bfd84f913b099520 (diff)
downloadrust-9cf10bcf5b368de79abc24fc4d50a9d85b377ffa.tar.gz
rust-9cf10bcf5b368de79abc24fc4d50a9d85b377ffa.zip
Auto merge of #124271 - GuillaumeGomez:rollup-7st9wd7, r=GuillaumeGomez
Rollup of 7 pull requests

Successful merges:

 - #115913 (checked_ilog: improve performance)
 - #124178 ([cleanup] [llvm backend] Prevent creating the same `Instance::mono` multiple times)
 - #124183 (Stop taking `ParamTy`/`ParamConst`/`EarlyParamRegion`/`AliasTy` by ref)
 - #124217 (coverage: Prepare for improved branch coverage)
 - #124230 (Stabilize generic `NonZero`.)
 - #124252 (Improve ICE message for forbidden dep-graph reads.)
 - #124268 (Update books)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_ty_utils/src')
-rw-r--r--compiler/rustc_ty_utils/src/opaque_types.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_ty_utils/src/opaque_types.rs b/compiler/rustc_ty_utils/src/opaque_types.rs
index a652bb78116..d7d31a88c9b 100644
--- a/compiler/rustc_ty_utils/src/opaque_types.rs
+++ b/compiler/rustc_ty_utils/src/opaque_types.rs
@@ -130,7 +130,7 @@ impl<'tcx> OpaqueTypeCollector<'tcx> {
         TaitInBodyFinder { collector: self }.visit_expr(body);
     }
 
-    fn visit_opaque_ty(&mut self, alias_ty: &ty::AliasTy<'tcx>) {
+    fn visit_opaque_ty(&mut self, alias_ty: ty::AliasTy<'tcx>) {
         if !self.seen.insert(alias_ty.def_id.expect_local()) {
             return;
         }
@@ -205,7 +205,7 @@ impl<'tcx> TypeVisitor<TyCtxt<'tcx>> for OpaqueTypeCollector<'tcx> {
     #[instrument(skip(self), ret, level = "trace")]
     fn visit_ty(&mut self, t: Ty<'tcx>) {
         t.super_visit_with(self);
-        match t.kind() {
+        match *t.kind() {
             ty::Alias(ty::Opaque, alias_ty) if alias_ty.def_id.is_local() => {
                 self.visit_opaque_ty(alias_ty);
             }
@@ -279,7 +279,7 @@ impl<'tcx> TypeVisitor<TyCtxt<'tcx>> for OpaqueTypeCollector<'tcx> {
                     // assumption to the `param_env` of the default method. We also separately
                     // rely on that assumption here.
                     let ty = self.tcx.type_of(alias_ty.def_id).instantiate(self.tcx, alias_ty.args);
-                    let ty::Alias(ty::Opaque, alias_ty) = ty.kind() else { bug!("{ty:?}") };
+                    let ty::Alias(ty::Opaque, alias_ty) = *ty.kind() else { bug!("{ty:?}") };
                     self.visit_opaque_ty(alias_ty);
                 }
             }