Disable effect checking in rustboot

This commit is contained in:
Marijn Haverbeke 2011-04-08 18:29:14 +02:00
parent b883ec4c9d
commit 6109dba305
7 changed files with 5 additions and 55 deletions

View File

@ -278,9 +278,9 @@ let effect_checking_visitor
let process_crate
(cx:ctxt)
(crate:Ast.crate)
: unit =
(_cx:ctxt)
(_crate:Ast.crate)
: unit = (*
let item_auth = Hashtbl.create 0 in
let item_effect = Hashtbl.create 0 in
let passes =
@ -303,6 +303,8 @@ let process_crate
Hashtbl.iter auth_effect crate.node.Ast.crate_auth;
run_passes cx "effect" passes
cx.ctxt_sess.Session.sess_log_effect log crate
*)
()
;;
(*

View File

@ -1,7 +0,0 @@
// xfail-stage0
// error-pattern: calculated effect is 'impure'
fn main() {
let chan[int] c = chan();
c <| 10;
}

View File

@ -1,11 +0,0 @@
// xfail-stage0
// error-pattern: calculated effect is 'impure'
impure fn foo() {
let chan[int] c = chan();
c <| 10;
}
fn main() {
foo();
}

View File

@ -1,10 +0,0 @@
// xfail-stage0
// error-pattern: calculated effect is 'unsafe'
native mod foo {
fn naughty();
}
fn main() {
foo.naughty();
}

View File

@ -1,5 +0,0 @@
// xfail-stage0
// error-pattern: calculated effect is ''
impure fn main() {
log "hi";
}

View File

@ -1,5 +0,0 @@
// xfail-stage0
// error-pattern: calculated effect is ''
unsafe fn main() {
log "hi";
}

View File

@ -1,14 +0,0 @@
// xfail-stage0
// error-pattern: calculated effect is 'unsafe'
native mod foo {
fn naughty();
}
unsafe fn bar() {
foo.naughty();
}
fn main() {
bar();
}