Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

test: Fix a bunch of compile-fail tests. rs=bustage

  • Loading branch information...
commit 5bd8692e9d6a78b115d44f805c972839e80af79b 1 parent b92ea8d
@pcwalton pcwalton authored
View
4 src/test/auxiliary/noexporttypelib.rs
@@ -8,7 +8,5 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[legacy_exports];
-export foo;
type oint = Option<int>;
-fn foo() -> oint { Some(3) }
+pub fn foo() -> oint { Some(3) }
View
4 src/test/compile-fail/borrowck-autoref-3261.rs
@@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-use either::*;
+use core::either::*;
enum X = Either<(uint,uint),fn()>;
impl &X {
fn with(blk: fn(x: &Either<(uint,uint),fn()>)) {
@@ -26,4 +26,4 @@ fn main() {
_ => fail
}
}
-}
+}
View
3  src/test/compile-fail/issue-1697.rs
@@ -10,8 +10,7 @@
// Testing that we don't fail abnormally after hitting the errors
-use unresolved::*; //~ ERROR unresolved name
-//~^ ERROR failed to resolve import
+use unresolved::*; //~ ERROR unresolved import
fn main() {
}
View
18 src/test/compile-fail/issue-2766-a.rs
@@ -8,16 +8,17 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-mod stream {
- #[legacy_exports];
- enum Stream<T: Owned> { send(T, server::Stream<T>), }
- mod server {
- #[legacy_exports];
+pub mod stream {
+ pub enum Stream<T: Owned> { send(T, ::stream::server::Stream<T>), }
+ pub mod server {
+ use core::option;
+ use core::pipes;
+
impl<T: Owned> Stream<T> {
- fn recv() -> extern fn(+v: Stream<T>) -> stream::Stream<T> {
+ pub fn recv() -> extern fn(+v: Stream<T>) -> ::stream::Stream<T> {
// resolve really should report just one error here.
// Change the test case when it changes.
- fn recv(+pipe: Stream<T>) -> stream::Stream<T> { //~ ERROR attempt to use a type argument out of scope
+ pub fn recv(+pipe: Stream<T>) -> ::stream::Stream<T> { //~ ERROR attempt to use a type argument out of scope
//~^ ERROR use of undeclared type name
//~^^ ERROR attempt to use a type argument out of scope
//~^^^ ERROR use of undeclared type name
@@ -26,7 +27,8 @@ mod stream {
recv
}
}
- type Stream<T: Owned> = pipes::RecvPacket<stream::Stream<T>>;
+
+ pub type Stream<T: Owned> = pipes::RecvPacket<::stream::Stream<T>>;
}
}
View
2  src/test/compile-fail/name-clash-nullary.rs
@@ -9,7 +9,7 @@
// except according to those terms.
// error-pattern:declaration of `None` shadows
-use option::*;
+use core::option::*;
fn main() {
let None: int = 42;
View
2  src/test/compile-fail/no-capture-arc.rs
@@ -12,7 +12,7 @@
extern mod std;
use std::arc;
-use oldcomm::*;
+use core::oldcomm::*;
fn main() {
let v = ~[1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
View
2  src/test/compile-fail/no-reuse-move-arc.rs
@@ -10,7 +10,7 @@
extern mod std;
use std::arc;
-use oldcomm::*;
+use core::oldcomm::*;
fn main() {
let v = ~[1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
Please sign in to comment.
Something went wrong with that request. Please try again.