Function rustc::middle::infer::common_supertypeUnstable [-] [+] [src]

pub fn common_supertype<'a, 'tcx>(cx: &InferCtxt<'a, 'tcx>, origin: TypeOrigin, a_is_expected: bool, a: Ty<'tcx>, b: Ty<'tcx>) -> Ty<'tcx>

Computes the least upper-bound of a and b. If this is not possible, reports an error and returns ty::err.