Skip to content

Commit a22c5f9

Browse files
authored
Rollup merge of rust-lang#108916 - fmease:rm-unused-ret-val, r=compiler-errors
Remove an unused return value in `rustc_hir_typeck` Unused since rust-lang#89580. Just something I noticed a while ago. `@rustbot` label C-cleanup
2 parents e6f39f7 + a74e651 commit a22c5f9

File tree

1 file changed

+4
-8
lines changed
  • compiler/rustc_hir_typeck/src/fn_ctxt

1 file changed

+4
-8
lines changed

compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs

+4-8
Original file line numberDiff line numberDiff line change
@@ -301,16 +301,12 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
301301
span: Span,
302302
def_id: DefId,
303303
substs: SubstsRef<'tcx>,
304-
) -> (ty::InstantiatedPredicates<'tcx>, Vec<Span>) {
304+
) -> ty::InstantiatedPredicates<'tcx> {
305305
let bounds = self.tcx.predicates_of(def_id);
306-
let spans: Vec<Span> = bounds.predicates.iter().map(|(_, span)| *span).collect();
307306
let result = bounds.instantiate(self.tcx, substs);
308307
let result = self.normalize(span, result);
309-
debug!(
310-
"instantiate_bounds(bounds={:?}, substs={:?}) = {:?}, {:?}",
311-
bounds, substs, result, spans,
312-
);
313-
(result, spans)
308+
debug!("instantiate_bounds(bounds={:?}, substs={:?}) = {:?}", bounds, substs, result);
309+
result
314310
}
315311

316312
pub(in super::super) fn normalize<T>(&self, span: Span, value: T) -> T
@@ -1389,7 +1385,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
13891385
}
13901386
_ => false,
13911387
};
1392-
let (bounds, _) = self.instantiate_bounds(span, def_id, &substs);
1388+
let bounds = self.instantiate_bounds(span, def_id, &substs);
13931389

13941390
for mut obligation in traits::predicates_for_generics(
13951391
|idx, predicate_span| {

0 commit comments

Comments
 (0)