libstd: Switch off legacy modes in both core and std.

This commit is contained in:
Patrick Walton 2012-10-02 12:19:04 -07:00
parent b787a26534
commit 9284179311
24 changed files with 108 additions and 97 deletions

View File

@ -144,7 +144,7 @@ fn is_uuid(id: ~str) -> bool {
if vec::len(parts) == 5u {
let mut correct = 0u;
for vec::eachi(parts) |i, part| {
fn is_hex_digit(ch: char) -> bool {
fn is_hex_digit(+ch: char) -> bool {
('0' <= ch && ch <= '9') ||
('a' <= ch && ch <= 'f') ||
('A' <= ch && ch <= 'F')
@ -402,7 +402,7 @@ fn need_dir(s: &Path) {
}
fn valid_pkg_name(s: &str) -> bool {
fn is_valid_digit(c: char) -> bool {
fn is_valid_digit(+c: char) -> bool {
('0' <= c && c <= '9') ||
('a' <= c && c <= 'z') ||
('A' <= c && c <= 'Z') ||

View File

@ -221,7 +221,7 @@ fn under(n: uint, it: fn(uint)) {
while i < n { it(i); i += 1u; }
}
fn as_str(f: fn@(io::Writer)) -> ~str {
fn as_str(f: fn@(+x: io::Writer)) -> ~str {
io::with_str_writer(f)
}

View File

@ -3,7 +3,7 @@
#[abi = "rust-intrinsic"]
extern mod rusti {
fn forget<T>(-x: T);
fn reinterpret_cast<T, U>(e: T) -> U;
fn reinterpret_cast<T, U>(&&e: T) -> U;
}
/// Casts the value at `src` to U. The two types must have the same length.

View File

@ -33,7 +33,7 @@ will once again be the preferred module for intertask communication.
*/
// NB: transitionary, de-mode-ing.
#[forbid(deprecated_mode)];
#[warn(deprecated_mode)];
#[forbid(deprecated_pattern)];
use either::Either;
@ -166,7 +166,7 @@ fn as_raw_port<T: Send, U>(ch: comm::Chan<T>, f: fn(*rust_port) -> U) -> U {
* Constructs a channel. The channel is bound to the port used to
* construct it.
*/
pub fn Chan<T: Send>(p: Port<T>) -> Chan<T> {
pub fn Chan<T: Send>(&&p: Port<T>) -> Chan<T> {
Chan_(rustrt::get_port_id((**p).po))
}

View File

@ -36,7 +36,6 @@ Implicitly, all crates behave as if they included the following prologue:
// Don't link to core. We are core.
#[no_core];
#[legacy_modes];
#[legacy_exports];
#[warn(deprecated_mode)];

View File

@ -35,7 +35,7 @@ extern mod rustrt {
fn rust_getcwd() -> ~str;
fn rust_path_is_dir(path: *libc::c_char) -> c_int;
fn rust_path_exists(path: *libc::c_char) -> c_int;
fn rust_list_files(path: ~str) -> ~[~str];
fn rust_list_files2(&&path: ~str) -> ~[~str];
fn rust_process_wait(handle: c_int) -> c_int;
fn last_os_error() -> ~str;
fn rust_set_exit_status(code: libc::intptr_t);
@ -582,7 +582,7 @@ pub fn list_dir(p: &Path) -> ~[~str] {
#[cfg(windows)]
fn star(p: &Path) -> Path { p.push("*") }
do rustrt::rust_list_files(star(p).to_str()).filter |filename| {
do rustrt::rust_list_files2(star(p).to_str()).filter |filename| {
*filename != ~"." && *filename != ~".."
}
}

View File

@ -21,7 +21,7 @@ extern mod libc_ {
#[abi = "rust-intrinsic"]
extern mod rusti {
fn addr_of<T>(val: T) -> *T;
fn addr_of<T>(&&val: T) -> *T;
}
/// Get an unsafe pointer to a value

View File

@ -11,7 +11,7 @@ enum rctx {}
extern mod rustrt {
fn rand_seed() -> ~[u8];
fn rand_new() -> *rctx;
fn rand_new_seeded(seed: ~[u8]) -> *rctx;
fn rand_new_seeded2(&&seed: ~[u8]) -> *rctx;
fn rand_next(c: *rctx) -> u32;
fn rand_free(c: *rctx);
}
@ -276,7 +276,7 @@ pub fn Rng() -> Rng {
* length.
*/
pub fn seeded_rng(seed: &~[u8]) -> Rng {
@RandRes(rustrt::rand_new_seeded(*seed)) as Rng
@RandRes(rustrt::rand_new_seeded2(*seed)) as Rng
}
type XorShiftState = {

View File

@ -1,7 +1,8 @@
#[doc(hidden)]; // FIXME #3538
// NB: transitionary, de-mode-ing.
#[forbid(deprecated_mode)];
// XXX: Can't do this because frame_address needs a deprecated mode.
//#[forbid(deprecated_mode)];
#[forbid(deprecated_pattern)];
use cast::reinterpret_cast;
@ -74,7 +75,7 @@ fn breakpoint() {
rustrt::rust_dbg_breakpoint()
}
fn frame_address(f: fn(*u8)) {
fn frame_address(f: fn(++x: *u8)) {
rusti::frame_address(f)
}
@ -86,5 +87,5 @@ extern mod rustrt {
#[abi = "rust-intrinsic"]
extern mod rusti {
#[legacy_exports];
fn frame_address(f: fn(*u8));
fn frame_address(f: fn(++x: *u8));
}

View File

@ -588,11 +588,11 @@ impl EbmlDeserializer: serialization::Deserializer {
#[test]
fn test_option_int() {
fn serialize_1<S: serialization::Serializer>(s: S, v: int) {
fn serialize_1<S: serialization::Serializer>(&&s: S, v: int) {
s.emit_i64(v as i64);
}
fn serialize_0<S: serialization::Serializer>(s: S, v: Option<int>) {
fn serialize_0<S: serialization::Serializer>(&&s: S, v: Option<int>) {
do s.emit_enum(~"core::option::t") {
match v {
None => s.emit_enum_variant(
@ -606,11 +606,11 @@ fn test_option_int() {
}
}
fn deserialize_1<S: serialization::Deserializer>(s: S) -> int {
fn deserialize_1<S: serialization::Deserializer>(&&s: S) -> int {
s.read_i64() as int
}
fn deserialize_0<S: serialization::Deserializer>(s: S) -> Option<int> {
fn deserialize_0<S: serialization::Deserializer>(&&s: S) -> Option<int> {
do s.read_enum(~"core::option::t") {
do s.read_enum_variant |i| {
match i {

View File

@ -81,7 +81,7 @@ trait Deserializer {
//
// In some cases, these should eventually be coded as traits.
fn emit_from_vec<S: Serializer, T>(s: S, v: ~[T], f: fn(T)) {
fn emit_from_vec<S: Serializer, T>(&&s: S, &&v: ~[T], f: fn(&&x: T)) {
do s.emit_vec(vec::len(v)) {
for vec::eachi(v) |i,e| {
do s.emit_vec_elt(i) {
@ -91,7 +91,7 @@ fn emit_from_vec<S: Serializer, T>(s: S, v: ~[T], f: fn(T)) {
}
}
fn read_to_vec<D: Deserializer, T: Copy>(d: D, f: fn() -> T) -> ~[T] {
fn read_to_vec<D: Deserializer, T: Copy>(&&d: D, f: fn() -> T) -> ~[T] {
do d.read_vec |len| {
do vec::from_fn(len) |i| {
d.read_vec_elt(i, || f())
@ -100,11 +100,11 @@ fn read_to_vec<D: Deserializer, T: Copy>(d: D, f: fn() -> T) -> ~[T] {
}
trait SerializerHelpers {
fn emit_from_vec<T>(v: ~[T], f: fn(T));
fn emit_from_vec<T>(&&v: ~[T], f: fn(&&x: T));
}
impl<S: Serializer> S: SerializerHelpers {
fn emit_from_vec<T>(v: ~[T], f: fn(T)) {
fn emit_from_vec<T>(&&v: ~[T], f: fn(&&x: T)) {
emit_from_vec(self, v, f)
}
}
@ -119,127 +119,127 @@ impl<D: Deserializer> D: DeserializerHelpers {
}
}
fn serialize_uint<S: Serializer>(s: S, v: uint) {
fn serialize_uint<S: Serializer>(&&s: S, v: uint) {
s.emit_uint(v);
}
fn deserialize_uint<D: Deserializer>(d: D) -> uint {
fn deserialize_uint<D: Deserializer>(&&d: D) -> uint {
d.read_uint()
}
fn serialize_u8<S: Serializer>(s: S, v: u8) {
fn serialize_u8<S: Serializer>(&&s: S, v: u8) {
s.emit_u8(v);
}
fn deserialize_u8<D: Deserializer>(d: D) -> u8 {
fn deserialize_u8<D: Deserializer>(&&d: D) -> u8 {
d.read_u8()
}
fn serialize_u16<S: Serializer>(s: S, v: u16) {
fn serialize_u16<S: Serializer>(&&s: S, v: u16) {
s.emit_u16(v);
}
fn deserialize_u16<D: Deserializer>(d: D) -> u16 {
fn deserialize_u16<D: Deserializer>(&&d: D) -> u16 {
d.read_u16()
}
fn serialize_u32<S: Serializer>(s: S, v: u32) {
fn serialize_u32<S: Serializer>(&&s: S, v: u32) {
s.emit_u32(v);
}
fn deserialize_u32<D: Deserializer>(d: D) -> u32 {
fn deserialize_u32<D: Deserializer>(&&d: D) -> u32 {
d.read_u32()
}
fn serialize_u64<S: Serializer>(s: S, v: u64) {
fn serialize_u64<S: Serializer>(&&s: S, v: u64) {
s.emit_u64(v);
}
fn deserialize_u64<D: Deserializer>(d: D) -> u64 {
fn deserialize_u64<D: Deserializer>(&&d: D) -> u64 {
d.read_u64()
}
fn serialize_int<S: Serializer>(s: S, v: int) {
fn serialize_int<S: Serializer>(&&s: S, v: int) {
s.emit_int(v);
}
fn deserialize_int<D: Deserializer>(d: D) -> int {
fn deserialize_int<D: Deserializer>(&&d: D) -> int {
d.read_int()
}
fn serialize_i8<S: Serializer>(s: S, v: i8) {
fn serialize_i8<S: Serializer>(&&s: S, v: i8) {
s.emit_i8(v);
}
fn deserialize_i8<D: Deserializer>(d: D) -> i8 {
fn deserialize_i8<D: Deserializer>(&&d: D) -> i8 {
d.read_i8()
}
fn serialize_i16<S: Serializer>(s: S, v: i16) {
fn serialize_i16<S: Serializer>(&&s: S, v: i16) {
s.emit_i16(v);
}
fn deserialize_i16<D: Deserializer>(d: D) -> i16 {
fn deserialize_i16<D: Deserializer>(&&d: D) -> i16 {
d.read_i16()
}
fn serialize_i32<S: Serializer>(s: S, v: i32) {
fn serialize_i32<S: Serializer>(&&s: S, v: i32) {
s.emit_i32(v);
}
fn deserialize_i32<D: Deserializer>(d: D) -> i32 {
fn deserialize_i32<D: Deserializer>(&&d: D) -> i32 {
d.read_i32()
}
fn serialize_i64<S: Serializer>(s: S, v: i64) {
fn serialize_i64<S: Serializer>(&&s: S, v: i64) {
s.emit_i64(v);
}
fn deserialize_i64<D: Deserializer>(d: D) -> i64 {
fn deserialize_i64<D: Deserializer>(&&d: D) -> i64 {
d.read_i64()
}
fn serialize_str<S: Serializer>(s: S, v: &str) {
fn serialize_str<S: Serializer>(&&s: S, v: &str) {
s.emit_str(v);
}
fn deserialize_str<D: Deserializer>(d: D) -> ~str {
fn deserialize_str<D: Deserializer>(&&d: D) -> ~str {
d.read_str()
}
fn serialize_float<S: Serializer>(s: S, v: float) {
fn serialize_float<S: Serializer>(&&s: S, v: float) {
s.emit_float(v);
}
fn deserialize_float<D: Deserializer>(d: D) -> float {
fn deserialize_float<D: Deserializer>(&&d: D) -> float {
d.read_float()
}
fn serialize_f32<S: Serializer>(s: S, v: f32) {
fn serialize_f32<S: Serializer>(&&s: S, v: f32) {
s.emit_f32(v);
}
fn deserialize_f32<D: Deserializer>(d: D) -> f32 {
fn deserialize_f32<D: Deserializer>(&&d: D) -> f32 {
d.read_f32()
}
fn serialize_f64<S: Serializer>(s: S, v: f64) {
fn serialize_f64<S: Serializer>(&&s: S, v: f64) {
s.emit_f64(v);
}
fn deserialize_f64<D: Deserializer>(d: D) -> f64 {
fn deserialize_f64<D: Deserializer>(&&d: D) -> f64 {
d.read_f64()
}
fn serialize_bool<S: Serializer>(s: S, v: bool) {
fn serialize_bool<S: Serializer>(&&s: S, v: bool) {
s.emit_bool(v);
}
fn deserialize_bool<D: Deserializer>(d: D) -> bool {
fn deserialize_bool<D: Deserializer>(&&d: D) -> bool {
d.read_bool()
}
fn serialize_Option<S: Serializer,T>(s: S, v: Option<T>, st: fn(T)) {
fn serialize_Option<S: Serializer,T>(&&s: S, &&v: Option<T>, st: fn(&&x: T)) {
do s.emit_enum(~"option") {
match v {
None => do s.emit_enum_variant(~"none", 0u, 0u) {
@ -254,7 +254,7 @@ fn serialize_Option<S: Serializer,T>(s: S, v: Option<T>, st: fn(T)) {
}
}
fn deserialize_Option<D: Deserializer,T: Copy>(d: D, st: fn() -> T)
fn deserialize_Option<D: Deserializer,T: Copy>(&&d: D, st: fn() -> T)
-> Option<T> {
do d.read_enum(~"option") {
do d.read_enum_variant |i| {

View File

@ -18,7 +18,6 @@ not required in or otherwise suitable for the core library.
#[no_core];
#[legacy_modes];
#[legacy_exports];
#[allow(vecs_implicitly_copyable)];

View File

@ -69,7 +69,7 @@ impl ident: cmp::Eq {
}
impl ident: to_bytes::IterBytes {
pure fn iter_bytes(lsb0: bool, f: to_bytes::Cb) {
pure fn iter_bytes(+lsb0: bool, f: to_bytes::Cb) {
self.repr.iter_bytes(lsb0, f)
}
}
@ -328,7 +328,7 @@ enum binding_mode {
}
impl binding_mode : to_bytes::IterBytes {
pure fn iter_bytes(lsb0: bool, f: to_bytes::Cb) {
pure fn iter_bytes(+lsb0: bool, f: to_bytes::Cb) {
match self {
bind_by_value => 0u8.iter_bytes(lsb0, f),
@ -402,7 +402,7 @@ enum pat_ {
enum mutability { m_mutbl, m_imm, m_const, }
impl mutability : to_bytes::IterBytes {
pure fn iter_bytes(lsb0: bool, f: to_bytes::Cb) {
pure fn iter_bytes(+lsb0: bool, f: to_bytes::Cb) {
(self as u8).iter_bytes(lsb0, f)
}
}
@ -541,7 +541,7 @@ enum inferable<T> {
}
impl<T: to_bytes::IterBytes> inferable<T> : to_bytes::IterBytes {
pure fn iter_bytes(lsb0: bool, f: to_bytes::Cb) {
pure fn iter_bytes(+lsb0: bool, f: to_bytes::Cb) {
match self {
expl(ref t) =>
to_bytes::iter_bytes_2(&0u8, t, lsb0, f),
@ -577,7 +577,7 @@ impl<T:cmp::Eq> inferable<T> : cmp::Eq {
enum rmode { by_ref, by_val, by_mutbl_ref, by_move, by_copy }
impl rmode : to_bytes::IterBytes {
pure fn iter_bytes(lsb0: bool, f: to_bytes::Cb) {
pure fn iter_bytes(+lsb0: bool, f: to_bytes::Cb) {
(self as u8).iter_bytes(lsb0, f)
}
}
@ -937,7 +937,7 @@ enum trait_method {
enum int_ty { ty_i, ty_char, ty_i8, ty_i16, ty_i32, ty_i64, }
impl int_ty : to_bytes::IterBytes {
pure fn iter_bytes(lsb0: bool, f: to_bytes::Cb) {
pure fn iter_bytes(+lsb0: bool, f: to_bytes::Cb) {
(self as u8).iter_bytes(lsb0, f)
}
}
@ -966,7 +966,7 @@ impl int_ty : cmp::Eq {
enum uint_ty { ty_u, ty_u8, ty_u16, ty_u32, ty_u64, }
impl uint_ty : to_bytes::IterBytes {
pure fn iter_bytes(lsb0: bool, f: to_bytes::Cb) {
pure fn iter_bytes(+lsb0: bool, f: to_bytes::Cb) {
(self as u8).iter_bytes(lsb0, f)
}
}
@ -993,7 +993,7 @@ impl uint_ty : cmp::Eq {
enum float_ty { ty_f, ty_f32, ty_f64, }
impl float_ty : to_bytes::IterBytes {
pure fn iter_bytes(lsb0: bool, f: to_bytes::Cb) {
pure fn iter_bytes(+lsb0: bool, f: to_bytes::Cb) {
(self as u8).iter_bytes(lsb0, f)
}
}
@ -1102,7 +1102,7 @@ impl ty : cmp::Eq {
}
impl ty : to_bytes::IterBytes {
pure fn iter_bytes(lsb0: bool, f: to_bytes::Cb) {
pure fn iter_bytes(+lsb0: bool, f: to_bytes::Cb) {
to_bytes::iter_bytes_2(&self.span.lo, &self.span.hi, lsb0, f);
}
}
@ -1126,7 +1126,7 @@ enum purity {
}
impl purity : to_bytes::IterBytes {
pure fn iter_bytes(lsb0: bool, f: to_bytes::Cb) {
pure fn iter_bytes(+lsb0: bool, f: to_bytes::Cb) {
(self as u8).iter_bytes(lsb0, f)
}
}
@ -1146,7 +1146,7 @@ enum ret_style {
}
impl ret_style : to_bytes::IterBytes {
pure fn iter_bytes(lsb0: bool, f: to_bytes::Cb) {
pure fn iter_bytes(+lsb0: bool, f: to_bytes::Cb) {
(self as u8).iter_bytes(lsb0, f)
}
}
@ -1443,7 +1443,7 @@ enum item_ {
enum class_mutability { class_mutable, class_immutable }
impl class_mutability : to_bytes::IterBytes {
pure fn iter_bytes(lsb0: bool, f: to_bytes::Cb) {
pure fn iter_bytes(+lsb0: bool, f: to_bytes::Cb) {
(self as u8).iter_bytes(lsb0, f)
}
}

View File

@ -254,7 +254,7 @@ pure fn is_call_expr(e: @expr) -> bool {
// This makes def_id hashable
impl def_id : core::to_bytes::IterBytes {
#[inline(always)]
pure fn iter_bytes(lsb0: bool, f: core::to_bytes::Cb) {
pure fn iter_bytes(+lsb0: bool, f: core::to_bytes::Cb) {
core::to_bytes::iter_bytes_2(&self.crate, &self.node, lsb0, f);
}
}

View File

@ -36,7 +36,7 @@ impl ObsoleteSyntax : cmp::Eq {
impl ObsoleteSyntax: to_bytes::IterBytes {
#[inline(always)]
pure fn iter_bytes(lsb0: bool, f: to_bytes::Cb) {
pure fn iter_bytes(+lsb0: bool, f: to_bytes::Cb) {
(self as uint).iter_bytes(lsb0, f);
}
}

View File

@ -180,6 +180,11 @@ rand_new_seeded(rust_vec_box* seed) {
return rctx;
}
extern "C" CDECL void *
rand_new_seeded2(rust_vec_box** seed) {
return rand_new_seeded(*seed);
}
extern "C" CDECL size_t
rand_next(randctx *rctx) {
return isaac_rand(rctx);
@ -371,6 +376,11 @@ rust_list_files(rust_str *path) {
return vec;
}
extern "C" CDECL rust_vec_box*
rust_list_files2(rust_str **path) {
return rust_list_files(*path);
}
extern "C" CDECL int
rust_path_is_dir(char *path) {
struct stat buf;

View File

@ -27,6 +27,7 @@ rust_port_select
rand_free
rand_new
rand_new_seeded
rand_new_seeded2
rand_next
rand_seed
rust_get_sched_id
@ -40,6 +41,7 @@ rust_get_stdin
rust_get_stdout
rust_get_stderr
rust_list_files
rust_list_files2
rust_log_console_on
rust_log_console_off
rust_port_begin_detach

View File

@ -415,7 +415,7 @@ impl root_map_key : cmp::Eq {
}
impl root_map_key : to_bytes::IterBytes {
pure fn iter_bytes(lsb0: bool, f: to_bytes::Cb) {
pure fn iter_bytes(+lsb0: bool, f: to_bytes::Cb) {
to_bytes::iter_bytes_2(&self.id, &self.derefs, lsb0, f);
}
}

View File

@ -1142,7 +1142,7 @@ impl mono_id_ : cmp::Eq {
}
impl mono_param_id : to_bytes::IterBytes {
pure fn iter_bytes(lsb0: bool, f: to_bytes::Cb) {
pure fn iter_bytes(+lsb0: bool, f: to_bytes::Cb) {
match self {
mono_precise(t, mids) =>
to_bytes::iter_bytes_3(&0u8, &ty::type_id(t), &mids, lsb0, f),
@ -1156,7 +1156,7 @@ impl mono_param_id : to_bytes::IterBytes {
}
impl mono_id_ : core::to_bytes::IterBytes {
pure fn iter_bytes(lsb0: bool, f: to_bytes::Cb) {
pure fn iter_bytes(+lsb0: bool, f: to_bytes::Cb) {
to_bytes::iter_bytes_2(&self.def, &self.params, lsb0, f);
}
}

View File

@ -146,7 +146,7 @@ impl DatumMode: cmp::Eq {
}
impl DatumMode: to_bytes::IterBytes {
pure fn iter_bytes(lsb0: bool, f: to_bytes::Cb) {
pure fn iter_bytes(+lsb0: bool, f: to_bytes::Cb) {
(self as uint).iter_bytes(lsb0, f)
}
}

View File

@ -248,7 +248,7 @@ impl creader_cache_key : cmp::Eq {
}
impl creader_cache_key : to_bytes::IterBytes {
pure fn iter_bytes(lsb0: bool, f: to_bytes::Cb) {
pure fn iter_bytes(+lsb0: bool, f: to_bytes::Cb) {
to_bytes::iter_bytes_3(&self.cnum, &self.pos, &self.len, lsb0, f);
}
}
@ -263,7 +263,7 @@ impl intern_key : cmp::Eq {
}
impl intern_key : to_bytes::IterBytes {
pure fn iter_bytes(lsb0: bool, f: to_bytes::Cb) {
pure fn iter_bytes(+lsb0: bool, f: to_bytes::Cb) {
to_bytes::iter_bytes_2(&self.sty, &self.o_def_id, lsb0, f);
}
}
@ -406,7 +406,7 @@ enum closure_kind {
}
impl closure_kind : to_bytes::IterBytes {
pure fn iter_bytes(lsb0: bool, f: to_bytes::Cb) {
pure fn iter_bytes(+lsb0: bool, f: to_bytes::Cb) {
(self as u8).iter_bytes(lsb0, f)
}
}
@ -424,7 +424,7 @@ enum fn_proto {
}
impl fn_proto : to_bytes::IterBytes {
pure fn iter_bytes(lsb0: bool, f: to_bytes::Cb) {
pure fn iter_bytes(+lsb0: bool, f: to_bytes::Cb) {
match self {
proto_bare =>
0u8.iter_bytes(lsb0, f),
@ -502,7 +502,7 @@ impl param_ty : cmp::Eq {
}
impl param_ty : to_bytes::IterBytes {
pure fn iter_bytes(lsb0: bool, f: to_bytes::Cb) {
pure fn iter_bytes(+lsb0: bool, f: to_bytes::Cb) {
to_bytes::iter_bytes_2(&self.idx, &self.def_id, lsb0, f)
}
}
@ -676,7 +676,7 @@ enum InferTy {
}
impl InferTy : to_bytes::IterBytes {
pure fn iter_bytes(lsb0: bool, f: to_bytes::Cb) {
pure fn iter_bytes(+lsb0: bool, f: to_bytes::Cb) {
match self {
TyVar(ref tv) => to_bytes::iter_bytes_2(&0u8, tv, lsb0, f),
IntVar(ref iv) => to_bytes::iter_bytes_2(&1u8, iv, lsb0, f)
@ -685,7 +685,7 @@ impl InferTy : to_bytes::IterBytes {
}
impl param_bound : to_bytes::IterBytes {
pure fn iter_bytes(lsb0: bool, f: to_bytes::Cb) {
pure fn iter_bytes(+lsb0: bool, f: to_bytes::Cb) {
match self {
bound_copy => 0u8.iter_bytes(lsb0, f),
bound_owned => 1u8.iter_bytes(lsb0, f),
@ -749,25 +749,25 @@ impl purity: purity_to_str {
}
impl RegionVid : to_bytes::IterBytes {
pure fn iter_bytes(lsb0: bool, f: to_bytes::Cb) {
pure fn iter_bytes(+lsb0: bool, f: to_bytes::Cb) {
(*self).iter_bytes(lsb0, f)
}
}
impl TyVid : to_bytes::IterBytes {
pure fn iter_bytes(lsb0: bool, f: to_bytes::Cb) {
pure fn iter_bytes(+lsb0: bool, f: to_bytes::Cb) {
(*self).iter_bytes(lsb0, f)
}
}
impl IntVid : to_bytes::IterBytes {
pure fn iter_bytes(lsb0: bool, f: to_bytes::Cb) {
pure fn iter_bytes(+lsb0: bool, f: to_bytes::Cb) {
(*self).iter_bytes(lsb0, f)
}
}
impl FnVid : to_bytes::IterBytes {
pure fn iter_bytes(lsb0: bool, f: to_bytes::Cb) {
pure fn iter_bytes(+lsb0: bool, f: to_bytes::Cb) {
(*self).iter_bytes(lsb0, f)
}
}
@ -2505,7 +2505,7 @@ fn index_sty(cx: ctxt, sty: &sty) -> Option<mt> {
}
impl bound_region : to_bytes::IterBytes {
pure fn iter_bytes(lsb0: bool, f: to_bytes::Cb) {
pure fn iter_bytes(+lsb0: bool, f: to_bytes::Cb) {
match self {
ty::br_self => 0u8.iter_bytes(lsb0, f),
@ -2522,7 +2522,7 @@ impl bound_region : to_bytes::IterBytes {
}
impl region : to_bytes::IterBytes {
pure fn iter_bytes(lsb0: bool, f: to_bytes::Cb) {
pure fn iter_bytes(+lsb0: bool, f: to_bytes::Cb) {
match self {
re_bound(ref br) =>
to_bytes::iter_bytes_2(&0u8, br, lsb0, f),
@ -2542,7 +2542,7 @@ impl region : to_bytes::IterBytes {
}
impl vstore : to_bytes::IterBytes {
pure fn iter_bytes(lsb0: bool, f: to_bytes::Cb) {
pure fn iter_bytes(+lsb0: bool, f: to_bytes::Cb) {
match self {
vstore_fixed(ref u) =>
to_bytes::iter_bytes_2(&0u8, u, lsb0, f),
@ -2557,7 +2557,7 @@ impl vstore : to_bytes::IterBytes {
}
impl substs : to_bytes::IterBytes {
pure fn iter_bytes(lsb0: bool, f: to_bytes::Cb) {
pure fn iter_bytes(+lsb0: bool, f: to_bytes::Cb) {
to_bytes::iter_bytes_3(&self.self_r,
&self.self_ty,
&self.tps, lsb0, f)
@ -2565,28 +2565,28 @@ impl substs : to_bytes::IterBytes {
}
impl mt : to_bytes::IterBytes {
pure fn iter_bytes(lsb0: bool, f: to_bytes::Cb) {
pure fn iter_bytes(+lsb0: bool, f: to_bytes::Cb) {
to_bytes::iter_bytes_2(&self.ty,
&self.mutbl, lsb0, f)
}
}
impl field : to_bytes::IterBytes {
pure fn iter_bytes(lsb0: bool, f: to_bytes::Cb) {
pure fn iter_bytes(+lsb0: bool, f: to_bytes::Cb) {
to_bytes::iter_bytes_2(&self.ident,
&self.mt, lsb0, f)
}
}
impl arg : to_bytes::IterBytes {
pure fn iter_bytes(lsb0: bool, f: to_bytes::Cb) {
pure fn iter_bytes(+lsb0: bool, f: to_bytes::Cb) {
to_bytes::iter_bytes_2(&self.mode,
&self.ty, lsb0, f)
}
}
impl sty : to_bytes::IterBytes {
pure fn iter_bytes(lsb0: bool, f: to_bytes::Cb) {
pure fn iter_bytes(+lsb0: bool, f: to_bytes::Cb) {
match self {
ty_nil => 0u8.iter_bytes(lsb0, f),
ty_bool => 1u8.iter_bytes(lsb0, f),

View File

@ -350,7 +350,7 @@ impl Constraint : cmp::Eq {
}
impl Constraint : to_bytes::IterBytes {
pure fn iter_bytes(lsb0: bool, f: to_bytes::Cb) {
pure fn iter_bytes(+lsb0: bool, f: to_bytes::Cb) {
match self {
ConstrainVarSubVar(ref v0, ref v1) =>
to_bytes::iter_bytes_3(&0u8, v0, v1, lsb0, f),
@ -377,7 +377,7 @@ impl TwoRegions : cmp::Eq {
}
impl TwoRegions : to_bytes::IterBytes {
pure fn iter_bytes(lsb0: bool, f: to_bytes::Cb) {
pure fn iter_bytes(+lsb0: bool, f: to_bytes::Cb) {
to_bytes::iter_bytes_2(&self.a, &self.b, lsb0, f)
}
}

View File

@ -251,7 +251,7 @@ fn pbfs(&&graph: arc::ARC<graph>, key: node_id) -> bfs_result {
colors = do par::mapi_factory(*color_vec) {
let colors = arc::clone(&color);
let graph = arc::clone(&graph);
fn~(i: uint, c: color) -> color {
fn~(+i: uint, +c: color) -> color {
let c : color = c;
let colors = arc::get(&colors);
let graph = arc::get(&graph);

View File

@ -94,7 +94,7 @@ type devnull = {dn: int};
impl devnull: io::Writer {
fn write(_b: &[const u8]) {}
fn seek(_i: int, _s: io::SeekStyle) {}
fn seek(+_i: int, +_s: io::SeekStyle) {}
fn tell() -> uint {0_u}
fn flush() -> int {0}
fn get_type() -> io::WriterType { io::File }