about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-03-08 21:26:53 +0100
committerGitHub <noreply@github.com>2023-03-08 21:26:53 +0100
commita22c5f9581cc0691be6838ee2a16ab4bd8af9a0b (patch)
treebd1c188d05a7ba2ca8f0389e0462cebdf36fbc1a
parente6f39f7225a55926f43600d1f517d4107e17d794 (diff)
parenta74e651e36990babed0f919dcf8f7d239f6df13f (diff)
downloadrust-a22c5f9581cc0691be6838ee2a16ab4bd8af9a0b.tar.gz
rust-a22c5f9581cc0691be6838ee2a16ab4bd8af9a0b.zip
Rollup merge of #108916 - fmease:rm-unused-ret-val, r=compiler-errors
Remove an unused return value in `rustc_hir_typeck`

Unused since #89580. Just something I noticed a while ago.

`@rustbot` label C-cleanup
-rw-r--r--compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs12
1 files changed, 4 insertions, 8 deletions
diff --git a/compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs b/compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs
index a8f8121153f..ac7d984c161 100644
--- a/compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs
+++ b/compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs
@@ -301,16 +301,12 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
         span: Span,
         def_id: DefId,
         substs: SubstsRef<'tcx>,
-    ) -> (ty::InstantiatedPredicates<'tcx>, Vec<Span>) {
+    ) -> ty::InstantiatedPredicates<'tcx> {
         let bounds = self.tcx.predicates_of(def_id);
-        let spans: Vec<Span> = bounds.predicates.iter().map(|(_, span)| *span).collect();
         let result = bounds.instantiate(self.tcx, substs);
         let result = self.normalize(span, result);
-        debug!(
-            "instantiate_bounds(bounds={:?}, substs={:?}) = {:?}, {:?}",
-            bounds, substs, result, spans,
-        );
-        (result, spans)
+        debug!("instantiate_bounds(bounds={:?}, substs={:?}) = {:?}", bounds, substs, result);
+        result
     }
 
     pub(in super::super) fn normalize<T>(&self, span: Span, value: T) -> T
@@ -1389,7 +1385,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
             }
             _ => false,
         };
-        let (bounds, _) = self.instantiate_bounds(span, def_id, &substs);
+        let bounds = self.instantiate_bounds(span, def_id, &substs);
 
         for mut obligation in traits::predicates_for_generics(
             |idx, predicate_span| {