test: "import" -> "use"
This commit is contained in:
parent
47dac47e96
commit
f686896f60
270 changed files with 406 additions and 559 deletions
|
@ -1,6 +1,6 @@
|
|||
export foo;
|
||||
|
||||
import comm::*;
|
||||
use comm::*;
|
||||
|
||||
fn foo<T: send copy>(x: T) -> Port<T> {
|
||||
let p = Port();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import to_str::*;
|
||||
import to_str::ToStr;
|
||||
use to_str::*;
|
||||
use to_str::ToStr;
|
||||
|
||||
mod kitty {
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import dvec::DVec;
|
||||
use dvec::DVec;
|
||||
|
||||
type entry<A,B> = {key: A, value: B};
|
||||
type alist<A,B> = { eq_fn: fn@(A,A) -> bool, data: DVec<entry<A,B>> };
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
export rust;
|
||||
|
||||
import name_pool::add;
|
||||
use name_pool::add;
|
||||
|
||||
mod name_pool {
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import b::d;
|
||||
use b::d;
|
||||
|
||||
type t = uint;
|
||||
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
|
||||
use std;
|
||||
|
||||
import dvec::*;
|
||||
import dvec::DVec;
|
||||
import std::map::hashmap;
|
||||
use dvec::*;
|
||||
use dvec::DVec;
|
||||
use std::map::hashmap;
|
||||
|
||||
type header_map = hashmap<~str, @DVec<@~str>>;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use issue2378a;
|
||||
|
||||
import issue2378a::maybe;
|
||||
import issue2378a::methods;
|
||||
use issue2378a::maybe;
|
||||
use issue2378a::methods;
|
||||
|
||||
type two_maybes<T> = {a: maybe<T>, b: maybe<T>};
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#[crate_type = "lib"];
|
||||
|
||||
use a;
|
||||
import a::to_strz;
|
||||
use a::to_strz;
|
||||
|
||||
impl int: to_strz {
|
||||
fn to_strz() -> ~str { fmt!("%?", self) }
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
use a;
|
||||
|
||||
import a::to_strz;
|
||||
use a::to_strz;
|
||||
|
||||
impl bool: to_strz {
|
||||
fn to_strz() -> ~str { fmt!("%b", self) }
|
||||
|
|
|
@ -2,7 +2,7 @@ use issue_2316_a;
|
|||
|
||||
mod cloth {
|
||||
|
||||
import issue_2316_a::*;
|
||||
use issue_2316_a::*;
|
||||
|
||||
export calico, gingham, flannel;
|
||||
export fabric;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
Could probably be more minimal.
|
||||
*/
|
||||
|
||||
import libc::size_t;
|
||||
use libc::size_t;
|
||||
|
||||
export port::{};
|
||||
export port;
|
||||
|
|
|
@ -5,11 +5,10 @@
|
|||
*/
|
||||
|
||||
use std;
|
||||
import rand;
|
||||
import std::map;
|
||||
import managed::Managed;
|
||||
import send_map::linear::*;
|
||||
import io::WriterUtil;
|
||||
use std::map;
|
||||
use managed::Managed;
|
||||
use send_map::linear::*;
|
||||
use io::WriterUtil;
|
||||
|
||||
struct Results {
|
||||
sequential_ints: float;
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
use std;
|
||||
|
||||
import std::time::precise_time_s;
|
||||
import std::map;
|
||||
import std::map::{map, hashmap};
|
||||
use std::time::precise_time_s;
|
||||
use std::map;
|
||||
use std::map::{map, hashmap};
|
||||
|
||||
import io::{Reader, ReaderUtil};
|
||||
use io::{Reader, ReaderUtil};
|
||||
|
||||
fn main(argv: ~[~str]) {
|
||||
#macro[
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// A raw test of vector appending performance.
|
||||
|
||||
use std;
|
||||
import dvec::DVec;
|
||||
import io::WriterUtil;
|
||||
use dvec::DVec;
|
||||
use io::WriterUtil;
|
||||
|
||||
fn collect_raw(num: uint) -> ~[uint] {
|
||||
let mut result = ~[];
|
||||
|
|
|
@ -5,17 +5,17 @@ An implementation of the Graph500 Breadth First Search problem in Rust.
|
|||
*/
|
||||
|
||||
use std;
|
||||
import std::arc;
|
||||
import std::time;
|
||||
import std::map;
|
||||
import std::map::map;
|
||||
import std::map::hashmap;
|
||||
import std::deque;
|
||||
import std::deque::Deque;
|
||||
import std::par;
|
||||
import io::WriterUtil;
|
||||
import comm::*;
|
||||
import int::abs;
|
||||
use std::arc;
|
||||
use std::time;
|
||||
use std::map;
|
||||
use std::map::map;
|
||||
use std::map::hashmap;
|
||||
use std::deque;
|
||||
use std::deque::Deque;
|
||||
use std::par;
|
||||
use io::WriterUtil;
|
||||
use comm::*;
|
||||
use int::abs;
|
||||
|
||||
type node_id = i64;
|
||||
type graph = ~[~[node_id]];
|
||||
|
|
|
@ -11,10 +11,10 @@
|
|||
// xfail-pretty
|
||||
|
||||
use std;
|
||||
import io::Writer;
|
||||
import io::WriterUtil;
|
||||
use io::Writer;
|
||||
use io::WriterUtil;
|
||||
|
||||
import pipes::{Port, Chan, SharedChan};
|
||||
use pipes::{Port, Chan, SharedChan};
|
||||
|
||||
macro_rules! move_out (
|
||||
{ $x:expr } => { unsafe { let y <- *ptr::addr_of($x); y } }
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
// xfail-pretty
|
||||
|
||||
use std;
|
||||
import io::Writer;
|
||||
import io::WriterUtil;
|
||||
use io::Writer;
|
||||
use io::WriterUtil;
|
||||
|
||||
import pipes::{Port, PortSet, Chan};
|
||||
use pipes::{Port, PortSet, Chan};
|
||||
|
||||
macro_rules! move_out (
|
||||
{ $x:expr } => { unsafe { let y <- *ptr::addr_of($x); y } }
|
||||
|
|
|
@ -7,11 +7,11 @@
|
|||
|
||||
// xfail-pretty
|
||||
|
||||
import future::future;
|
||||
use future::future;
|
||||
|
||||
use std;
|
||||
import std::time;
|
||||
import std::arc;
|
||||
use std::time;
|
||||
use std::arc;
|
||||
|
||||
// A poor man's pipe.
|
||||
type pipe = arc::MutexARC<~[uint]>;
|
||||
|
|
|
@ -8,12 +8,12 @@
|
|||
|
||||
// xfail-pretty
|
||||
|
||||
import future::future;
|
||||
use future::future;
|
||||
|
||||
use std;
|
||||
import std::time;
|
||||
use std::time;
|
||||
|
||||
import pipes::recv;
|
||||
use pipes::recv;
|
||||
|
||||
proto! ring (
|
||||
num:send {
|
||||
|
|
|
@ -7,11 +7,11 @@
|
|||
|
||||
// xfail-pretty
|
||||
|
||||
import future::future;
|
||||
use future::future;
|
||||
|
||||
use std;
|
||||
import std::time;
|
||||
import std::arc;
|
||||
use std::time;
|
||||
use std::arc;
|
||||
|
||||
// A poor man's pipe.
|
||||
type pipe = arc::RWARC<~[uint]>;
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
// that things will look really good once we get that lock out of the
|
||||
// message path.
|
||||
|
||||
import comm::*;
|
||||
import future::future;
|
||||
use comm::*;
|
||||
use future::future;
|
||||
|
||||
use std;
|
||||
import std::time;
|
||||
use std::time;
|
||||
|
||||
fn thread_ring(i: uint,
|
||||
count: uint,
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
// I *think* it's the same, more or less.
|
||||
|
||||
use std;
|
||||
import io::Writer;
|
||||
import io::WriterUtil;
|
||||
use io::Writer;
|
||||
use io::WriterUtil;
|
||||
|
||||
enum request {
|
||||
get_count,
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
use std;
|
||||
|
||||
import pipes::{spawn_service, recv};
|
||||
import std::time::precise_time_s;
|
||||
use pipes::{spawn_service, recv};
|
||||
use std::time::precise_time_s;
|
||||
|
||||
proto! pingpong (
|
||||
ping: send {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use std;
|
||||
import std::arena;
|
||||
import methods = std::arena::Arena;
|
||||
use std::arena;
|
||||
use methods = std::arena::Arena;
|
||||
|
||||
enum tree/& { nil, node(&tree, &tree, int), }
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
// chameneos
|
||||
|
||||
use std;
|
||||
import std::map;
|
||||
import std::map::hashmap;
|
||||
import std::sort;
|
||||
use std::map;
|
||||
use std::map::hashmap;
|
||||
use std::sort;
|
||||
|
||||
fn print_complements() {
|
||||
let all = ~[Blue, Red, Yellow];
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
// Based on Isaac Gouy's fannkuchredux.csharp
|
||||
use std;
|
||||
import int;
|
||||
import vec;
|
||||
|
||||
fn fannkuch(n: int) -> int {
|
||||
fn perm1init(i: uint) -> int { return i as int; }
|
||||
|
|
|
@ -6,11 +6,7 @@
|
|||
* http://shootout.alioth.debian.org/
|
||||
*/
|
||||
use std;
|
||||
import vec;
|
||||
import uint;
|
||||
import int;
|
||||
import str;
|
||||
import io::WriterUtil;
|
||||
use io::WriterUtil;
|
||||
|
||||
fn LINE_LENGTH() -> uint { return 60u; }
|
||||
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
// multi tasking k-nucleotide
|
||||
|
||||
use std;
|
||||
import std::map;
|
||||
import std::map::hashmap;
|
||||
import std::sort;
|
||||
import io::ReaderUtil;
|
||||
import pipes::{stream, Port, Chan};
|
||||
use std::map;
|
||||
use std::map::hashmap;
|
||||
use std::sort;
|
||||
use io::ReaderUtil;
|
||||
use pipes::{stream, Port, Chan};
|
||||
|
||||
// given a map, print a sorted version of it
|
||||
fn sort_and_fmt(mm: hashmap<~[u8], uint>, total: uint) -> ~str {
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
// multi tasking k-nucleotide
|
||||
|
||||
use std;
|
||||
import std::map;
|
||||
import std::map::hashmap;
|
||||
import std::sort;
|
||||
import io::ReaderUtil;
|
||||
use std::map;
|
||||
use std::map::hashmap;
|
||||
use std::sort;
|
||||
use io::ReaderUtil;
|
||||
|
||||
// given a map, print a sorted version of it
|
||||
fn sort_and_fmt(mm: hashmap<~[u8], uint>, total: uint) -> ~str {
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
// writes pbm image to output path
|
||||
|
||||
use std;
|
||||
import io::WriterUtil;
|
||||
import std::map::hashmap;
|
||||
use io::WriterUtil;
|
||||
use std::map::hashmap;
|
||||
|
||||
struct cmplx {
|
||||
re: f64;
|
||||
|
|
|
@ -12,16 +12,16 @@
|
|||
|
||||
use std;
|
||||
|
||||
import std::{time, getopts};
|
||||
import io::WriterUtil;
|
||||
import int::range;
|
||||
import pipes::Port;
|
||||
import pipes::Chan;
|
||||
import pipes::send;
|
||||
import pipes::recv;
|
||||
use std::{time, getopts};
|
||||
use io::WriterUtil;
|
||||
use int::range;
|
||||
use pipes::Port;
|
||||
use pipes::Chan;
|
||||
use pipes::send;
|
||||
use pipes::recv;
|
||||
|
||||
import core::result;
|
||||
import result::{Ok, Err};
|
||||
use core::result;
|
||||
use result::{Ok, Err};
|
||||
|
||||
fn fib(n: int) -> int {
|
||||
fn pfib(c: Chan<int>, n: int) {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
// Microbenchmark for the smallintmap library
|
||||
|
||||
use std;
|
||||
import std::smallintmap;
|
||||
import std::smallintmap::SmallIntMap;
|
||||
import io::WriterUtil;
|
||||
use std::smallintmap;
|
||||
use std::smallintmap::SmallIntMap;
|
||||
use io::WriterUtil;
|
||||
|
||||
fn append_sequential(min: uint, max: uint, map: SmallIntMap<uint>) {
|
||||
for uint::range(min, max) |i| {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use std;
|
||||
|
||||
import std::bitv;
|
||||
import io::{ReaderUtil, WriterUtil};
|
||||
use std::bitv;
|
||||
use io::{ReaderUtil, WriterUtil};
|
||||
|
||||
// Computes a single solution to a given 9x9 sudoku
|
||||
//
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
use std;
|
||||
|
||||
import std::list::{List, Cons, Nil};
|
||||
import std::time::precise_time_s;
|
||||
use std::list::{List, Cons, Nil};
|
||||
use std::time::precise_time_s;
|
||||
|
||||
fn main() {
|
||||
let (repeat, depth) = if os::getenv(~"RUST_BENCH").is_some() {
|
||||
|
|
|
@ -12,25 +12,19 @@
|
|||
|
||||
use std;
|
||||
|
||||
import option = option;
|
||||
import option::Some;
|
||||
import option::None;
|
||||
import str;
|
||||
import std::map;
|
||||
import std::map::hashmap;
|
||||
import vec;
|
||||
import io;
|
||||
import io::WriterUtil;
|
||||
use option = option;
|
||||
use option::Some;
|
||||
use option::None;
|
||||
use std::map;
|
||||
use std::map::hashmap;
|
||||
use io::WriterUtil;
|
||||
|
||||
import std::time;
|
||||
import u64;
|
||||
use std::time;
|
||||
|
||||
import task;
|
||||
import comm;
|
||||
import comm::Chan;
|
||||
import comm::Port;
|
||||
import comm::recv;
|
||||
import comm::send;
|
||||
use comm::Chan;
|
||||
use comm::Port;
|
||||
use comm::recv;
|
||||
use comm::send;
|
||||
|
||||
macro_rules! move_out (
|
||||
{ $x:expr } => { unsafe { let y <- *ptr::addr_of($x); y } }
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// xfail-fast aux-build
|
||||
// aux-build:ambig_impl_2_lib.rs
|
||||
use ambig_impl_2_lib;
|
||||
import ambig_impl_2_lib::me;
|
||||
use ambig_impl_2_lib::me;
|
||||
trait me {
|
||||
fn me() -> uint;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// xfail-test
|
||||
// error-pattern: instantiating a type parameter with an incompatible type
|
||||
use std;
|
||||
import std::arc::rw_arc;
|
||||
use std::arc::rw_arc;
|
||||
|
||||
fn main() {
|
||||
let arc1 = ~rw_arc(true);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// error-pattern: reference is not valid outside of its lifetime
|
||||
use std;
|
||||
import std::arc;
|
||||
use std::arc;
|
||||
fn main() {
|
||||
let x = ~arc::RWARC(1);
|
||||
let mut y = None;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use std;
|
||||
import std::arc;
|
||||
use std::arc;
|
||||
fn main() {
|
||||
let x = ~arc::RWARC(1);
|
||||
let mut y = None;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// error-pattern: reference is not valid outside of its lifetime
|
||||
use std;
|
||||
import std::arc;
|
||||
use std::arc;
|
||||
fn main() {
|
||||
let x = ~arc::RWARC(1);
|
||||
let mut y = None;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// error-pattern: reference is not valid outside of its lifetime
|
||||
use std;
|
||||
import std::arc;
|
||||
use std::arc;
|
||||
fn main() {
|
||||
let x = ~arc::RWARC(1);
|
||||
let mut y = None;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// error-pattern: reference is not valid outside of its lifetime
|
||||
use std;
|
||||
import std::arc;
|
||||
use std::arc;
|
||||
fn main() {
|
||||
let x = ~arc::RWARC(1);
|
||||
let mut y = None;
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
// error-pattern: unresolved import
|
||||
import thing;
|
||||
|
||||
fn main() { let foo = thing::len(~[]); }
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
//buggy.rs
|
||||
use std;
|
||||
import std::map::hashmap;
|
||||
import std::map;
|
||||
use std::map::hashmap;
|
||||
use std::map;
|
||||
|
||||
fn main() {
|
||||
let buggy_map :hashmap<uint, &uint> =
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// error-pattern: import
|
||||
|
||||
import m::unexported;
|
||||
use m::unexported;
|
||||
|
||||
mod m {
|
||||
export exported;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// error-pattern: mismatched types
|
||||
use std;
|
||||
import std::map::hashmap;
|
||||
import std::bitv;
|
||||
use std::map::hashmap;
|
||||
use std::bitv;
|
||||
|
||||
type fn_info = {vars: hashmap<uint, var_info>};
|
||||
type var_info = {a: uint, b: uint};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Test that we use fully-qualified type names in error messages.
|
||||
|
||||
import core::task::Task;
|
||||
use core::task::Task;
|
||||
|
||||
fn bar(x: uint) -> Task {
|
||||
return x;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// error-pattern:unresolved
|
||||
// xfail-test
|
||||
import spam::{ham, eggs};
|
||||
use spam::{ham, eggs};
|
||||
|
||||
mod spam {
|
||||
fn ham() { }
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
// error-pattern:expected
|
||||
import foo::{bar}::baz
|
||||
use foo::{bar}::baz
|
|
@ -1,6 +1,6 @@
|
|||
// error-pattern:expected
|
||||
|
||||
import baz = foo::{bar};
|
||||
use baz = foo::{bar};
|
||||
|
||||
mod foo {
|
||||
fn bar() {}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// error-pattern: unresolved name
|
||||
|
||||
import module_of_many_things::*;
|
||||
use module_of_many_things::*;
|
||||
|
||||
mod module_of_many_things {
|
||||
export f1;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
// error-pattern:unresolved name
|
||||
|
||||
import m1::*;
|
||||
use m1::*;
|
||||
|
||||
mod m1 {
|
||||
export f1;
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
// error-pattern:expected
|
||||
import foo::*::bar
|
||||
use foo::*::bar
|
|
@ -1,6 +1,6 @@
|
|||
// error-pattern:expected
|
||||
|
||||
import baz = foo::*;
|
||||
use baz = foo::*;
|
||||
|
||||
mod foo {
|
||||
fn bar() {}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// error-pattern:import
|
||||
|
||||
import y::x;
|
||||
use y::x;
|
||||
|
||||
mod y {
|
||||
import x;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// xfail-test
|
||||
// error-pattern: unresolved
|
||||
import zed::bar;
|
||||
import zed::baz;
|
||||
use zed::bar;
|
||||
use zed::baz;
|
||||
mod zed {
|
||||
fn bar() { debug!("bar"); }
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// error-pattern: unresolved
|
||||
import baz::zed::bar;
|
||||
use baz::zed::bar;
|
||||
mod baz { }
|
||||
mod zed {
|
||||
fn bar() { debug!("bar3"); }
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// error-pattern: unresolved
|
||||
import main::bar;
|
||||
use main::bar;
|
||||
|
||||
fn main(args: ~[str]) { debug!("foo"); }
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// xfail-test
|
||||
// Testing that we don't fail abnormally after hitting the errors
|
||||
|
||||
import unresolved::*; //~ ERROR unresolved modulename
|
||||
use unresolved::*; //~ ERROR unresolved modulename
|
||||
//~^ ERROR unresolved does not name a module
|
||||
|
||||
fn main() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// xfail-test
|
||||
// error-pattern:unresolved import: m::f
|
||||
import x = m::f;
|
||||
use x = m::f;
|
||||
|
||||
mod m {
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import dvec::DVec;
|
||||
use dvec::DVec;
|
||||
|
||||
type parser = {
|
||||
tokens: DVec<int>,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// error-pattern:failed to resolve imports
|
||||
import x = m::f;
|
||||
use x = m::f;
|
||||
|
||||
mod m {
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
use std;
|
||||
import option;
|
||||
import cmp::Eq;
|
||||
use cmp::Eq;
|
||||
|
||||
fn f<T:Eq>(&o: Option<T>) {
|
||||
assert o == option::None;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use std;
|
||||
import std::map;
|
||||
import std::map::hashmap;
|
||||
import std::map::map;
|
||||
use std::map;
|
||||
use std::map::hashmap;
|
||||
use std::map::map;
|
||||
|
||||
// Test that trait types printed in error msgs include the type arguments.
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// error-pattern:declaration of `None` shadows
|
||||
import option::*;
|
||||
use option::*;
|
||||
|
||||
fn main() {
|
||||
let None: int = 42;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// error-pattern: copying a noncopyable value
|
||||
|
||||
use std;
|
||||
import std::arc;
|
||||
import comm::*;
|
||||
use std::arc;
|
||||
use comm::*;
|
||||
|
||||
fn main() {
|
||||
let v = ~[1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use std;
|
||||
import std::arc;
|
||||
import comm::*;
|
||||
use std::arc;
|
||||
use comm::*;
|
||||
|
||||
fn main() {
|
||||
let v = ~[1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
// -*- rust -*-
|
||||
|
||||
use std;
|
||||
import option;
|
||||
import option::Some;
|
||||
use option::Some;
|
||||
|
||||
// error-pattern: mismatched types
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// -*- rust -*-
|
||||
use std;
|
||||
import option;
|
||||
import option::Some;
|
||||
use option::Some;
|
||||
|
||||
// error-pattern: mismatched types
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// xfail-fast
|
||||
// aux-build:cci_class_5.rs
|
||||
use cci_class_5;
|
||||
import cci_class_5::kitties::*;
|
||||
use cci_class_5::kitties::*;
|
||||
|
||||
fn main() {
|
||||
let nyan : cat = cat(52u, 99);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// xfail-fast
|
||||
// aux-build:cci_class.rs
|
||||
use cci_class;
|
||||
import cci_class::kitties::*;
|
||||
use cci_class::kitties::*;
|
||||
|
||||
fn main() {
|
||||
let nyan : cat = cat(52u, 99);
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
use std;
|
||||
use syntax;
|
||||
|
||||
import io::*;
|
||||
use io::*;
|
||||
|
||||
import syntax::diagnostic;
|
||||
import syntax::ast;
|
||||
import syntax::codemap;
|
||||
import syntax::parse;
|
||||
import syntax::print::*;
|
||||
use syntax::diagnostic;
|
||||
use syntax::ast;
|
||||
use syntax::codemap;
|
||||
use syntax::parse;
|
||||
use syntax::print::*;
|
||||
|
||||
fn new_parse_sess() -> parse::parse_sess {
|
||||
fail;
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
use std;
|
||||
use syntax;
|
||||
|
||||
import std::io::*;
|
||||
use std::io::*;
|
||||
|
||||
import syntax::diagnostic;
|
||||
import syntax::ast;
|
||||
import syntax::codemap;
|
||||
import syntax::parse::parser;
|
||||
import syntax::print::*;
|
||||
use syntax::diagnostic;
|
||||
use syntax::ast;
|
||||
use syntax::codemap;
|
||||
use syntax::parse::parser;
|
||||
use syntax::print::*;
|
||||
|
||||
fn new_parse_sess() -> parser::parse_sess {
|
||||
fail;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
// error-pattern: mismatched types
|
||||
|
||||
use std;
|
||||
import task;
|
||||
|
||||
fn main() { task::spawn(fn~() -> int { 10 }); }
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// error-pattern: reference is not valid outside of its lifetime
|
||||
use std;
|
||||
import std::sync;
|
||||
use std::sync;
|
||||
|
||||
fn main() {
|
||||
let m = ~sync::Mutex();
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// error-pattern: reference is not valid outside of its lifetime
|
||||
use std;
|
||||
import std::sync;
|
||||
use std::sync;
|
||||
fn main() {
|
||||
let x = ~sync::RWlock();
|
||||
let mut y = None;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// error-pattern: cannot infer an appropriate lifetime
|
||||
use std;
|
||||
import std::sync;
|
||||
use std::sync;
|
||||
fn main() {
|
||||
let x = ~sync::RWlock();
|
||||
let mut y = None;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// error-pattern: reference is not valid outside of its lifetime
|
||||
use std;
|
||||
import std::sync;
|
||||
use std::sync;
|
||||
fn main() {
|
||||
let x = ~sync::RWlock();
|
||||
let mut y = None;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// error-pattern: reference is not valid outside of its lifetime
|
||||
use std;
|
||||
import std::sync;
|
||||
use std::sync;
|
||||
fn main() {
|
||||
let x = ~sync::RWlock();
|
||||
let mut y = None;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// error-pattern:unused import
|
||||
// compile-flags:-W unused-imports
|
||||
import cal = bar::c::cc;
|
||||
use cal = bar::c::cc;
|
||||
|
||||
mod foo {
|
||||
type point = {x: int, y: int};
|
||||
|
|
|
@ -5,7 +5,7 @@ use std;
|
|||
fn f() {
|
||||
}
|
||||
|
||||
import std::net; //~ ERROR view items must be declared at the top
|
||||
use std::net; //~ ERROR view items must be declared at the top
|
||||
|
||||
fn main() {
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
// error-pattern:moop
|
||||
use std;
|
||||
import uint;
|
||||
fn main() { fail ~"moop"; }
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
// error-pattern:moop
|
||||
use std;
|
||||
import uint;
|
||||
fn main() { for uint::range(0u, 10u) |_i| { fail ~"moop"; } }
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// error-pattern:explicit failure
|
||||
// Don't double free the string
|
||||
use std;
|
||||
import io::Reader;
|
||||
use io::Reader;
|
||||
|
||||
fn main() {
|
||||
do io::with_str_reader(~"") |rdr| {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// error-pattern:explicit failure
|
||||
|
||||
use std;
|
||||
import std::arc;
|
||||
use std::arc;
|
||||
|
||||
enum e<T: const send> { e(arc::ARC<T>) }
|
||||
|
||||
|
|
|
@ -2,9 +2,8 @@
|
|||
|
||||
// error-pattern:1 == 2
|
||||
use std;
|
||||
import task;
|
||||
import comm::Port;
|
||||
import comm::recv;
|
||||
use comm::Port;
|
||||
use comm::recv;
|
||||
|
||||
fn child() { assert (1 == 2); }
|
||||
|
||||
|
|
|
@ -2,10 +2,9 @@
|
|||
|
||||
// error-pattern:fail
|
||||
use std;
|
||||
import task;
|
||||
import comm::Chan;
|
||||
import comm::Port;
|
||||
import comm::recv;
|
||||
use comm::Chan;
|
||||
use comm::Port;
|
||||
use comm::recv;
|
||||
|
||||
fn child() { fail; }
|
||||
|
||||
|
|
|
@ -2,9 +2,8 @@
|
|||
|
||||
// error-pattern:fail
|
||||
use std;
|
||||
import task;
|
||||
import comm::Port;
|
||||
import comm::recv;
|
||||
use comm::Port;
|
||||
use comm::recv;
|
||||
|
||||
fn grandchild() { fail ~"grandchild dies"; }
|
||||
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
// -*- rust -*-
|
||||
// error-pattern:1 == 2
|
||||
use std;
|
||||
import task;
|
||||
import comm::Chan;
|
||||
import comm::Port;
|
||||
import comm::recv;
|
||||
use comm::Chan;
|
||||
use comm::Port;
|
||||
use comm::recv;
|
||||
|
||||
fn child() { assert (1 == 2); }
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
// error-pattern:meep
|
||||
use std;
|
||||
import comm::Chan;
|
||||
import comm::Port;
|
||||
import comm::send;
|
||||
import comm::recv;
|
||||
use comm::Chan;
|
||||
use comm::Port;
|
||||
use comm::send;
|
||||
use comm::recv;
|
||||
|
||||
fn echo<T: send>(c: Chan<T>, oc: Chan<Chan<T>>) {
|
||||
// Tests that the type argument in port gets
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// xfail-win32
|
||||
// error-pattern:explicit
|
||||
use std;
|
||||
import task;
|
||||
|
||||
// We don't want to see any invalid reads
|
||||
fn main() {
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
// error-pattern:goodfail
|
||||
|
||||
use std;
|
||||
import task;
|
||||
import comm;
|
||||
|
||||
fn goodfail() {
|
||||
task::yield();
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
// error-pattern:fail
|
||||
|
||||
use std;
|
||||
import std::map;
|
||||
import std::map::hashmap;
|
||||
import uint;
|
||||
use std::map;
|
||||
use std::map::hashmap;
|
||||
|
||||
fn main() {
|
||||
let count = @mut 0u;
|
||||
|
|
|
@ -2,9 +2,7 @@
|
|||
// the assert should fail at runtime
|
||||
// error-pattern:Assertion same_length(chars, ints) failed
|
||||
use std;
|
||||
import uint;
|
||||
import u8;
|
||||
import vec::{same_length, zip};
|
||||
use vec::{same_length, zip};
|
||||
|
||||
fn enum_chars(start: u8, end: u8) -> ~[char] {
|
||||
assert start < end;
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
// xfail-test
|
||||
// fails pretty printing for some reason
|
||||
use syntax;
|
||||
import syntax::diagnostic;
|
||||
import syntax;
|
||||
import syntax::ast;
|
||||
import syntax::codemap;
|
||||
import syntax::print::pprust;
|
||||
import syntax::parse::parser;
|
||||
use syntax::diagnostic;
|
||||
use syntax::ast;
|
||||
use syntax::codemap;
|
||||
use syntax::print::pprust;
|
||||
use syntax::parse::parser;
|
||||
|
||||
fn new_parse_sess() -> parser::parse_sess {
|
||||
let cm = codemap::new_codemap();
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
use std;
|
||||
use syntax;
|
||||
|
||||
import io::*;
|
||||
use io::*;
|
||||
|
||||
import syntax::diagnostic;
|
||||
import syntax::ast;
|
||||
import syntax::codemap;
|
||||
import syntax::parse;
|
||||
import syntax::print::*;
|
||||
use syntax::diagnostic;
|
||||
use syntax::ast;
|
||||
use syntax::codemap;
|
||||
use syntax::parse;
|
||||
use syntax::print::*;
|
||||
|
||||
trait fake_ext_ctxt {
|
||||
fn cfg() -> ast::crate_cfg;
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
// -*- rust -*-
|
||||
|
||||
use std;
|
||||
import comm;
|
||||
import task;
|
||||
|
||||
fn f(c: comm::_chan<int>) {
|
||||
type t = {_0: int, _1: int, _2: int};
|
||||
|
|
|
@ -2,8 +2,7 @@
|
|||
|
||||
// Regression test for issue #374
|
||||
use std;
|
||||
import option;
|
||||
import option::None;
|
||||
use option::None;
|
||||
|
||||
enum sty { ty_nil, }
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
|
||||
use std;
|
||||
import option;
|
||||
|
||||
fn foo<T>(y: Option<T>) {
|
||||
let mut x: int;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
|
||||
// -*- rust -*-
|
||||
import core::sys;
|
||||
use core::sys;
|
||||
|
||||
enum t { make_t(@int), clam, }
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue