clean-up: remove unused return value in typeck

This commit is contained in:
León Orell Valerian Liehr 2023-03-08 19:18:22 +01:00
parent 7d782b7ff4
commit a74e651e36
No known key found for this signature in database
GPG Key ID: D17A07215F68E713

View File

@ -301,16 +301,12 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
span: Span, span: Span,
def_id: DefId, def_id: DefId,
substs: SubstsRef<'tcx>, substs: SubstsRef<'tcx>,
) -> (ty::InstantiatedPredicates<'tcx>, Vec<Span>) { ) -> ty::InstantiatedPredicates<'tcx> {
let bounds = self.tcx.predicates_of(def_id); 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 = bounds.instantiate(self.tcx, substs);
let result = self.normalize(span, result); let result = self.normalize(span, result);
debug!( debug!("instantiate_bounds(bounds={:?}, substs={:?}) = {:?}", bounds, substs, result);
"instantiate_bounds(bounds={:?}, substs={:?}) = {:?}, {:?}", result
bounds, substs, result, spans,
);
(result, spans)
} }
pub(in super::super) fn normalize<T>(&self, span: Span, value: T) -> T pub(in super::super) fn normalize<T>(&self, span: Span, value: T) -> T
@ -1389,7 +1385,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
} }
_ => false, _ => 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( for mut obligation in traits::predicates_for_generics(
|idx, predicate_span| { |idx, predicate_span| {