diff options
| author | Cameron Steffen <cam.steffen94@gmail.com> | 2021-04-19 15:40:05 -0500 |
|---|---|---|
| committer | Cameron Steffen <cam.steffen94@gmail.com> | 2021-04-19 15:40:21 -0500 |
| commit | c9c14d0c1f04f888fbd4ec8b254b61fff84db7d4 (patch) | |
| tree | e0253002066cd2a9fbf866650c58a6b332e2d332 | |
| parent | 98a11e01e5f5bf274451320834ea85f9cbd03b92 (diff) | |
| download | rust-c9c14d0c1f04f888fbd4ec8b254b61fff84db7d4.tar.gz rust-c9c14d0c1f04f888fbd4ec8b254b61fff84db7d4.zip | |
Small refactor
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/object_safety.rs | 3 |
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. |
