diff options
| author | Masood Malekghassemi <atash@google.com> | 2016-03-27 15:06:11 -0700 |
|---|---|---|
| committer | Masood Malekghassemi <atash@google.com> | 2016-03-28 22:10:15 -0700 |
| commit | f10a12c49f80e8dd277907b9d669dee54b67341a (patch) | |
| tree | 406bd296ab27547f1c1055b012db69609c624600 /src | |
| parent | 44a77f67696e855a9841eaf7c7bf7639131cfec6 (diff) | |
| download | rust-f10a12c49f80e8dd277907b9d669dee54b67341a.tar.gz rust-f10a12c49f80e8dd277907b9d669dee54b67341a.zip | |
Remove some dead code
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc/infer/mod.rs | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/librustc/infer/mod.rs b/src/librustc/infer/mod.rs index bc4c9fd2ccf..91ad7e86925 100644 --- a/src/librustc/infer/mod.rs +++ b/src/librustc/infer/mod.rs @@ -386,33 +386,6 @@ pub fn normalizing_infer_ctxt<'a, 'tcx>(tcx: &'a TyCtxt<'tcx>, infcx } -/// Computes the least upper-bound of `a` and `b`. If this is not possible, reports an error and -/// returns ty::err. -pub fn common_supertype<'a, 'tcx>(cx: &InferCtxt<'a, 'tcx>, - origin: TypeOrigin, - a_is_expected: bool, - a: Ty<'tcx>, - b: Ty<'tcx>) - -> Ty<'tcx> -{ - debug!("common_supertype({:?}, {:?})", - a, b); - - let trace = TypeTrace { - origin: origin, - values: Types(expected_found(a_is_expected, a, b)) - }; - - let result = cx.commit_if_ok(|_| cx.lub(a_is_expected, trace.clone()).relate(&a, &b)); - match result { - Ok(t) => t, - Err(ref err) => { - cx.report_and_explain_type_error(trace, err).emit(); - cx.tcx.types.err - } - } -} - pub fn mk_subty<'a, 'tcx>(cx: &InferCtxt<'a, 'tcx>, a_is_expected: bool, origin: TypeOrigin, |
