about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src/traits/specialize/mod.rs
diff options
context:
space:
mode:
authorklensy <klensy@users.noreply.github.com>2024-03-28 13:16:22 +0300
committerklensy <klensy@users.noreply.github.com>2024-03-28 13:16:22 +0300
commitc64a4403123c43b88f9261a055bda4b9fbd6fc73 (patch)
tree3c0e2baedaf5a11d69102d7c174be917176a3496 /compiler/rustc_trait_selection/src/traits/specialize/mod.rs
parentafd0a8eb8f2d26f540dd39b2b05739a7ecc0869d (diff)
downloadrust-c64a4403123c43b88f9261a055bda4b9fbd6fc73.tar.gz
rust-c64a4403123c43b88f9261a055bda4b9fbd6fc73.zip
fix few more
warning: this argument is a mutable reference, but not used mutably
   --> compiler\rustc_trait_selection\src\traits\project.rs:511:12
    |
511 |     selcx: &mut SelectionContext<'a, 'tcx>,
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&SelectionContext<'a, 'tcx>`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
   --> compiler\rustc_trait_selection\src\traits\specialize\specialization_graph.rs:201:28
    |
201 | fn iter_children(children: &mut Children) -> impl Iterator<Item = DefId> + '_ {
    |                            ^^^^^^^^^^^^^ help: consider changing to: `&Children`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits/specialize/mod.rs')
-rw-r--r--compiler/rustc_trait_selection/src/traits/specialize/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/specialize/mod.rs b/compiler/rustc_trait_selection/src/traits/specialize/mod.rs
index 27dd8f26489..43c750ebbb5 100644
--- a/compiler/rustc_trait_selection/src/traits/specialize/mod.rs
+++ b/compiler/rustc_trait_selection/src/traits/specialize/mod.rs
@@ -239,10 +239,10 @@ fn fulfill_implication<'tcx>(
 
     let source_trait = ImplSubject::Trait(source_trait_ref);
 
-    let selcx = &mut SelectionContext::new(infcx);
+    let selcx = SelectionContext::new(infcx);
     let target_args = infcx.fresh_args_for_item(DUMMY_SP, target_impl);
     let (target_trait, obligations) =
-        util::impl_subject_and_oblig(selcx, param_env, target_impl, target_args, error_cause);
+        util::impl_subject_and_oblig(&selcx, param_env, target_impl, target_args, error_cause);
 
     // do the impls unify? If not, no specialization.
     let Ok(InferOk { obligations: more_obligations, .. }) = infcx