rustc: Implement a new resolve pass behind a compile flag

This commit is contained in:
Patrick Walton 2012-05-22 10:54:12 -07:00
parent 0b1edb7f0e
commit f093d374ed
42 changed files with 4336 additions and 163 deletions

View file

@ -8,6 +8,7 @@ import io;
import io::{reader_util, writer_util};
import map;
import map::hashmap;
import core::vec::extensions;
export json;
export error;

View file

@ -102,6 +102,11 @@ pure fn append<T: copy>(l: @list<T>, m: @list<T>) -> @list<T> {
}
}
#[doc = "Push an element to the front of a list"]
fn push<T: copy>(&l: list<T>, v: T) {
l = cons(v, @l);
}
#[doc = "Iterate over a list"]
fn iter<T>(l: @list<T>, f: fn(T)) {
let mut cur = l;

View file

@ -4,6 +4,7 @@ import comm::send;
import comm::recv;
import future_spawn = future::spawn;
import future::future;
import core::vec::extensions;
export map, mapi, alli, any, mapi_factory;

View file

@ -3,6 +3,7 @@
import core::option;
import option::{none, some};
import rand;
import core::rand::extensions;
fn mkdtemp(prefix: str, suffix: str) -> option<str> {
let r = rand::rng();

View file

@ -7,7 +7,7 @@ The I/O task runs in its own single-threaded scheduler. By using the
"];
export iotask::{};
export iotask;
export spawn_iotask;
export interact;
export exit;