Skip to content

Commit 5bd8692

Browse files
committed
test: Fix a bunch of compile-fail tests. rs=bustage
1 parent b92ea8d commit 5bd8692

File tree

7 files changed

+17
-18
lines changed

7 files changed

+17
-18
lines changed

src/test/auxiliary/noexporttypelib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,5 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#[legacy_exports];
12-
export foo;
1311
type oint = Option<int>;
14-
fn foo() -> oint { Some(3) }
12+
pub fn foo() -> oint { Some(3) }

src/test/compile-fail/borrowck-autoref-3261.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use either::*;
11+
use core::either::*;
1212
enum X = Either<(uint,uint),fn()>;
1313
impl &X {
1414
fn with(blk: fn(x: &Either<(uint,uint),fn()>)) {
@@ -26,4 +26,4 @@ fn main() {
2626
_ => fail
2727
}
2828
}
29-
}
29+
}

src/test/compile-fail/issue-1697.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010

1111
// Testing that we don't fail abnormally after hitting the errors
1212

13-
use unresolved::*; //~ ERROR unresolved name
14-
//~^ ERROR failed to resolve import
13+
use unresolved::*; //~ ERROR unresolved import
1514

1615
fn main() {
1716
}

src/test/compile-fail/issue-2766-a.rs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,17 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
mod stream {
12-
#[legacy_exports];
13-
enum Stream<T: Owned> { send(T, server::Stream<T>), }
14-
mod server {
15-
#[legacy_exports];
11+
pub mod stream {
12+
pub enum Stream<T: Owned> { send(T, ::stream::server::Stream<T>), }
13+
pub mod server {
14+
use core::option;
15+
use core::pipes;
16+
1617
impl<T: Owned> Stream<T> {
17-
fn recv() -> extern fn(+v: Stream<T>) -> stream::Stream<T> {
18+
pub fn recv() -> extern fn(+v: Stream<T>) -> ::stream::Stream<T> {
1819
// resolve really should report just one error here.
1920
// Change the test case when it changes.
20-
fn recv(+pipe: Stream<T>) -> stream::Stream<T> { //~ ERROR attempt to use a type argument out of scope
21+
pub fn recv(+pipe: Stream<T>) -> ::stream::Stream<T> { //~ ERROR attempt to use a type argument out of scope
2122
//~^ ERROR use of undeclared type name
2223
//~^^ ERROR attempt to use a type argument out of scope
2324
//~^^^ ERROR use of undeclared type name
@@ -26,7 +27,8 @@ mod stream {
2627
recv
2728
}
2829
}
29-
type Stream<T: Owned> = pipes::RecvPacket<stream::Stream<T>>;
30+
31+
pub type Stream<T: Owned> = pipes::RecvPacket<::stream::Stream<T>>;
3032
}
3133
}
3234

src/test/compile-fail/name-clash-nullary.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
// error-pattern:declaration of `None` shadows
12-
use option::*;
12+
use core::option::*;
1313

1414
fn main() {
1515
let None: int = 42;

src/test/compile-fail/no-capture-arc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
extern mod std;
1414
use std::arc;
15-
use oldcomm::*;
15+
use core::oldcomm::*;
1616

1717
fn main() {
1818
let v = ~[1, 2, 3, 4, 5, 6, 7, 8, 9, 10];

src/test/compile-fail/no-reuse-move-arc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
extern mod std;
1212
use std::arc;
13-
use oldcomm::*;
13+
use core::oldcomm::*;
1414

1515
fn main() {
1616
let v = ~[1, 2, 3, 4, 5, 6, 7, 8, 9, 10];

0 commit comments

Comments
 (0)