Skip to content

Commit f10a12c

Browse files
Remove some dead code
1 parent 44a77f6 commit f10a12c

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

src/librustc/infer/mod.rs

-27
Original file line numberDiff line numberDiff line change
@@ -386,33 +386,6 @@ pub fn normalizing_infer_ctxt<'a, 'tcx>(tcx: &'a TyCtxt<'tcx>,
386386
infcx
387387
}
388388

389-
/// Computes the least upper-bound of `a` and `b`. If this is not possible, reports an error and
390-
/// returns ty::err.
391-
pub fn common_supertype<'a, 'tcx>(cx: &InferCtxt<'a, 'tcx>,
392-
origin: TypeOrigin,
393-
a_is_expected: bool,
394-
a: Ty<'tcx>,
395-
b: Ty<'tcx>)
396-
-> Ty<'tcx>
397-
{
398-
debug!("common_supertype({:?}, {:?})",
399-
a, b);
400-
401-
let trace = TypeTrace {
402-
origin: origin,
403-
values: Types(expected_found(a_is_expected, a, b))
404-
};
405-
406-
let result = cx.commit_if_ok(|_| cx.lub(a_is_expected, trace.clone()).relate(&a, &b));
407-
match result {
408-
Ok(t) => t,
409-
Err(ref err) => {
410-
cx.report_and_explain_type_error(trace, err).emit();
411-
cx.tcx.types.err
412-
}
413-
}
414-
}
415-
416389
pub fn mk_subty<'a, 'tcx>(cx: &InferCtxt<'a, 'tcx>,
417390
a_is_expected: bool,
418391
origin: TypeOrigin,

0 commit comments

Comments
 (0)