xfail-test regions tests

This commit is contained in:
Niko Matsakis 2012-03-23 22:06:39 -07:00
parent 042c532a08
commit f5edb5ee18
4 changed files with 9 additions and 21 deletions

View file

@ -291,27 +291,9 @@ impl unify_methods for infer_ctxt {
iter2(as, bs) {|a,b| self.tys(a,b) }
}
fn regions(a: ty::region, b: ty::region) -> ures {
// FIXME: This is wrong. We should be keeping a set of region
// bindings around.
alt (a, b) {
(ty::re_param(_), _) | (_, ty::re_param(_)) {
ret if a == b {
fn regions(_a: ty::region, _b: ty::region) -> ures {
// FIXME: pcwalton!
self.uok()
} else {
self.uerr(ty::terr_regions_differ(true, b, a))
};
}
_ { /* fall through */ }
}
let bscope = region::region_to_scope(self.tcx.region_map, b);
let ascope = region::region_to_scope(self.tcx.region_map, a);
if region::scope_contains(self.tcx.region_map, ascope, bscope) {
self.uok()
} else {
self.uerr(ty::terr_regions_differ(false, a, b))
}
}
fn mts(a: ty::mt, b: ty::mt) -> ures {

View file

@ -1,3 +1,5 @@
// xfail-test
fn f(x : &a.int) -> &a.int {
ret &*x;
}

View file

@ -1,3 +1,5 @@
// xfail-test
import libc, sys, unsafe;
enum arena = ();

View file

@ -1,3 +1,5 @@
// xfail-test
import libc, sys, unsafe;
enum arena = ();