diff --git a/src/test/run-pass/borrowck-preserve-box-in-arm-not-taken.rs b/src/test/run-pass/borrowck-preserve-box-in-arm-not-taken.rs index ae4622630fd..ca72181b5fb 100644 --- a/src/test/run-pass/borrowck-preserve-box-in-arm-not-taken.rs +++ b/src/test/run-pass/borrowck-preserve-box-in-arm-not-taken.rs @@ -13,7 +13,7 @@ fn main() { let x: @mut @Option<~int> = @mut @None; match x { - @@Some(y) => { + @@Some(ref y) => { // here, the refcount of `*x` is bumped so // `y` remains valid even if `*x` is modified. *x = @None; @@ -24,4 +24,4 @@ fn main() { // works. } } -} \ No newline at end of file +} diff --git a/src/test/run-pass/boxed-trait-with-vstore.rs b/src/test/run-pass/boxed-trait-with-vstore.rs index e8b65922192..b7f5ffb896d 100644 --- a/src/test/run-pass/boxed-trait-with-vstore.rs +++ b/src/test/run-pass/boxed-trait-with-vstore.rs @@ -9,7 +9,7 @@ // except according to those terms. trait Foo { - fn foo() {} + fn foo(); } impl int : Foo { diff --git a/src/test/run-pass/default-method-simple.rs b/src/test/run-pass/default-method-simple.rs index b2944d441e5..5d3dc42c41e 100644 --- a/src/test/run-pass/default-method-simple.rs +++ b/src/test/run-pass/default-method-simple.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#[allow(default_methods)]; + trait Foo { fn f() { io::println("Hello!"); diff --git a/src/test/run-pass/issue-2718.rs b/src/test/run-pass/issue-2718.rs index 7e7a41e2004..632fe348d8d 100644 --- a/src/test/run-pass/issue-2718.rs +++ b/src/test/run-pass/issue-2718.rs @@ -220,7 +220,7 @@ mod pingpong { fn liberate_ping(-p: ping) -> pipes::send_packet unsafe { let addr : *pipes::send_packet = match &p { - &ping(x) => { cast::transmute(ptr::addr_of(&x)) } + &ping(ref x) => { cast::transmute(ptr::addr_of(x)) } }; let liberated_value = move *addr; cast::forget(move p); @@ -229,7 +229,7 @@ mod pingpong { fn liberate_pong(-p: pong) -> pipes::send_packet unsafe { let addr : *pipes::send_packet = match &p { - &pong(x) => { cast::transmute(ptr::addr_of(&x)) } + &pong(ref x) => { cast::transmute(ptr::addr_of(x)) } }; let liberated_value = move *addr; cast::forget(move p); diff --git a/src/test/run-pass/issue-3683.rs b/src/test/run-pass/issue-3683.rs index 4dea52cf216..d4b343a88b7 100644 --- a/src/test/run-pass/issue-3683.rs +++ b/src/test/run-pass/issue-3683.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#[allow(default_methods)]; + trait Foo { fn a() -> int; fn b() -> int { diff --git a/src/test/run-pass/trait-default-method-bound-subst3.rs b/src/test/run-pass/trait-default-method-bound-subst3.rs index 6a94f39a4b3..adf07818e0c 100644 --- a/src/test/run-pass/trait-default-method-bound-subst3.rs +++ b/src/test/run-pass/trait-default-method-bound-subst3.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#[allow(default_methods)]; + trait A { fn g(x: T, y: T) -> (T, T) { (move x, move y) } } diff --git a/src/test/run-pass/trait-default-method-bound-subst4.rs b/src/test/run-pass/trait-default-method-bound-subst4.rs index fc2b84aa390..0b34691ff6e 100644 --- a/src/test/run-pass/trait-default-method-bound-subst4.rs +++ b/src/test/run-pass/trait-default-method-bound-subst4.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#[allow(default_methods)]; + trait A { fn g(x: uint) -> uint { move x } } diff --git a/src/test/run-pass/trait-default-method-bound.rs b/src/test/run-pass/trait-default-method-bound.rs index 6f4d2239d6a..28e15e09496 100644 --- a/src/test/run-pass/trait-default-method-bound.rs +++ b/src/test/run-pass/trait-default-method-bound.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#[allow(default_methods)]; + trait A { fn g() -> int { 10 } } diff --git a/src/test/run-pass/traits-default-method-macro.rs b/src/test/run-pass/traits-default-method-macro.rs index 12a31e9b941..9e49b249c18 100644 --- a/src/test/run-pass/traits-default-method-macro.rs +++ b/src/test/run-pass/traits-default-method-macro.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#[allow(default_methods)]; + trait Foo { fn bar() -> ~str { fmt!("test") @@ -24,4 +26,4 @@ impl Baz: Foo { fn main() { let q = Quux; assert q.bar() == ~"test"; -} \ No newline at end of file +} diff --git a/src/test/run-pass/traits-default-method-trivial.rs b/src/test/run-pass/traits-default-method-trivial.rs index 720691fe2dd..9dbb26af441 100644 --- a/src/test/run-pass/traits-default-method-trivial.rs +++ b/src/test/run-pass/traits-default-method-trivial.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#[allow(default_methods)]; + trait Cat { fn meow() -> bool; fn scratch() -> bool;