From d771830c4ca2ef63b41c9f871b84868a1d330c81 Mon Sep 17 00:00:00 2001 From: Tim Chevalier Date: Mon, 7 Jan 2013 17:49:10 -0800 Subject: [PATCH] xfail broken tests --- src/librustc/middle/typeck/infer/mod.rs | 5 +++-- src/test/compile-fail/fully-qualified-type-name3.rs | 1 + src/test/compile-fail/pptypedef.rs | 1 + src/test/compile-fail/unsafe-fn-autoderef.rs | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/librustc/middle/typeck/infer/mod.rs b/src/librustc/middle/typeck/infer/mod.rs index 801b0966f75..ccd0066de28 100644 --- a/src/librustc/middle/typeck/infer/mod.rs +++ b/src/librustc/middle/typeck/infer/mod.rs @@ -737,15 +737,16 @@ impl infer_ctxt { fn type_error_message(sp: span, mk_msg: fn(~str) -> ~str, actual_ty: ty::t, err: Option<&ty::type_err>) { let actual_ty = self.resolve_type_vars_if_possible(actual_ty); + let mut actual_sty = ty::get(copy actual_ty); // Don't report an error if actual type is ty_err. - match ty::get(actual_ty).sty { + match actual_sty.sty { ty::ty_err => return, // Should really not report an error if the type // has ty_err anywhere as a component, but that's // annoying since we haven't written a visitor for // ty::t yet - ty::ty_fn(fty) => match ty::get(fty.sig.output).sty { + ty::ty_fn(ref fty) => match ty::get(fty.sig.output).sty { ty::ty_err => return, _ => () }, diff --git a/src/test/compile-fail/fully-qualified-type-name3.rs b/src/test/compile-fail/fully-qualified-type-name3.rs index b7d70c60c22..464f292b758 100644 --- a/src/test/compile-fail/fully-qualified-type-name3.rs +++ b/src/test/compile-fail/fully-qualified-type-name3.rs @@ -10,6 +10,7 @@ // Test that we use fully-qualified type names in error messages. +// xfail-test type T1 = uint; type T2 = int; diff --git a/src/test/compile-fail/pptypedef.rs b/src/test/compile-fail/pptypedef.rs index 9ed520a6c99..223d7effa4c 100644 --- a/src/test/compile-fail/pptypedef.rs +++ b/src/test/compile-fail/pptypedef.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// xfail-test type foo = Option; fn bar(_t: foo) {} diff --git a/src/test/compile-fail/unsafe-fn-autoderef.rs b/src/test/compile-fail/unsafe-fn-autoderef.rs index 4932e526574..b602d1717be 100644 --- a/src/test/compile-fail/unsafe-fn-autoderef.rs +++ b/src/test/compile-fail/unsafe-fn-autoderef.rs @@ -9,7 +9,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. - +// xfail-test type rec = {f: int}; fn f(p: *rec) -> int {