about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCameron Steffen <cam.steffen94@gmail.com>2021-04-19 15:40:05 -0500
committerCameron Steffen <cam.steffen94@gmail.com>2021-04-19 15:40:21 -0500
commitc9c14d0c1f04f888fbd4ec8b254b61fff84db7d4 (patch)
treee0253002066cd2a9fbf866650c58a6b332e2d332
parent98a11e01e5f5bf274451320834ea85f9cbd03b92 (diff)
downloadrust-c9c14d0c1f04f888fbd4ec8b254b61fff84db7d4.tar.gz
rust-c9c14d0c1f04f888fbd4ec8b254b61fff84db7d4.zip
Small refactor
-rw-r--r--compiler/rustc_trait_selection/src/traits/object_safety.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/object_safety.rs b/compiler/rustc_trait_selection/src/traits/object_safety.rs
index b5a458db607..ac5ec24eeee 100644
--- a/compiler/rustc_trait_selection/src/traits/object_safety.rs
+++ b/compiler/rustc_trait_selection/src/traits/object_safety.rs
@@ -439,8 +439,7 @@ fn virtual_call_violation_for_method<'tcx>(
         return Some(MethodViolationCode::WhereClauseReferencesSelf);
     }
 
-    let receiver_ty =
-        tcx.liberate_late_bound_regions(method.def_id, sig.map_bound(|sig| sig.inputs()[0]));
+    let receiver_ty = tcx.liberate_late_bound_regions(method.def_id, sig.input(0));
 
     // Until `unsized_locals` is fully implemented, `self: Self` can't be dispatched on.
     // However, this is already considered object-safe. We allow it as a special case here.