diff options
Diffstat (limited to 'src/test')
477 files changed, 1381 insertions, 676 deletions
diff --git a/src/test/auxiliary/anon-extern-mod-cross-crate-1.rs b/src/test/auxiliary/anon-extern-mod-cross-crate-1.rs index aa6ee35a077..fe4a397b786 100644 --- a/src/test/auxiliary/anon-extern-mod-cross-crate-1.rs +++ b/src/test/auxiliary/anon-extern-mod-cross-crate-1.rs @@ -10,7 +10,7 @@ #[crate_id="anonexternmod#0.1"]; -use std::libc; +extern crate libc; #[link(name="rustrt")] extern { diff --git a/src/test/auxiliary/crateresolve7x.rs b/src/test/auxiliary/crateresolve7x.rs index 5cf5c6d178d..801ace7d804 100644 --- a/src/test/auxiliary/crateresolve7x.rs +++ b/src/test/auxiliary/crateresolve7x.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:crateresolve_calories-1.rs // aux-build:crateresolve_calories-2.rs diff --git a/src/test/auxiliary/extern-crosscrate-source.rs b/src/test/auxiliary/extern-crosscrate-source.rs index d2c79bbe9cb..7185ac413c5 100644 --- a/src/test/auxiliary/extern-crosscrate-source.rs +++ b/src/test/auxiliary/extern-crosscrate-source.rs @@ -11,10 +11,10 @@ #[crate_id="externcallback#0.1"]; #[crate_type = "lib"]; -use std::libc; +extern crate libc; pub mod rustrt { - use std::libc; + extern crate libc; #[link(name = "rustrt")] extern { diff --git a/src/test/auxiliary/foreign_lib.rs b/src/test/auxiliary/foreign_lib.rs index e59fae34636..396e136f6f0 100644 --- a/src/test/auxiliary/foreign_lib.rs +++ b/src/test/auxiliary/foreign_lib.rs @@ -11,7 +11,7 @@ #[crate_id="foreign_lib"]; pub mod rustrt { - use std::libc; + extern crate libc; #[link(name = "rustrt")] extern { diff --git a/src/test/auxiliary/iss.rs b/src/test/auxiliary/iss.rs index 28437c4585d..96cb6c3273a 100644 --- a/src/test/auxiliary/iss.rs +++ b/src/test/auxiliary/iss.rs @@ -13,7 +13,7 @@ // part of issue-6919.rs struct C<'a> { - pub k: 'a ||, + pub k: ||: 'a, } fn no_op() { } diff --git a/src/test/auxiliary/issue-12612-1.rs b/src/test/auxiliary/issue-12612-1.rs new file mode 100644 index 00000000000..a0234c1185a --- /dev/null +++ b/src/test/auxiliary/issue-12612-1.rs @@ -0,0 +1,13 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +pub mod bar { + pub fn foo() {} +} diff --git a/src/test/auxiliary/issue-12612-2.rs b/src/test/auxiliary/issue-12612-2.rs new file mode 100644 index 00000000000..b4ae4374b2e --- /dev/null +++ b/src/test/auxiliary/issue-12612-2.rs @@ -0,0 +1,11 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +pub fn baz() {} diff --git a/src/test/auxiliary/issue-2414-b.rs b/src/test/auxiliary/issue-2414-b.rs index 177b735ead7..0a1587cd7cb 100644 --- a/src/test/auxiliary/issue-2414-b.rs +++ b/src/test/auxiliary/issue-2414-b.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast #[crate_id="b#0.1"]; #[crate_type = "lib"]; diff --git a/src/test/auxiliary/issue-3012-1.rs b/src/test/auxiliary/issue-3012-1.rs index af83c5561db..9bb47fcfad3 100644 --- a/src/test/auxiliary/issue-3012-1.rs +++ b/src/test/auxiliary/issue-3012-1.rs @@ -12,7 +12,7 @@ #[crate_type = "lib"]; pub mod socket { - use std::libc; + extern crate libc; pub struct socket_handle { sockfd: libc::c_int, diff --git a/src/test/auxiliary/issue-9906.rs b/src/test/auxiliary/issue-9906.rs index d1a6755c1e9..1e746bf39db 100644 --- a/src/test/auxiliary/issue-9906.rs +++ b/src/test/auxiliary/issue-9906.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast windows doesn't like extern crate // aux-build:issue-9906.rs pub use other::FooBar; diff --git a/src/test/auxiliary/issue13213aux.rs b/src/test/auxiliary/issue13213aux.rs new file mode 100644 index 00000000000..23cf49fb1d8 --- /dev/null +++ b/src/test/auxiliary/issue13213aux.rs @@ -0,0 +1,27 @@ +// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![crate_type = "lib"] +// compile-flags:-g + +pub use private::P; + +pub struct S { + p: P, +} + +mod private { + pub struct P { + p: i32, + } + pub static THREE: P = P { p: 3 }; +} + +pub static A: S = S { p: private::THREE }; \ No newline at end of file diff --git a/src/test/auxiliary/issue_5844_aux.rs b/src/test/auxiliary/issue_5844_aux.rs index 78e87f32b79..0f898ae8385 100644 --- a/src/test/auxiliary/issue_5844_aux.rs +++ b/src/test/auxiliary/issue_5844_aux.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::libc; +extern crate libc; extern "C" { pub fn rand() -> libc::c_int; diff --git a/src/test/auxiliary/lang-item-public.rs b/src/test/auxiliary/lang-item-public.rs index 123160f0c80..1435a101115 100644 --- a/src/test/auxiliary/lang-item-public.rs +++ b/src/test/auxiliary/lang-item-public.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[no_std]; +#![no_std] #[lang="fail_"] fn fail(_: *i8, _: *i8, _: uint) -> ! { loop {} } diff --git a/src/test/auxiliary/privacy-struct-variant.rs b/src/test/auxiliary/privacy-struct-variant.rs new file mode 100644 index 00000000000..af2e3328d3a --- /dev/null +++ b/src/test/auxiliary/privacy-struct-variant.rs @@ -0,0 +1,17 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![feature(struct_variant)] + +pub enum Foo { + Bar { + baz: int + } +} diff --git a/src/test/bench/msgsend-pipes-shared.rs b/src/test/bench/msgsend-pipes-shared.rs index 629b4cbfeea..d2e08cfccf8 100644 --- a/src/test/bench/msgsend-pipes-shared.rs +++ b/src/test/bench/msgsend-pipes-shared.rs @@ -38,12 +38,12 @@ fn server(requests: &Receiver<request>, responses: &Sender<uint>) { let mut done = false; while !done { match requests.recv_opt() { - Some(get_count) => { responses.send(count.clone()); } - Some(bytes(b)) => { + Ok(get_count) => { responses.send(count.clone()); } + Ok(bytes(b)) => { //println!("server: received {:?} bytes", b); count += b; } - None => { done = true; } + Err(..) => { done = true; } _ => { } } } diff --git a/src/test/bench/msgsend-pipes.rs b/src/test/bench/msgsend-pipes.rs index 49d9c5d3a2e..dc9b3561bb1 100644 --- a/src/test/bench/msgsend-pipes.rs +++ b/src/test/bench/msgsend-pipes.rs @@ -33,12 +33,12 @@ fn server(requests: &Receiver<request>, responses: &Sender<uint>) { let mut done = false; while !done { match requests.recv_opt() { - Some(get_count) => { responses.send(count.clone()); } - Some(bytes(b)) => { + Ok(get_count) => { responses.send(count.clone()); } + Ok(bytes(b)) => { //println!("server: received {:?} bytes", b); count += b; } - None => { done = true; } + Err(..) => { done = true; } _ => { } } } diff --git a/src/test/bench/shootout-binarytrees.rs b/src/test/bench/shootout-binarytrees.rs index 62b01779ac2..49184e188eb 100644 --- a/src/test/bench/shootout-binarytrees.rs +++ b/src/test/bench/shootout-binarytrees.rs @@ -76,7 +76,7 @@ fn main() { format!("{}\t trees of depth {}\t check: {}", iterations * 2, depth, chk) }) - }).collect::<~[Future<~str>]>(); + }).collect::<Vec<Future<~str>>>(); for message in messages.mut_iter() { println!("{}", *message.get_ref()); diff --git a/src/test/bench/shootout-chameneos-redux.rs b/src/test/bench/shootout-chameneos-redux.rs index 407bea5b4f4..5ea84feffde 100644 --- a/src/test/bench/shootout-chameneos-redux.rs +++ b/src/test/bench/shootout-chameneos-redux.rs @@ -12,6 +12,7 @@ use std::option; use std::os; +use std::strbuf::StrBuf; use std::task; fn print_complements() { @@ -31,53 +32,62 @@ struct CreatureInfo { color: color } -fn show_color(cc: color) -> ~str { +fn show_color(cc: color) -> &'static str { match cc { - Red => {~"red"} - Yellow => {~"yellow"} - Blue => {~"blue"} + Red => "red", + Yellow => "yellow", + Blue => "blue" } } -fn show_color_list(set: Vec<color>) -> ~str { - let mut out = ~""; +fn show_color_list(set: Vec<color>) -> StrBuf { + let mut out = StrBuf::new(); for col in set.iter() { out.push_char(' '); out.push_str(show_color(*col)); } - return out; + out } -fn show_digit(nn: uint) -> ~str { +fn show_digit(nn: uint) -> &'static str { match nn { - 0 => {~"zero"} - 1 => {~"one"} - 2 => {~"two"} - 3 => {~"three"} - 4 => {~"four"} - 5 => {~"five"} - 6 => {~"six"} - 7 => {~"seven"} - 8 => {~"eight"} - 9 => {~"nine"} + 0 => {"zero"} + 1 => {"one"} + 2 => {"two"} + 3 => {"three"} + 4 => {"four"} + 5 => {"five"} + 6 => {"six"} + 7 => {"seven"} + 8 => {"eight"} + 9 => {"nine"} _ => {fail!("expected digits from 0 to 9...")} } } -fn show_number(nn: uint) -> ~str { - let mut out = ~""; +fn show_number(nn: uint) -> StrBuf { + let mut out = vec![]; let mut num = nn; let mut dig; - - if num == 0 { out = show_digit(0) }; + let mut len = 0; + if num == 0 { out.push(show_digit(0)) }; while num != 0 { dig = num % 10; num = num / 10; - out = show_digit(dig) + " " + out; + out.push(" "); + let s = show_digit(dig); + out.push(s); + len += 1 + s.len(); } + len += 1; + out.push(" "); - return ~" " + out; + let mut ret = StrBuf::with_capacity(len); + for s in out.iter().rev() { + ret.push_str(*s); + } + ret } fn transform(aa: color, bb: color) -> color { @@ -124,7 +134,7 @@ fn creature( option::None => { // log creatures met and evil clones of self let report = format!("{} {}", - creatures_met, show_number(evil_clones_met)); + creatures_met, show_number(evil_clones_met).as_slice()); to_rendezvous_log.send(report); break; } diff --git a/src/test/bench/shootout-k-nucleotide-pipes.rs b/src/test/bench/shootout-k-nucleotide-pipes.rs index 9da32707ef1..9dd76f5e475 100644 --- a/src/test/bench/shootout-k-nucleotide-pipes.rs +++ b/src/test/bench/shootout-k-nucleotide-pipes.rs @@ -15,16 +15,11 @@ extern crate collections; -use std::cmp::Ord; -use std::comm; use collections::HashMap; use std::mem::replace; use std::option; use std::os; -use std::io; -use std::str; -use std::task; -use std::vec; +use std::strbuf::StrBuf; fn f64_cmp(x: f64, y: f64) -> Ordering { // arbitrarily decide that NaNs are larger than everything. @@ -63,19 +58,16 @@ fn sort_and_fmt(mm: &HashMap<Vec<u8> , uint>, total: uint) -> ~str { let pairs_sorted = sortKV(pairs); - let mut buffer = ~""; - + let mut buffer = StrBuf::new(); for &(ref k, v) in pairs_sorted.iter() { - unsafe { - buffer.push_str(format!("{} {:0.3f}\n", - k.as_slice() - .to_ascii() - .to_upper() - .into_str(), v)); - } + buffer.push_str(format!("{} {:0.3f}\n", + k.as_slice() + .to_ascii() + .to_upper() + .into_str(), v)); } - return buffer; + return buffer.into_owned(); } // given a map, search for the frequency of a pattern @@ -154,7 +146,7 @@ fn main() { let rdr = if os::getenv("RUST_BENCH").is_some() { let foo = include_bin!("shootout-k-nucleotide.data"); - ~MemReader::new(foo.to_owned()) as ~Reader + ~MemReader::new(Vec::from_slice(foo)) as ~Reader } else { ~stdio::stdin() as ~Reader }; diff --git a/src/test/bench/shootout-k-nucleotide.rs b/src/test/bench/shootout-k-nucleotide.rs index 7ceaaa7ad22..a1daf45cea9 100644 --- a/src/test/bench/shootout-k-nucleotide.rs +++ b/src/test/bench/shootout-k-nucleotide.rs @@ -11,8 +11,7 @@ // ignore-android see #10393 #13206 // ignore-pretty -use std::ascii::OwnedStrAsciiExt; -use std::str; +use std::strbuf::StrBuf; use std::slice; static TABLE: [u8, ..4] = [ 'A' as u8, 'C' as u8, 'G' as u8, 'T' as u8 ]; @@ -49,8 +48,7 @@ impl Code { string.bytes().fold(Code(0u64), |a, b| a.push_char(b)) } - // FIXME: Inefficient. - fn unpack(&self, frame: uint) -> ~str { + fn unpack(&self, frame: uint) -> StrBuf { let mut key = self.hash(); let mut result = Vec::new(); for _ in range(0, frame) { @@ -59,7 +57,7 @@ impl Code { } result.reverse(); - str::from_utf8_owned(result.move_iter().collect()).unwrap() + StrBuf::from_utf8(result).unwrap() } } @@ -238,7 +236,7 @@ fn print_frequencies(frequencies: &Table, frame: uint) { for &(count, key) in vector.iter().rev() { println!("{} {:.3f}", - key.unpack(frame), + key.unpack(frame).as_slice(), (count as f32 * 100.0) / (total_count as f32)); } println!(""); @@ -248,14 +246,17 @@ fn print_occurrences(frequencies: &mut Table, occurrence: &'static str) { frequencies.lookup(Code::pack(occurrence), PrintCallback(occurrence)) } -fn get_sequence<R: Buffer>(r: &mut R, key: &str) -> ~[u8] { - let mut res = ~""; +fn get_sequence<R: Buffer>(r: &mut R, key: &str) -> Vec<u8> { + let mut res = Vec::new(); for l in r.lines().map(|l| l.ok().unwrap()) .skip_while(|l| key != l.slice_to(key.len())).skip(1) { - res.push_str(l.trim()); + res.push_all(l.trim().as_bytes()); } - res.into_ascii_upper().into_bytes() + for b in res.mut_iter() { + *b = b.to_ascii().to_upper().to_byte(); + } + res } fn main() { @@ -267,17 +268,17 @@ fn main() { }; let mut frequencies = Table::new(); - generate_frequencies(&mut frequencies, input, 1); + generate_frequencies(&mut frequencies, input.as_slice(), 1); print_frequencies(&frequencies, 1); frequencies = Table::new(); - generate_frequencies(&mut frequencies, input, 2); + generate_frequencies(&mut frequencies, input.as_slice(), 2); print_frequencies(&frequencies, 2); for occurrence in OCCURRENCES.iter() { frequencies = Table::new(); generate_frequencies(&mut frequencies, - input, + input.as_slice(), occurrence.len()); print_occurrences(&mut frequencies, *occurrence); } diff --git a/src/test/bench/shootout-meteor.rs b/src/test/bench/shootout-meteor.rs index 45ce1776620..ee1697e52cf 100644 --- a/src/test/bench/shootout-meteor.rs +++ b/src/test/bench/shootout-meteor.rs @@ -15,11 +15,11 @@ // returns an infinite iterator of repeated applications of f to x, // i.e. [x, f(x), f(f(x)), ...], as haskell iterate function. -fn iterate<'a, T>(x: T, f: 'a |&T| -> T) -> Iterate<'a, T> { +fn iterate<'a, T>(x: T, f: |&T|: 'a -> T) -> Iterate<'a, T> { Iterate {f: f, next: x} } struct Iterate<'a, T> { - f: 'a |&T| -> T, + f: |&T|: 'a -> T, next: T } impl<'a, T> Iterator<T> for Iterate<'a, T> { diff --git a/src/test/bench/shootout-reverse-complement.rs b/src/test/bench/shootout-reverse-complement.rs index a96e9e9f81a..4ee4f94d435 100644 --- a/src/test/bench/shootout-reverse-complement.rs +++ b/src/test/bench/shootout-reverse-complement.rs @@ -44,7 +44,7 @@ fn main() { }; let mut data = data.unwrap(); - for seq in data.mut_split(|c| *c == '>' as u8) { + for seq in data.as_mut_slice().mut_split(|c| *c == '>' as u8) { // skip header and last \n let begin = match seq.iter().position(|c| *c == '\n' as u8) { None => continue, @@ -80,5 +80,5 @@ fn main() { } } - stdout().write(data).unwrap(); + stdout().write(data.as_slice()).unwrap(); } diff --git a/src/test/bench/shootout-threadring.rs b/src/test/bench/shootout-threadring.rs index 7ee294b8e63..72d91ac645e 100644 --- a/src/test/bench/shootout-threadring.rs +++ b/src/test/bench/shootout-threadring.rs @@ -15,7 +15,7 @@ use std::os; fn start(n_tasks: int, token: int) { let (tx, mut rx) = channel(); tx.send(token); - // XXX could not get this to work with a range closure + // FIXME could not get this to work with a range closure let mut i = 2; while i <= n_tasks { let (tx, next_rx) = channel(); diff --git a/src/test/bench/task-perf-jargon-metal-smoke.rs b/src/test/bench/task-perf-jargon-metal-smoke.rs index f5711d91447..a45f8c61be5 100644 --- a/src/test/bench/task-perf-jargon-metal-smoke.rs +++ b/src/test/bench/task-perf-jargon-metal-smoke.rs @@ -50,7 +50,7 @@ fn main() { let (tx, rx) = channel(); child_generation(from_str::<uint>(*args.get(1)).unwrap(), tx); - if rx.recv_opt().is_none() { + if rx.recv_opt().is_err() { fail!("it happened when we slumbered"); } } diff --git a/src/test/compile-fail/ambig_impl_2_exe.rs b/src/test/compile-fail/ambig_impl_2_exe.rs index a7a02438530..664a1684505 100644 --- a/src/test/compile-fail/ambig_impl_2_exe.rs +++ b/src/test/compile-fail/ambig_impl_2_exe.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast aux-build // aux-build:ambig_impl_2_lib.rs extern crate ambig_impl_2_lib; use ambig_impl_2_lib::me; diff --git a/src/test/compile-fail/asm-in-bad-modifier.rs b/src/test/compile-fail/asm-in-bad-modifier.rs index dfd9fd698c9..82ecfd0ca72 100644 --- a/src/test/compile-fail/asm-in-bad-modifier.rs +++ b/src/test/compile-fail/asm-in-bad-modifier.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast #[feature] doesn't work with check-fast #![feature(asm)] fn foo(x: int) { println!("{}", x); } diff --git a/src/test/compile-fail/asm-misplaced-option.rs b/src/test/compile-fail/asm-misplaced-option.rs index 36896667281..d90e4068785 100644 --- a/src/test/compile-fail/asm-misplaced-option.rs +++ b/src/test/compile-fail/asm-misplaced-option.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast #[feature] doesn't work with check-fast // ignore-android #![feature(asm)] diff --git a/src/test/compile-fail/asm-out-assign-imm.rs b/src/test/compile-fail/asm-out-assign-imm.rs index ae5c67c365f..2319594cb97 100644 --- a/src/test/compile-fail/asm-out-assign-imm.rs +++ b/src/test/compile-fail/asm-out-assign-imm.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast #[feature] doesn't work with check-fast #![feature(asm)] fn foo(x: int) { println!("{}", x); } diff --git a/src/test/compile-fail/asm-out-no-modifier.rs b/src/test/compile-fail/asm-out-no-modifier.rs index 01aa01e09ce..5535c167e3c 100644 --- a/src/test/compile-fail/asm-out-no-modifier.rs +++ b/src/test/compile-fail/asm-out-no-modifier.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast #[feature] doesn't work with check-fast #![feature(asm)] fn foo(x: int) { println!("{}", x); } diff --git a/src/test/compile-fail/asm-out-read-uninit.rs b/src/test/compile-fail/asm-out-read-uninit.rs index a63a59ff423..1d807acefe6 100644 --- a/src/test/compile-fail/asm-out-read-uninit.rs +++ b/src/test/compile-fail/asm-out-read-uninit.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast #[feature] doesn't work with check-fast #![feature(asm)] fn foo(x: int) { println!("{}", x); } diff --git a/src/test/compile-fail/attrs-after-extern-mod.rs b/src/test/compile-fail/attrs-after-extern-mod.rs index 44b6ecdee70..df747618696 100644 --- a/src/test/compile-fail/attrs-after-extern-mod.rs +++ b/src/test/compile-fail/attrs-after-extern-mod.rs @@ -12,7 +12,7 @@ // statics cannot. This ensures that there's some form of error if this is // attempted. -use std::libc; +extern crate libc; extern { static mut rust_dbg_static_mut: libc::c_int; diff --git a/src/test/compile-fail/builtin-superkinds-in-metadata.rs b/src/test/compile-fail/builtin-superkinds-in-metadata.rs index e085b35cbb1..66809aa72dc 100644 --- a/src/test/compile-fail/builtin-superkinds-in-metadata.rs +++ b/src/test/compile-fail/builtin-superkinds-in-metadata.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:trait_superkinds_in_metadata.rs diff --git a/src/test/compile-fail/closure-bounds-cant-promote-superkind-in-struct.rs b/src/test/compile-fail/closure-bounds-cant-promote-superkind-in-struct.rs index e5898b33e77..951354d964d 100644 --- a/src/test/compile-fail/closure-bounds-cant-promote-superkind-in-struct.rs +++ b/src/test/compile-fail/closure-bounds-cant-promote-superkind-in-struct.rs @@ -9,11 +9,11 @@ // except according to those terms. struct X { - field: 'static ||:Send, + field: ||:'static + Send, } -fn foo(blk: 'static ||:) -> X { - return X { field: blk }; //~ ERROR expected bounds `Send` but found no bounds +fn foo(blk: ||:'static) -> X { + return X { field: blk }; //~ ERROR expected bounds `'static+Send` } fn main() { diff --git a/src/test/compile-fail/closure-bounds-static-cant-capture-borrowed.rs b/src/test/compile-fail/closure-bounds-static-cant-capture-borrowed.rs index 1c6d65ba541..9176412cd79 100644 --- a/src/test/compile-fail/closure-bounds-static-cant-capture-borrowed.rs +++ b/src/test/compile-fail/closure-bounds-static-cant-capture-borrowed.rs @@ -12,8 +12,8 @@ fn bar(blk: ||:'static) { } fn foo(x: &()) { - bar(|| { - let _ = x; //~ ERROR does not fulfill `'static` + bar(|| { //~ ERROR cannot infer an appropriate lifetime + let _ = x; }) } diff --git a/src/test/compile-fail/coherence_inherent_cc.rs b/src/test/compile-fail/coherence_inherent_cc.rs index dcecbd5658d..4eb9864bc9c 100644 --- a/src/test/compile-fail/coherence_inherent_cc.rs +++ b/src/test/compile-fail/coherence_inherent_cc.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:coherence_inherent_cc_lib.rs // Tests that methods that implement a trait cannot be invoked diff --git a/src/test/compile-fail/crateresolve5.rs b/src/test/compile-fail/crateresolve5.rs index 124696630cc..8b4801466b9 100644 --- a/src/test/compile-fail/crateresolve5.rs +++ b/src/test/compile-fail/crateresolve5.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:crateresolve5-1.rs // aux-build:crateresolve5-2.rs diff --git a/src/test/compile-fail/functional-struct-update-noncopyable.rs b/src/test/compile-fail/functional-struct-update-noncopyable.rs index 0ba4db4f211..a37c318f9ee 100644 --- a/src/test/compile-fail/functional-struct-update-noncopyable.rs +++ b/src/test/compile-fail/functional-struct-update-noncopyable.rs @@ -10,8 +10,8 @@ // issue 7327 -// ignore-fast #7103 extern crate sync; + use sync::Arc; struct A { y: Arc<int>, x: Arc<int> } diff --git a/src/test/compile-fail/gated-non-ascii-idents.rs b/src/test/compile-fail/gated-non-ascii-idents.rs index 174554a0832..0634ba183a8 100644 --- a/src/test/compile-fail/gated-non-ascii-idents.rs +++ b/src/test/compile-fail/gated-non-ascii-idents.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast feature doesn't work. #![feature(struct_variant)] diff --git a/src/test/compile-fail/gated-trace_macros.rs b/src/test/compile-fail/gated-trace_macros.rs index 67225d56c4b..19b08ce655c 100644 --- a/src/test/compile-fail/gated-trace_macros.rs +++ b/src/test/compile-fail/gated-trace_macros.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast feature doesn't work. fn main() { trace_macros!(true); //~ ERROR: `trace_macros` is not stable diff --git a/src/test/compile-fail/issue-10398.rs b/src/test/compile-fail/issue-10398.rs new file mode 100644 index 00000000000..a58c88737b6 --- /dev/null +++ b/src/test/compile-fail/issue-10398.rs @@ -0,0 +1,19 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +fn main() { + let x = ~1; + let f: proc() = proc() { + let _a = x; + drop(x); + //~^ ERROR: use of moved value: `x` + }; + f(); +} diff --git a/src/test/compile-fail/issue-11925.rs b/src/test/compile-fail/issue-11925.rs index 06a976ecf3d..0b8eaa5b831 100644 --- a/src/test/compile-fail/issue-11925.rs +++ b/src/test/compile-fail/issue-11925.rs @@ -11,7 +11,7 @@ fn main() { let r = { let x = ~42; - let f = proc() &x; //~ ERROR: borrowed value does not live long enough + let f = proc() &x; //~ ERROR: `x` does not live long enough f() }; diff --git a/src/test/compile-fail/issue-12041.rs b/src/test/compile-fail/issue-12041.rs new file mode 100644 index 00000000000..9ad59367312 --- /dev/null +++ b/src/test/compile-fail/issue-12041.rs @@ -0,0 +1,21 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +fn main() { + let (tx, rx) = channel(); + spawn(proc() { + loop { + let tx = tx; + //~^ ERROR: use of moved value: `tx` + tx.send(1); + } + }); +} + diff --git a/src/test/compile-fail/issue-12127.rs b/src/test/compile-fail/issue-12127.rs new file mode 100644 index 00000000000..78892425770 --- /dev/null +++ b/src/test/compile-fail/issue-12127.rs @@ -0,0 +1,18 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +fn main() { + let f = proc() {}; + (proc() { + f(); + f(); + //~^ ERROR: use of moved value: `f` + })() +} diff --git a/src/test/compile-fail/issue-12612.rs b/src/test/compile-fail/issue-12612.rs new file mode 100644 index 00000000000..9d6eb425678 --- /dev/null +++ b/src/test/compile-fail/issue-12612.rs @@ -0,0 +1,24 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// aux-build:issue-12612-1.rs + +extern crate foo = "issue-12612-1"; + +use foo::bar; + +mod test { + use bar::foo; + //~^ ERROR: unresolved import + //~^^ ERROR: failed to resolve import +} + +fn main() {} + diff --git a/src/test/compile-fail/issue-13404.rs b/src/test/compile-fail/issue-13404.rs new file mode 100644 index 00000000000..2ce502ee8db --- /dev/null +++ b/src/test/compile-fail/issue-13404.rs @@ -0,0 +1,21 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +use a::f; +use b::f; +//~^ ERROR: unresolved import +//~^^ ERROR: failed to resolve import + +mod a { pub fn f() {} } +mod b { } + +fn main() { + f(); +} diff --git a/src/test/compile-fail/issue-3763.rs b/src/test/compile-fail/issue-3763.rs index 736ac55aef5..8eed8aa8644 100644 --- a/src/test/compile-fail/issue-3763.rs +++ b/src/test/compile-fail/issue-3763.rs @@ -24,11 +24,15 @@ mod my_mod { fn main() { let my_struct = my_mod::MyStruct(); - let _woohoo = (&my_struct).priv_field; //~ ERROR field `priv_field` is private - let _woohoo = (~my_struct).priv_field; //~ ERROR field `priv_field` is private - let _woohoo = (@my_struct).priv_field; //~ ERROR field `priv_field` is private + let _woohoo = (&my_struct).priv_field; + //~^ ERROR field `priv_field` of struct `my_mod::MyStruct` is private + let _woohoo = (~my_struct).priv_field; + //~^ ERROR field `priv_field` of struct `my_mod::MyStruct` is private + let _woohoo = (@my_struct).priv_field; + //~^ ERROR field `priv_field` of struct `my_mod::MyStruct` is private (&my_struct).happyfun(); //~ ERROR method `happyfun` is private (~my_struct).happyfun(); //~ ERROR method `happyfun` is private (@my_struct).happyfun(); //~ ERROR method `happyfun` is private - let nope = my_struct.priv_field; //~ ERROR field `priv_field` is private + let nope = my_struct.priv_field; + //~^ ERROR field `priv_field` of struct `my_mod::MyStruct` is private } diff --git a/src/test/compile-fail/issue-4335.rs b/src/test/compile-fail/issue-4335.rs index 8e4aa799d1f..08ff575f63b 100644 --- a/src/test/compile-fail/issue-4335.rs +++ b/src/test/compile-fail/issue-4335.rs @@ -10,7 +10,7 @@ fn id<T>(t: T) -> T { t } -fn f<'r, T>(v: &'r T) -> 'r || -> T { +fn f<'r, T>(v: &'r T) -> ||: 'r -> T { id(|| *v) //~ ERROR cannot infer } diff --git a/src/test/compile-fail/issue-4523.rs b/src/test/compile-fail/issue-4523.rs index 952a528b427..026327a358a 100644 --- a/src/test/compile-fail/issue-4523.rs +++ b/src/test/compile-fail/issue-4523.rs @@ -10,7 +10,7 @@ fn foopy() {} -static f: 'static || = foopy; //~ ERROR found extern fn +static f: ||: 'static = foopy; //~ ERROR found extern fn fn main () { f(); diff --git a/src/test/compile-fail/issue-5806.rs b/src/test/compile-fail/issue-5806.rs index 8ac2429a331..715772b3114 100644 --- a/src/test/compile-fail/issue-5806.rs +++ b/src/test/compile-fail/issue-5806.rs @@ -18,6 +18,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-freebsd FIXME #12460 + #[path = "../compile-fail"] mod foo; //~ ERROR: illegal operation on a directory diff --git a/src/test/compile-fail/issue-5883.rs b/src/test/compile-fail/issue-5883.rs index 621510cea99..5a7eb75d90d 100644 --- a/src/test/compile-fail/issue-5883.rs +++ b/src/test/compile-fail/issue-5883.rs @@ -11,13 +11,15 @@ trait A {} struct Struct { - r: A //~ ERROR reference to trait `A` where a type is expected + r: A //~ ERROR reference to trait `A` where a type is expected; try `~A` or `&A` } -fn new_struct(r: A) -> Struct { //~ ERROR reference to trait `A` where a type is expected +fn new_struct(r: A) -> Struct { + //~^ ERROR reference to trait `A` where a type is expected; try `~A` or `&A` Struct { r: r } } trait Curve {} -enum E {X(Curve)} //~ ERROR reference to trait `Curve` where a type is expected +enum E {X(Curve)} +//~^ ERROR reference to trait `Curve` where a type is expected; try `~Curve` or `&Curve` fn main() {} diff --git a/src/test/compile-fail/issue-7663.rs b/src/test/compile-fail/issue-7663.rs new file mode 100644 index 00000000000..baea483ad98 --- /dev/null +++ b/src/test/compile-fail/issue-7663.rs @@ -0,0 +1,56 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![feature(globs)] +#![deny(unused_imports)] +#![allow(dead_code)] + +mod test1 { + + mod foo { pub fn p() -> int { 1 } } + mod bar { pub fn p() -> int { 2 } } + + pub mod baz { + use test1::foo::*; //~ ERROR: unused import + use test1::bar::*; + + pub fn my_main() { assert!(p() == 2); } + } +} + +mod test2 { + + mod foo { pub fn p() -> int { 1 } } + mod bar { pub fn p() -> int { 2 } } + + pub mod baz { + use test2::foo::p; //~ ERROR: unused import + use test2::bar::p; + + pub fn my_main() { assert!(p() == 2); } + } +} + +mod test3 { + + mod foo { pub fn p() -> int { 1 } } + mod bar { pub fn p() -> int { 2 } } + + pub mod baz { + use test3::foo::*; //~ ERROR: unused import + use test3::bar::p; + + pub fn my_main() { assert!(p() == 2); } + } +} + +fn main() { +} + diff --git a/src/test/compile-fail/issue13359.rs b/src/test/compile-fail/issue13359.rs new file mode 100644 index 00000000000..07197bd3f3c --- /dev/null +++ b/src/test/compile-fail/issue13359.rs @@ -0,0 +1,21 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +fn foo(_s: i16) { } + +fn bar(_s: u32) { } + +fn main() { + foo(1*(1 as int)); + //~^ ERROR: mismatched types: expected `i16` but found `int` (expected `i16` but found `int`) + + bar(1*(1 as uint)); + //~^ ERROR: mismatched types: expected `u32` but found `uint` (expected `u32` but found `uint`) +} diff --git a/src/test/compile-fail/kindck-nonsendable-1.rs b/src/test/compile-fail/kindck-nonsendable-1.rs index 51687fffd11..8fe9694b0cb 100644 --- a/src/test/compile-fail/kindck-nonsendable-1.rs +++ b/src/test/compile-fail/kindck-nonsendable-1.rs @@ -14,8 +14,8 @@ fn foo(_x: @uint) {} fn main() { let x = @3u; - let _: proc:Send() = proc() foo(x); //~ ERROR does not fulfill `Send` - let _: proc:Send() = proc() foo(x); //~ ERROR does not fulfill `Send` - let _: proc:Send() = proc() foo(x); //~ ERROR does not fulfill `Send` + let _: proc():Send = proc() foo(x); //~ ERROR does not fulfill `Send` + let _: proc():Send = proc() foo(x); //~ ERROR does not fulfill `Send` + let _: proc():Send = proc() foo(x); //~ ERROR does not fulfill `Send` let _: proc() = proc() foo(x); } diff --git a/src/test/compile-fail/lint-ctypes.rs b/src/test/compile-fail/lint-ctypes.rs index 352a31cf67b..3de0a0446d8 100644 --- a/src/test/compile-fail/lint-ctypes.rs +++ b/src/test/compile-fail/lint-ctypes.rs @@ -10,7 +10,7 @@ #![deny(ctypes)] -use std::libc; +extern crate libc; extern { pub fn bare_type1(size: int); //~ ERROR: found rust type diff --git a/src/test/compile-fail/lint-dead-code-3.rs b/src/test/compile-fail/lint-dead-code-3.rs index 7c8a4c2a22c..95c1d131b7b 100644 --- a/src/test/compile-fail/lint-dead-code-3.rs +++ b/src/test/compile-fail/lint-dead-code-3.rs @@ -14,6 +14,8 @@ #![crate_type="lib"] +extern crate libc; + struct Foo; //~ ERROR: code is never used impl Foo { fn foo(&self) { //~ ERROR: code is never used @@ -46,7 +48,7 @@ pub fn pub_fn() { } mod blah { - use std::libc::size_t; + use libc::size_t; // not warned because it's used in the parameter of `free` and return of // `malloc` below, which are also used. enum c_void {} diff --git a/src/test/compile-fail/lint-stability.rs b/src/test/compile-fail/lint-stability.rs index 4ebd9f1cefd..8509afc9832 100644 --- a/src/test/compile-fail/lint-stability.rs +++ b/src/test/compile-fail/lint-stability.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast aux-build // aux-build:lint_stability.rs #![feature(globs)] diff --git a/src/test/compile-fail/moves-based-on-type-no-recursive-stack-closure.rs b/src/test/compile-fail/moves-based-on-type-no-recursive-stack-closure.rs index 03b9b7ba78f..e9053b46bbb 100644 --- a/src/test/compile-fail/moves-based-on-type-no-recursive-stack-closure.rs +++ b/src/test/compile-fail/moves-based-on-type-no-recursive-stack-closure.rs @@ -16,7 +16,7 @@ struct R<'a> { // This struct is needed to create the // otherwise infinite type of a fn that // accepts itself as argument: - c: 'a |&R, bool| + c: |&R, bool|: 'a } fn innocent_looking_victim() { diff --git a/src/test/compile-fail/non-copyable-void.rs b/src/test/compile-fail/non-copyable-void.rs index bd9547d5e1c..5025e2e509b 100644 --- a/src/test/compile-fail/non-copyable-void.rs +++ b/src/test/compile-fail/non-copyable-void.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::libc; +extern crate libc; fn main() { let x : *Vec<int> = &vec!(1,2,3); diff --git a/src/test/compile-fail/privacy-struct-variant.rs b/src/test/compile-fail/privacy-struct-variant.rs new file mode 100644 index 00000000000..d6fab326ba1 --- /dev/null +++ b/src/test/compile-fail/privacy-struct-variant.rs @@ -0,0 +1,48 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// aux-build:privacy-struct-variant.rs + +#![feature(struct_variant)] + +extern crate other = "privacy-struct-variant"; + +mod a { + pub enum Foo { + Bar { + baz: int + } + } + + fn test() { + let foo = Bar { baz: 42 }; + + let Bar { baz: _ } = foo; + match foo { Bar { baz: _ } => {} } + } +} + +fn main() { + let foo = a::Bar { baz: 42 }; + //~^ ERROR: field `baz` of variant `Bar` of enum `a::Foo` is private + + let a::Bar { baz: _ } = foo; + //~^ ERROR: field `baz` of variant `Bar` of enum `a::Foo` is private + match foo { a::Bar { baz: _ } => {} } + //~^ ERROR: field `baz` of variant `Bar` of enum `a::Foo` is private + // + let foo = other::Bar { baz: 42 }; + //~^ ERROR: field `baz` of variant `Bar` of enum `privacy-struct-variant::Foo` is private + + let other::Bar { baz: _ } = foo; + //~^ ERROR: field `baz` of variant `Bar` of enum `privacy-struct-variant::Foo` is private + match foo { other::Bar { baz: _ } => {} } + //~^ ERROR: field `baz` of variant `Bar` of enum `privacy-struct-variant::Foo` is private +} diff --git a/src/test/compile-fail/privacy5.rs b/src/test/compile-fail/privacy5.rs index c057236265e..2683022c4c8 100644 --- a/src/test/compile-fail/privacy5.rs +++ b/src/test/compile-fail/privacy5.rs @@ -64,25 +64,25 @@ fn this_crate() { let c = a::C(2, 3); //~ ERROR: cannot invoke tuple struct constructor let d = a::D(4); - let a::A(()) = a; //~ ERROR: field #1 is private + let a::A(()) = a; //~ ERROR: field #1 of struct `a::A` is private let a::A(_) = a; - match a { a::A(()) => {} } //~ ERROR: field #1 is private + match a { a::A(()) => {} } //~ ERROR: field #1 of struct `a::A` is private match a { a::A(_) => {} } let a::B(_) = b; - let a::B(_b) = b; //~ ERROR: field #1 is private + let a::B(_b) = b; //~ ERROR: field #1 of struct `a::B` is private match b { a::B(_) => {} } - match b { a::B(_b) => {} } //~ ERROR: field #1 is private - match b { a::B(1) => {} a::B(_) => {} } //~ ERROR: field #1 is private + match b { a::B(_b) => {} } //~ ERROR: field #1 of struct `a::B` is private + match b { a::B(1) => {} a::B(_) => {} } //~ ERROR: field #1 of struct `a::B` is private let a::C(_, _) = c; let a::C(_a, _) = c; - let a::C(_, _b) = c; //~ ERROR: field #2 is private - let a::C(_a, _b) = c; //~ ERROR: field #2 is private + let a::C(_, _b) = c; //~ ERROR: field #2 of struct `a::C` is private + let a::C(_a, _b) = c; //~ ERROR: field #2 of struct `a::C` is private match c { a::C(_, _) => {} } match c { a::C(_a, _) => {} } - match c { a::C(_, _b) => {} } //~ ERROR: field #2 is private - match c { a::C(_a, _b) => {} } //~ ERROR: field #2 is private + match c { a::C(_, _b) => {} } //~ ERROR: field #2 of struct `a::C` is private + match c { a::C(_a, _b) => {} } //~ ERROR: field #2 of struct `a::C` is private let a::D(_) = d; let a::D(_d) = d; @@ -102,25 +102,30 @@ fn xcrate() { let c = other::C(2, 3); //~ ERROR: cannot invoke tuple struct constructor let d = other::D(4); - let other::A(()) = a; //~ ERROR: field #1 is private + let other::A(()) = a; //~ ERROR: field #1 of struct `privacy-tuple-struct::A` is private let other::A(_) = a; - match a { other::A(()) => {} } //~ ERROR: field #1 is private + match a { other::A(()) => {} } + //~^ ERROR: field #1 of struct `privacy-tuple-struct::A` is private match a { other::A(_) => {} } let other::B(_) = b; - let other::B(_b) = b; //~ ERROR: field #1 is private + let other::B(_b) = b; //~ ERROR: field #1 of struct `privacy-tuple-struct::B` is private match b { other::B(_) => {} } - match b { other::B(_b) => {} } //~ ERROR: field #1 is private - match b { other::B(1) => {} other::B(_) => {} } //~ ERROR: field #1 is private + match b { other::B(_b) => {} } + //~^ ERROR: field #1 of struct `privacy-tuple-struct::B` is private + match b { other::B(1) => {} other::B(_) => {} } + //~^ ERROR: field #1 of struct `privacy-tuple-struct::B` is private let other::C(_, _) = c; let other::C(_a, _) = c; - let other::C(_, _b) = c; //~ ERROR: field #2 is private - let other::C(_a, _b) = c; //~ ERROR: field #2 is private + let other::C(_, _b) = c; //~ ERROR: field #2 of struct `privacy-tuple-struct::C` is private + let other::C(_a, _b) = c; //~ ERROR: field #2 of struct `privacy-tuple-struct::C` is private match c { other::C(_, _) => {} } match c { other::C(_a, _) => {} } - match c { other::C(_, _b) => {} } //~ ERROR: field #2 is private - match c { other::C(_a, _b) => {} } //~ ERROR: field #2 is private + match c { other::C(_, _b) => {} } + //~^ ERROR: field #2 of struct `privacy-tuple-struct::C` is private + match c { other::C(_a, _b) => {} } + //~^ ERROR: field #2 of struct `privacy-tuple-struct::C` is private let other::D(_) = d; let other::D(_d) = d; diff --git a/src/test/compile-fail/private-method-cross-crate.rs b/src/test/compile-fail/private-method-cross-crate.rs index 2e79c0f46ad..68059baa385 100644 --- a/src/test/compile-fail/private-method-cross-crate.rs +++ b/src/test/compile-fail/private-method-cross-crate.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:cci_class_5.rs extern crate cci_class_5; use cci_class_5::kitties::cat; diff --git a/src/test/compile-fail/private-struct-field-cross-crate.rs b/src/test/compile-fail/private-struct-field-cross-crate.rs index 0993ac9a64a..45c4b2b7ae1 100644 --- a/src/test/compile-fail/private-struct-field-cross-crate.rs +++ b/src/test/compile-fail/private-struct-field-cross-crate.rs @@ -14,5 +14,6 @@ use cci_class::kitties::cat; fn main() { let nyan : cat = cat(52u, 99); - assert!((nyan.meows == 52u)); //~ ERROR field `meows` is private + assert!((nyan.meows == 52u)); + //~^ ERROR field `meows` of struct `cci_class::kitties::cat` is private } diff --git a/src/test/compile-fail/private-struct-field-ctor.rs b/src/test/compile-fail/private-struct-field-ctor.rs index a5cee47d4e3..ae19c221496 100644 --- a/src/test/compile-fail/private-struct-field-ctor.rs +++ b/src/test/compile-fail/private-struct-field-ctor.rs @@ -15,5 +15,5 @@ mod a { } fn main() { - let s = a::Foo { x: 1 }; //~ ERROR field `x` is private + let s = a::Foo { x: 1 }; //~ ERROR field `x` of struct `a::Foo` is private } diff --git a/src/test/compile-fail/private-struct-field-pattern.rs b/src/test/compile-fail/private-struct-field-pattern.rs index ee1303b99dd..991457ef1ce 100644 --- a/src/test/compile-fail/private-struct-field-pattern.rs +++ b/src/test/compile-fail/private-struct-field-pattern.rs @@ -22,6 +22,6 @@ mod a { fn main() { match a::make() { - Foo { x: _ } => {} //~ ERROR field `x` is private + Foo { x: _ } => {} //~ ERROR field `x` of struct `a::Foo` is private } } diff --git a/src/test/compile-fail/private-struct-field.rs b/src/test/compile-fail/private-struct-field.rs index 52e979342f5..3f6fa573cc0 100644 --- a/src/test/compile-fail/private-struct-field.rs +++ b/src/test/compile-fail/private-struct-field.rs @@ -20,5 +20,5 @@ mod cat { fn main() { let nyan = cat::new_cat(); - assert!(nyan.meows == 52); //~ ERROR field `meows` is private + assert!(nyan.meows == 52); //~ ERROR field `meows` of struct `cat::Cat` is private } diff --git a/src/test/compile-fail/proc-bounds.rs b/src/test/compile-fail/proc-bounds.rs index e4d2c801070..0875212b7de 100644 --- a/src/test/compile-fail/proc-bounds.rs +++ b/src/test/compile-fail/proc-bounds.rs @@ -13,13 +13,13 @@ fn is_freeze<T: Share>() {} fn is_static<T: 'static>() {} fn main() { - is_send::<proc:()>(); + is_send::<proc()>(); //~^ ERROR: instantiating a type parameter with an incompatible type - is_freeze::<proc:()>(); + is_freeze::<proc()>(); //~^ ERROR: instantiating a type parameter with an incompatible type - is_static::<proc:()>(); + is_static::<proc()>(); //~^ ERROR: instantiating a type parameter with an incompatible type } diff --git a/src/test/compile-fail/redundant-link-args.rs b/src/test/compile-fail/redundant-link-args.rs new file mode 100644 index 00000000000..e7cf7c97459 --- /dev/null +++ b/src/test/compile-fail/redundant-link-args.rs @@ -0,0 +1,29 @@ +// Copyright 2012 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// ignore-test + +// error-pattern:library 'm' already added: can't specify link_args. + +/* I think it should undefined to have multiple modules that link in the same + library, but provide different link arguments. Unfortunately we don't track + link_args by module -- they are just appended as discovered into the crate + store -- but for now, it should be an error to provide link_args on a module + that's already been included (with or without link_args). */ + +#[link_name= "m"] +#[link_args="-foo"] // this could have been elided. +extern { +} + +#[link_name= "m"] +#[link_args="-bar"] // this is the actual error trigger. +extern { +} diff --git a/src/test/compile-fail/regionck-closure-lifetimes.rs b/src/test/compile-fail/regionck-closure-lifetimes.rs index ec51f2dc212..e9ef23ebe09 100644 --- a/src/test/compile-fail/regionck-closure-lifetimes.rs +++ b/src/test/compile-fail/regionck-closure-lifetimes.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -fn env<'a>(_: &'a uint, blk: |p: 'a |||) { +fn env<'a>(_: &'a uint, blk: |p: ||: 'a|) { // Test that the closure here cannot be assigned // the lifetime `'a`, which outlives the current // block. @@ -21,7 +21,7 @@ fn env<'a>(_: &'a uint, blk: |p: 'a |||) { blk(|| *statep = 1); //~ ERROR cannot infer } -fn no_env_no_for<'a>(_: &'a uint, blk: |p: 'a |||) { +fn no_env_no_for<'a>(_: &'a uint, blk: |p: |||: 'a) { // Test that a closure with no free variables CAN // outlive the block in which it is created. // diff --git a/src/test/compile-fail/regions-freevar.rs b/src/test/compile-fail/regions-freevar.rs index 68920065d19..285e11fa9a2 100644 --- a/src/test/compile-fail/regions-freevar.rs +++ b/src/test/compile-fail/regions-freevar.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -fn wants_static_fn(_x: 'static ||) {} +fn wants_static_fn(_x: ||: 'static) {} fn main() { let i = 3; diff --git a/src/test/compile-fail/regions-infer-at-fn-not-param.rs b/src/test/compile-fail/regions-infer-at-fn-not-param.rs index ad6d1b2742d..4c883656d61 100644 --- a/src/test/compile-fail/regions-infer-at-fn-not-param.rs +++ b/src/test/compile-fail/regions-infer-at-fn-not-param.rs @@ -9,15 +9,15 @@ // except according to those terms. struct parameterized1<'a> { - g: 'a || + g: ||: 'a } struct not_parameterized1 { - g: 'static || + g: ||: 'static } struct not_parameterized2 { - g: 'static || + g: ||: 'static } fn take1(p: parameterized1) -> parameterized1 { p } diff --git a/src/test/compile-fail/regions-infer-invariance-due-to-mutability-3.rs b/src/test/compile-fail/regions-infer-invariance-due-to-mutability-3.rs index ae1cbcf3e68..53d013c0e6b 100644 --- a/src/test/compile-fail/regions-infer-invariance-due-to-mutability-3.rs +++ b/src/test/compile-fail/regions-infer-invariance-due-to-mutability-3.rs @@ -11,7 +11,7 @@ #![feature(managed_boxes)] struct invariant<'a> { - f: 'static |x: &mut &'a int| + f: |x: &mut &'a int|: 'static } fn to_same_lifetime<'r>(bi: invariant<'r>) { diff --git a/src/test/compile-fail/regions-infer-invariance-due-to-mutability-4.rs b/src/test/compile-fail/regions-infer-invariance-due-to-mutability-4.rs index 096d8912f8b..edab5b21991 100644 --- a/src/test/compile-fail/regions-infer-invariance-due-to-mutability-4.rs +++ b/src/test/compile-fail/regions-infer-invariance-due-to-mutability-4.rs @@ -11,7 +11,7 @@ #![feature(managed_boxes)] struct invariant<'a> { - f: 'static || -> &mut &'a int + f: ||: 'static -> &mut &'a int } fn to_same_lifetime<'r>(bi: invariant<'r>) { diff --git a/src/test/compile-fail/regions-infer-not-param.rs b/src/test/compile-fail/regions-infer-not-param.rs index 6596a1d8c23..86f98d5cc35 100644 --- a/src/test/compile-fail/regions-infer-not-param.rs +++ b/src/test/compile-fail/regions-infer-not-param.rs @@ -14,12 +14,12 @@ struct direct<'a> { struct indirect1 { // Here the lifetime parameter of direct is bound by the fn() - g: 'static |direct| + g: |direct|: 'static } struct indirect2<'a> { // But here it is set to 'a - g: 'static |direct<'a>| + g: |direct<'a>|: 'static } fn take_direct(p: direct) -> direct { p } //~ ERROR mismatched types diff --git a/src/test/compile-fail/regions-steal-closure.rs b/src/test/compile-fail/regions-steal-closure.rs index f80e5616bd5..7ffc6a75cff 100644 --- a/src/test/compile-fail/regions-steal-closure.rs +++ b/src/test/compile-fail/regions-steal-closure.rs @@ -9,10 +9,10 @@ // except according to those terms. struct closure_box<'a> { - cl: 'a || + cl: ||: 'a } -fn box_it<'r>(x: 'r ||) -> closure_box<'r> { +fn box_it<'r>(x: ||: 'r) -> closure_box<'r> { closure_box {cl: x} } diff --git a/src/test/compile-fail/regions-trait-2.rs b/src/test/compile-fail/regions-trait-2.rs index 5b1f6b241d2..92c1849c15b 100644 --- a/src/test/compile-fail/regions-trait-2.rs +++ b/src/test/compile-fail/regions-trait-2.rs @@ -29,7 +29,7 @@ fn make_gc() -> @get_ctxt { let ctxt = ctxt { v: 22u }; let hc = has_ctxt { c: &ctxt }; return @hc as @get_ctxt; - //^~ ERROR source contains reference + //~^ ERROR source contains reference } fn main() { diff --git a/src/test/compile-fail/resolve-priv-shadowing-pub.rs b/src/test/compile-fail/resolve-priv-shadowing-pub.rs new file mode 100644 index 00000000000..0830722f969 --- /dev/null +++ b/src/test/compile-fail/resolve-priv-shadowing-pub.rs @@ -0,0 +1,33 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +mod a { + pub fn foobar() -> int { 1 } +} + +mod b { + pub fn foobar() -> int { 2 } +} + +mod c { + // Technically the second use shadows the first, but in theory it should + // only be shadowed for this module. The implementation of resolve currently + // doesn't implement this, so this test is ensuring that using "c::foobar" + // is *not* getting b::foobar. Today it's an error, but perhaps one day it + // can correctly get a::foobar instead. + pub use a::foobar; + use b::foobar; +} + +fn main() { + assert_eq!(c::foobar(), 1); + //~^ ERROR: unresolved name `c::foobar` +} + diff --git a/src/test/compile-fail/static-mut-foreign-requires-unsafe.rs b/src/test/compile-fail/static-mut-foreign-requires-unsafe.rs index 7b371cf708d..0e44af19a7f 100644 --- a/src/test/compile-fail/static-mut-foreign-requires-unsafe.rs +++ b/src/test/compile-fail/static-mut-foreign-requires-unsafe.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::libc; +extern crate libc; extern { static mut a: libc::c_int; diff --git a/src/test/compile-fail/struct-field-privacy.rs b/src/test/compile-fail/struct-field-privacy.rs index b6ae7235bb3..82ba9a02a30 100644 --- a/src/test/compile-fail/struct-field-privacy.rs +++ b/src/test/compile-fail/struct-field-privacy.rs @@ -32,16 +32,16 @@ fn test(a: A, b: inner::A, c: inner::B, d: xc::A, e: xc::B) { //~^^ ERROR: struct `A` is private a.a; - b.a; //~ ERROR: field `a` is private + b.a; //~ ERROR: field `a` of struct `inner::A` is private b.b; c.a; - c.b; //~ ERROR: field `b` is private + c.b; //~ ERROR: field `b` of struct `inner::B` is private - d.a; //~ ERROR: field `a` is private + d.a; //~ ERROR: field `a` of struct `struct-field-privacy::A` is private d.b; e.a; - e.b; //~ ERROR: field `b` is private + e.b; //~ ERROR: field `b` of struct `struct-field-privacy::B` is private } fn main() {} diff --git a/src/test/compile-fail/trace_macros-format.rs b/src/test/compile-fail/trace_macros-format.rs index d5955601f2d..8e000024675 100644 --- a/src/test/compile-fail/trace_macros-format.rs +++ b/src/test/compile-fail/trace_macros-format.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast feature doesn't work #![feature(macro_rules, trace_macros)] fn main() { diff --git a/src/test/compile-fail/trait-bounds-not-on-bare-trait.rs b/src/test/compile-fail/trait-bounds-not-on-bare-trait.rs index d7c98ec4e9d..50e55ad295e 100644 --- a/src/test/compile-fail/trait-bounds-not-on-bare-trait.rs +++ b/src/test/compile-fail/trait-bounds-not-on-bare-trait.rs @@ -13,7 +13,8 @@ trait Foo { // This should emit the less confusing error, not the more confusing one. -fn foo(_x: Foo:Send) { //~ERROR reference to trait `Foo` where a type is expected +fn foo(_x: Foo:Send) { + //~^ERROR reference to trait `Foo` where a type is expected; try `~Foo` or `&Foo` } fn main() { } diff --git a/src/test/compile-fail/trait-impl-method-mismatch.rs b/src/test/compile-fail/trait-impl-method-mismatch.rs index 039f94ec2e7..e64f76bb4cd 100644 --- a/src/test/compile-fail/trait-impl-method-mismatch.rs +++ b/src/test/compile-fail/trait-impl-method-mismatch.rs @@ -17,7 +17,7 @@ trait Mumbo { impl Mumbo for uint { // Cannot have a larger effect than the trait: unsafe fn jumbo(&self, x: @uint) { *self + *x; } - //~^ ERROR expected impure fn but found unsafe fn + //~^ ERROR expected normal fn but found unsafe fn } fn main() {} diff --git a/src/test/compile-fail/unsupported-cast.rs b/src/test/compile-fail/unsupported-cast.rs index be3f5ba7da8..fbcad79ac46 100644 --- a/src/test/compile-fail/unsupported-cast.rs +++ b/src/test/compile-fail/unsupported-cast.rs @@ -10,7 +10,7 @@ // error-pattern:unsupported cast -use std::libc; +extern crate libc; fn main() { println!("{:?}", 1.0 as *libc::FILE); // Can't cast float to foreign. diff --git a/src/test/compile-fail/vec-macro-with-comma-only.rs b/src/test/compile-fail/vec-macro-with-comma-only.rs new file mode 100644 index 00000000000..8c8e789cd96 --- /dev/null +++ b/src/test/compile-fail/vec-macro-with-comma-only.rs @@ -0,0 +1,13 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +pub fn main() { + vec!(,); //~ ERROR unexpected token +} diff --git a/src/test/compile-fail/xc-private-method.rs b/src/test/compile-fail/xc-private-method.rs index 503c8da70be..edc0e31040d 100644 --- a/src/test/compile-fail/xc-private-method.rs +++ b/src/test/compile-fail/xc-private-method.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:xc_private_method_lib.rs extern crate xc_private_method_lib; diff --git a/src/test/compile-fail/xc-private-method2.rs b/src/test/compile-fail/xc-private-method2.rs index 978ec39a06e..48b07a39eb8 100644 --- a/src/test/compile-fail/xc-private-method2.rs +++ b/src/test/compile-fail/xc-private-method2.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:xc_private_method_lib.rs extern crate xc_private_method_lib; diff --git a/src/test/debug-info/issue13213.rs b/src/test/debug-info/issue13213.rs new file mode 100644 index 00000000000..e60643eb3f4 --- /dev/null +++ b/src/test/debug-info/issue13213.rs @@ -0,0 +1,26 @@ +// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// ignore-android: FIXME(#10381) + +// aux-build:issue13213aux.rs +extern crate issue13213aux; + +// compile-flags:-g + +// This tests make sure that we get no linker error when using a completely inlined static. Some +// statics that are marked with AvailableExternallyLinkage in the importing crate, may actually not +// be available because they have been optimized out from the exporting crate. +fn main() { + let b: issue13213aux::S = issue13213aux::A; + zzz(); +} + +fn zzz() {()} \ No newline at end of file diff --git a/src/test/debug-info/recursive-enum.rs b/src/test/debug-info/recursive-enum.rs index 8279119a09c..c02d3f0e076 100644 --- a/src/test/debug-info/recursive-enum.rs +++ b/src/test/debug-info/recursive-enum.rs @@ -26,7 +26,7 @@ struct WindowCallbacks<'a> { pos_callback: Option<WindowPosCallback<'a>>, } -pub type WindowPosCallback<'a> = 'a |&Window, i32, i32|; +pub type WindowPosCallback<'a> = |&Window, i32, i32|: 'a; fn main() { let x = WindowCallbacks { pos_callback: None }; diff --git a/src/test/pretty/raw-str-nonexpr.rs b/src/test/pretty/raw-str-nonexpr.rs index b76591048ce..5cc5705ed75 100644 --- a/src/test/pretty/raw-str-nonexpr.rs +++ b/src/test/pretty/raw-str-nonexpr.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast #[feature] doesn't work with check-fast // pp-exact #![feature(asm)] diff --git a/src/test/run-fail/assert-eq-macro-fail.rs b/src/test/run-fail/assert-eq-macro-fail.rs index 7cebfc723de..fd6d69efb4f 100644 --- a/src/test/run-fail/assert-eq-macro-fail.rs +++ b/src/test/run-fail/assert-eq-macro-fail.rs @@ -10,9 +10,6 @@ // error-pattern:assertion failed: `(left == right) && (right == left)` (left: `14`, right: `15`) -#[deriving(Eq)] -struct Point { x : int } - fn main() { assert_eq!(14,15); } diff --git a/src/test/run-fail/extern-fail.rs b/src/test/run-fail/extern-fail.rs index 93f55261574..c11d269a897 100644 --- a/src/test/run-fail/extern-fail.rs +++ b/src/test/run-fail/extern-fail.rs @@ -13,11 +13,11 @@ // Testing that runtime failure doesn't cause callbacks to abort abnormally. // Instead the failure will be delivered after the callbacks return. -use std::libc; +extern crate libc; use std::task; mod rustrt { - use std::libc; + extern crate libc; extern { pub fn rust_dbg_call(cb: *u8, data: libc::uintptr_t) diff --git a/src/test/run-fail/glob-use-std.rs b/src/test/run-fail/glob-use-std.rs index a67ab3d2efc..458a95b91cf 100644 --- a/src/test/run-fail/glob-use-std.rs +++ b/src/test/run-fail/glob-use-std.rs @@ -16,7 +16,7 @@ use std::*; fn main() { - str::with_capacity(10); // avoid an unused import message + str::from_byte('a' as u8); // avoid an unused import message fail!("fail works") } diff --git a/src/test/run-fail/morestack2.rs b/src/test/run-fail/morestack2.rs index 2430c5bb666..67153042590 100644 --- a/src/test/run-fail/morestack2.rs +++ b/src/test/run-fail/morestack2.rs @@ -16,11 +16,11 @@ // See the hack in upcall_call_shim_on_c_stack where it messes // with the stack limit. -use std::libc; +extern crate libc; use std::task; mod rustrt { - use std::libc; + extern crate libc; extern { pub fn rust_get_argc() -> libc::c_int; diff --git a/src/test/run-fail/unwind-box-fn-unique.rs b/src/test/run-fail/unwind-box-fn-unique.rs index 4a6f37c91b7..da4210b9fa8 100644 --- a/src/test/run-fail/unwind-box-fn-unique.rs +++ b/src/test/run-fail/unwind-box-fn-unique.rs @@ -18,7 +18,7 @@ fn failfn() { fn main() { let y = ~0; - let x: @proc:Send() = @(proc() { + let x: @proc():Send = @(proc() { println!("{:?}", y.clone()); }); failfn(); diff --git a/src/test/run-fail/unwind-lambda.rs b/src/test/run-fail/unwind-lambda.rs index ee570fa2e95..f544d474c4f 100644 --- a/src/test/run-fail/unwind-lambda.rs +++ b/src/test/run-fail/unwind-lambda.rs @@ -16,7 +16,7 @@ fn main() { let cheese = ~"roquefort"; let carrots = @~"crunchy"; - let result: 'static |@~str, |~str|| = (|tasties, macerate| { + let result: |@~str, |~str||: 'static = (|tasties, macerate| { macerate((*tasties).clone()); }); result(carrots, |food| { diff --git a/src/test/run-make/c-link-to-rust-staticlib/Makefile b/src/test/run-make/c-link-to-rust-staticlib/Makefile index 134d15f37aa..78ac1f66bfc 100644 --- a/src/test/run-make/c-link-to-rust-staticlib/Makefile +++ b/src/test/run-make/c-link-to-rust-staticlib/Makefile @@ -4,6 +4,8 @@ ifneq ($(shell uname),Darwin) EXTRAFLAGS := -lm -lrt -ldl -lpthread endif +# FIXME +ifneq ($(shell uname),FreeBSD) all: $(RUSTC) foo.rs ln -s $(call STATICLIB,foo-*) $(call STATICLIB,foo) @@ -11,3 +13,8 @@ all: $(call RUN,bar) rm $(call STATICLIB,foo*) $(call RUN,bar) + +else +all: + +endif diff --git a/src/test/run-make/dep-info-custom/Makefile b/src/test/run-make/dep-info-custom/Makefile index 72ce26ee6c6..ca70ccae3da 100644 --- a/src/test/run-make/dep-info-custom/Makefile +++ b/src/test/run-make/dep-info-custom/Makefile @@ -1,5 +1,7 @@ -include ../tools.mk +# FIXME +ifneq ($(shell uname),FreeBSD) all: $(RUSTC) --dep-info $(TMPDIR)/custom-deps-file.d --crate-type=lib lib.rs sleep 1 @@ -10,3 +12,7 @@ all: pwd $(MAKE) -drf Makefile.foo rm $(TMPDIR)/done && exit 1 || exit 0 +else +all: + +endif diff --git a/src/test/run-make/dep-info/Makefile b/src/test/run-make/dep-info/Makefile index 00a59383176..277e7ad6294 100644 --- a/src/test/run-make/dep-info/Makefile +++ b/src/test/run-make/dep-info/Makefile @@ -1,12 +1,18 @@ -include ../tools.mk +ifneq ($(shell uname),FreeBSD) all: $(RUSTC) --dep-info --crate-type=lib lib.rs - sleep 1 + sleep 2 touch foo.rs -rm -f $(TMPDIR)/done $(MAKE) -drf Makefile.foo + sleep 2 rm $(TMPDIR)/done pwd $(MAKE) -drf Makefile.foo rm $(TMPDIR)/done && exit 1 || exit 0 +else +all: + +endif diff --git a/src/test/run-make/interdependent-c-libraries/Makefile b/src/test/run-make/interdependent-c-libraries/Makefile new file mode 100644 index 00000000000..7654917b462 --- /dev/null +++ b/src/test/run-make/interdependent-c-libraries/Makefile @@ -0,0 +1,15 @@ +-include ../tools.mk + +# The rust crate foo will link to the native library foo, while the rust crate +# bar will link to the native library bar. There is also a dependency between +# the native library bar to the natibe library foo. +# +# This test ensures that the ordering of -lfoo and -lbar on the command line is +# correct to complete the linkage. If passed as "-lfoo -lbar", then the 'foo' +# library will be stripped out, and the linkage will fail. + +all: $(call STATICLIB,foo) $(call STATICLIB,bar) + $(RUSTC) foo.rs + $(RUSTC) bar.rs + $(RUSTC) main.rs -Z print-link-args + diff --git a/src/test/run-make/interdependent-c-libraries/bar.c b/src/test/run-make/interdependent-c-libraries/bar.c new file mode 100644 index 00000000000..812c9753528 --- /dev/null +++ b/src/test/run-make/interdependent-c-libraries/bar.c @@ -0,0 +1,3 @@ +void foo(); + +void bar() { foo(); } diff --git a/src/test/run-make/interdependent-c-libraries/bar.rs b/src/test/run-make/interdependent-c-libraries/bar.rs new file mode 100644 index 00000000000..5311af2959b --- /dev/null +++ b/src/test/run-make/interdependent-c-libraries/bar.rs @@ -0,0 +1,23 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![crate_type = "rlib"] + +extern crate foo; + +#[link(name = "bar")] +extern { + fn bar(); +} + +pub fn doit() { + unsafe { bar(); } +} + diff --git a/src/test/run-make/interdependent-c-libraries/foo.c b/src/test/run-make/interdependent-c-libraries/foo.c new file mode 100644 index 00000000000..85e6cd8c390 --- /dev/null +++ b/src/test/run-make/interdependent-c-libraries/foo.c @@ -0,0 +1 @@ +void foo() {} diff --git a/src/test/run-make/interdependent-c-libraries/foo.rs b/src/test/run-make/interdependent-c-libraries/foo.rs new file mode 100644 index 00000000000..f94c6edb97d --- /dev/null +++ b/src/test/run-make/interdependent-c-libraries/foo.rs @@ -0,0 +1,20 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![crate_type = "rlib"] + +#[link(name = "foo")] +extern { + fn foo(); +} + +pub fn doit() { + unsafe { foo(); } +} diff --git a/src/test/run-make/interdependent-c-libraries/main.rs b/src/test/run-make/interdependent-c-libraries/main.rs new file mode 100644 index 00000000000..f42e3dd44a9 --- /dev/null +++ b/src/test/run-make/interdependent-c-libraries/main.rs @@ -0,0 +1,16 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +extern crate foo; +extern crate bar; + +fn main() { + bar::doit(); +} diff --git a/src/test/run-make/lto-smoke-c/Makefile b/src/test/run-make/lto-smoke-c/Makefile index 6a703927736..de8588bac9b 100644 --- a/src/test/run-make/lto-smoke-c/Makefile +++ b/src/test/run-make/lto-smoke-c/Makefile @@ -1,8 +1,16 @@ -include ../tools.mk -ifneq ($(shell uname),Darwin) +ifeq ($(shell uname),Darwin) +else +ifeq ($(shell uname),FreeBSD) + EXTRAFLAGS := -lm -lpthread -lgcc_s +else EXTRAFLAGS := -lm -lrt -ldl -lpthread endif +endif + +# Apparently older versions of GCC segfault if -g is passed... +CC := $(CC:-g=) all: $(RUSTC) foo.rs -Z lto diff --git a/src/test/run-make/lto-smoke-c/foo.rs b/src/test/run-make/lto-smoke-c/foo.rs index 4cb7a749385..1bb19016700 100644 --- a/src/test/run-make/lto-smoke-c/foo.rs +++ b/src/test/run-make/lto-smoke-c/foo.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[crate_type = "staticlib"]; +#![crate_type = "staticlib"] #[no_mangle] pub extern "C" fn foo() {} diff --git a/src/test/run-make/pretty-print-to-file/Makefile b/src/test/run-make/pretty-print-to-file/Makefile new file mode 100644 index 00000000000..1c1242ada8a --- /dev/null +++ b/src/test/run-make/pretty-print-to-file/Makefile @@ -0,0 +1,5 @@ +-include ../tools.mk + +all: + $(RUSTC) -o $(TMPDIR)/input.out --pretty=normal input.rs + diff -u $(TMPDIR)/input.out input.pp diff --git a/src/test/run-make/pretty-print-to-file/input.pp b/src/test/run-make/pretty-print-to-file/input.pp new file mode 100644 index 00000000000..a6dd6b6778e --- /dev/null +++ b/src/test/run-make/pretty-print-to-file/input.pp @@ -0,0 +1,13 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + + +#[crate_type = "lib"] +pub fn foo() -> i32 { 45 } diff --git a/src/test/run-make/pretty-print-to-file/input.rs b/src/test/run-make/pretty-print-to-file/input.rs new file mode 100644 index 00000000000..8e3ec363187 --- /dev/null +++ b/src/test/run-make/pretty-print-to-file/input.rs @@ -0,0 +1,15 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#[crate_type="lib"] + +pub fn +foo() -> i32 +{ 45 } diff --git a/src/test/run-make/relocation-model/Makefile b/src/test/run-make/relocation-model/Makefile new file mode 100644 index 00000000000..2fcdd32bfcb --- /dev/null +++ b/src/test/run-make/relocation-model/Makefile @@ -0,0 +1,15 @@ +-include ../tools.mk + +all: + $(RUSTC) -C relocation-model=dynamic-no-pic foo.rs + $(call RUN,foo) + + $(RUSTC) -C relocation-model=default foo.rs + $(call RUN,foo) + + $(RUSTC) -C relocation-model=static foo.rs + $(call RUN,foo) + + $(RUSTC) -C relocation-model=default --crate-type=dylib foo.rs + $(RUSTC) -C relocation-model=static --crate-type=dylib foo.rs + $(RUSTC) -C relocation-model=dynamic-no-pic --crate-type=dylib foo.rs diff --git a/src/test/run-make/relocation-model/foo.rs b/src/test/run-make/relocation-model/foo.rs new file mode 100644 index 00000000000..e06d81cd60b --- /dev/null +++ b/src/test/run-make/relocation-model/foo.rs @@ -0,0 +1,11 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +pub fn main() {} diff --git a/src/test/run-make/unicode-input/multiple_files.rs b/src/test/run-make/unicode-input/multiple_files.rs index 45bb29f617f..66ddbac0513 100644 --- a/src/test/run-make/unicode-input/multiple_files.rs +++ b/src/test/run-make/unicode-input/multiple_files.rs @@ -58,7 +58,7 @@ fn main() { // rustc is passed to us with --out-dir and -L etc., so we // can't exec it directly let result = Process::output("sh", [~"-c", rustc + " " + main_file_str]).unwrap(); - let err = str::from_utf8_lossy(result.error); + let err = str::from_utf8_lossy(result.error.as_slice()); // positive test so that this test will be updated when the // compiler changes. diff --git a/src/test/run-make/unicode-input/span_length.rs b/src/test/run-make/unicode-input/span_length.rs index 1ae6838be5b..faa22962290 100644 --- a/src/test/run-make/unicode-input/span_length.rs +++ b/src/test/run-make/unicode-input/span_length.rs @@ -55,7 +55,7 @@ fn main() { // can't exec it directly let result = Process::output("sh", [~"-c", rustc + " " + main_file_str]).unwrap(); - let err = str::from_utf8_lossy(result.error); + let err = str::from_utf8_lossy(result.error.as_slice()); // the span should end the line (e.g no extra ~'s) let expected_span = "^" + "~".repeat(n - 1) + "\n"; diff --git a/src/test/run-pass-fulldeps/macro-crate-outlive-expansion-phase.rs b/src/test/run-pass-fulldeps/macro-crate-outlive-expansion-phase.rs index cde78da3f61..f61cddace82 100644 --- a/src/test/run-pass-fulldeps/macro-crate-outlive-expansion-phase.rs +++ b/src/test/run-pass-fulldeps/macro-crate-outlive-expansion-phase.rs @@ -10,7 +10,6 @@ // aux-build:macro_crate_outlive_expansion_phase.rs // ignore-stage1 -// ignore-fast // ignore-android // ignore-cross-compile #12102 diff --git a/src/test/run-pass-fulldeps/macro-crate.rs b/src/test/run-pass-fulldeps/macro-crate.rs index e30498bb3c1..24d416a416c 100644 --- a/src/test/run-pass-fulldeps/macro-crate.rs +++ b/src/test/run-pass-fulldeps/macro-crate.rs @@ -10,7 +10,6 @@ // aux-build:macro_crate_test.rs // ignore-stage1 -// ignore-fast // ignore-android // ignore-cross-compile #12102 diff --git a/src/test/run-pass-fulldeps/phase-syntax-link-does-resolve.rs b/src/test/run-pass-fulldeps/phase-syntax-link-does-resolve.rs index ff82ff62a59..1700ceaec4f 100644 --- a/src/test/run-pass-fulldeps/phase-syntax-link-does-resolve.rs +++ b/src/test/run-pass-fulldeps/phase-syntax-link-does-resolve.rs @@ -10,7 +10,6 @@ // aux-build:macro_crate_test.rs // ignore-stage1 -// ignore-fast // ignore-android // force-host @@ -19,7 +18,6 @@ // This implies that both versions are the host architecture, meaning this test // must also be compiled with the host arch. // -// Hence, ignore-stage1 because macros are unstable around there, ignore-fast // because this doesn't work with that test runner, ignore-android because it // can't run host binaries, and force-host to make this test build as the host // arch. diff --git a/src/test/run-pass-fulldeps/quote-unused-sp-no-warning.rs b/src/test/run-pass-fulldeps/quote-unused-sp-no-warning.rs index ea2ffb8dcf8..e2b3781fbf9 100644 --- a/src/test/run-pass-fulldeps/quote-unused-sp-no-warning.rs +++ b/src/test/run-pass-fulldeps/quote-unused-sp-no-warning.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // ignore-android #![feature(quote)] #[deny(unused_variable)]; diff --git a/src/test/run-pass-fulldeps/syntax-extension-fourcc.rs b/src/test/run-pass-fulldeps/syntax-extension-fourcc.rs index 54687c03da5..53ea4fbe0c3 100644 --- a/src/test/run-pass-fulldeps/syntax-extension-fourcc.rs +++ b/src/test/run-pass-fulldeps/syntax-extension-fourcc.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast Feature gating doesn't work // ignore-stage1 // ignore-pretty // ignore-cross-compile diff --git a/src/test/run-pass-fulldeps/syntax-extension-hexfloat.rs b/src/test/run-pass-fulldeps/syntax-extension-hexfloat.rs index eb25d82e549..5eb6a30c015 100644 --- a/src/test/run-pass-fulldeps/syntax-extension-hexfloat.rs +++ b/src/test/run-pass-fulldeps/syntax-extension-hexfloat.rs @@ -11,7 +11,6 @@ // ignore-stage1 // ignore-pretty // ignore-cross-compile #12102 -// ignore-fast #![feature(phase)] #[phase(syntax)] diff --git a/src/test/run-pass/anon-extern-mod-cross-crate-2.rs b/src/test/run-pass/anon-extern-mod-cross-crate-2.rs index 8cadf4825f6..fd600907ddb 100644 --- a/src/test/run-pass/anon-extern-mod-cross-crate-2.rs +++ b/src/test/run-pass/anon-extern-mod-cross-crate-2.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // ignore-pretty // aux-build:anon-extern-mod-cross-crate-1.rs extern crate anonexternmod; diff --git a/src/test/run-pass/anon-extern-mod.rs b/src/test/run-pass/anon-extern-mod.rs index 7e05bcc1fd2..9ee1b85d856 100644 --- a/src/test/run-pass/anon-extern-mod.rs +++ b/src/test/run-pass/anon-extern-mod.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::libc; +extern crate libc; #[link(name = "rustrt")] extern { diff --git a/src/test/run-pass/anon_trait_static_method_exe.rs b/src/test/run-pass/anon_trait_static_method_exe.rs index c66a8a9d2ca..f420460a412 100644 --- a/src/test/run-pass/anon_trait_static_method_exe.rs +++ b/src/test/run-pass/anon_trait_static_method_exe.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast - check-fast doesn't understand aux-build // aux-build:anon_trait_static_method_lib.rs extern crate anon_trait_static_method_lib; diff --git a/src/test/run-pass/argument-passing.rs b/src/test/run-pass/argument-passing.rs index e6f2edd6d59..75e197923c6 100644 --- a/src/test/run-pass/argument-passing.rs +++ b/src/test/run-pass/argument-passing.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast struct X { x: int diff --git a/src/test/run-pass/asm-concat-src.rs b/src/test/run-pass/asm-concat-src.rs index 5615089dcdc..9df96b35ce1 100644 --- a/src/test/run-pass/asm-concat-src.rs +++ b/src/test/run-pass/asm-concat-src.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast #[feature] doesn't work with check-fast #![feature(asm)] pub fn main() { diff --git a/src/test/run-pass/asm-in-out-operand.rs b/src/test/run-pass/asm-in-out-operand.rs index 0b5502aa330..8a921129f92 100644 --- a/src/test/run-pass/asm-in-out-operand.rs +++ b/src/test/run-pass/asm-in-out-operand.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast #[feature] doesn't work with check-fast #![feature(asm)] #[cfg(target_arch = "x86")] diff --git a/src/test/run-pass/asm-out-assign.rs b/src/test/run-pass/asm-out-assign.rs index de2630d1ca9..ebbfbf925f9 100644 --- a/src/test/run-pass/asm-out-assign.rs +++ b/src/test/run-pass/asm-out-assign.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast #[feature] doesn't work with check-fast #![feature(asm)] #[cfg(target_arch = "x86")] diff --git a/src/test/run-pass/attr-main-2.rs b/src/test/run-pass/attr-main-2.rs index 2227bbca352..8ae2c1600aa 100644 --- a/src/test/run-pass/attr-main-2.rs +++ b/src/test/run-pass/attr-main-2.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast pub fn main() { fail!() diff --git a/src/test/run-pass/attr-main.rs b/src/test/run-pass/attr-main.rs index 796e198fd0d..cf8940b4d5b 100644 --- a/src/test/run-pass/attr-main.rs +++ b/src/test/run-pass/attr-main.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast #[main] fn foo() { diff --git a/src/test/run-pass/attr-shebang.rs b/src/test/run-pass/attr-shebang.rs index f4919f768b9..95f3ea61dd8 100644 --- a/src/test/run-pass/attr-shebang.rs +++ b/src/test/run-pass/attr-shebang.rs @@ -2,4 +2,3 @@ #![feature(bogus)] pub fn main() { } // ignore-license -// ignore-fast diff --git a/src/test/run-pass/attr-start.rs b/src/test/run-pass/attr-start.rs index fa0632933ff..35a0da4dcf3 100644 --- a/src/test/run-pass/attr-start.rs +++ b/src/test/run-pass/attr-start.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -//ignore-fast #[start] fn start(_argc: int, _argv: **u8) -> int { diff --git a/src/test/run-pass/attr.rs b/src/test/run-pass/attr.rs index 6a19a44e074..2f30eb8154f 100644 --- a/src/test/run-pass/attr.rs +++ b/src/test/run-pass/attr.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast - #[main] fn foo() { } diff --git a/src/test/run-pass/auto-encode.rs b/src/test/run-pass/auto-encode.rs index e7ee6117992..a51439dceb8 100644 --- a/src/test/run-pass/auto-encode.rs +++ b/src/test/run-pass/auto-encode.rs @@ -9,7 +9,6 @@ // except according to those terms. // ignore-test FIXME(#5121) -// ignore-fast #[feature(managed_boxes)]; diff --git a/src/test/run-pass/backtrace.rs b/src/test/run-pass/backtrace.rs index edf0e195cb3..1ba37217ea2 100644 --- a/src/test/run-pass/backtrace.rs +++ b/src/test/run-pass/backtrace.rs @@ -9,7 +9,6 @@ // except according to those terms. // ignore-win32 FIXME #13259 -// ignore-fast this is executing itself #![no_uv] extern crate native; @@ -53,7 +52,7 @@ fn runtest(me: &str) { }).unwrap(); let out = p.wait_with_output(); assert!(!out.status.success()); - let s = str::from_utf8(out.error).unwrap(); + let s = str::from_utf8(out.error.as_slice()).unwrap(); assert!(s.contains("stack backtrace") && s.contains("foo::h"), "bad output: {}", s); @@ -65,7 +64,7 @@ fn runtest(me: &str) { }).unwrap(); let out = p.wait_with_output(); assert!(!out.status.success()); - let s = str::from_utf8(out.error).unwrap(); + let s = str::from_utf8(out.error.as_slice()).unwrap(); assert!(!s.contains("stack backtrace") && !s.contains("foo::h"), "bad output2: {}", s); @@ -77,7 +76,7 @@ fn runtest(me: &str) { }).unwrap(); let out = p.wait_with_output(); assert!(!out.status.success()); - let s = str::from_utf8(out.error).unwrap(); + let s = str::from_utf8(out.error.as_slice()).unwrap(); assert!(s.contains("stack backtrace") && s.contains("double::h"), "bad output3: {}", s); @@ -90,7 +89,7 @@ fn runtest(me: &str) { }).unwrap(); let out = p.wait_with_output(); assert!(!out.status.success()); - let s = str::from_utf8(out.error).unwrap(); + let s = str::from_utf8(out.error.as_slice()).unwrap(); let mut i = 0; for _ in range(0, 2) { i += s.slice_from(i + 10).find_str("stack backtrace").unwrap() + 10; diff --git a/src/test/run-pass/bind-by-move.rs b/src/test/run-pass/bind-by-move.rs index e8cbd037434..d82393b8b7f 100644 --- a/src/test/run-pass/bind-by-move.rs +++ b/src/test/run-pass/bind-by-move.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast extern crate sync; + use sync::Arc; fn dispose(_x: Arc<bool>) { } diff --git a/src/test/run-pass/bitv-perf-test.rs b/src/test/run-pass/bitv-perf-test.rs index 20b3ca0b3ba..658c888b8d8 100644 --- a/src/test/run-pass/bitv-perf-test.rs +++ b/src/test/run-pass/bitv-perf-test.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at diff --git a/src/test/run-pass/block-iter-1.rs b/src/test/run-pass/block-iter-1.rs index 5bfbc447159..6ffb032090c 100644 --- a/src/test/run-pass/block-iter-1.rs +++ b/src/test/run-pass/block-iter-1.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast fn iter_vec<T>(v: Vec<T> , f: |&T|) { for x in v.iter() { f(x); } } diff --git a/src/test/run-pass/block-iter-2.rs b/src/test/run-pass/block-iter-2.rs index aa77014dc7d..5f4154290ac 100644 --- a/src/test/run-pass/block-iter-2.rs +++ b/src/test/run-pass/block-iter-2.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast fn iter_vec<T>(v: Vec<T> , f: |&T|) { for x in v.iter() { f(x); } } diff --git a/src/test/run-pass/builtin-superkinds-capabilities-xc.rs b/src/test/run-pass/builtin-superkinds-capabilities-xc.rs index 8c41e4f57c4..f52993f8559 100644 --- a/src/test/run-pass/builtin-superkinds-capabilities-xc.rs +++ b/src/test/run-pass/builtin-superkinds-capabilities-xc.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:trait_superkinds_in_metadata.rs diff --git a/src/test/run-pass/builtin-superkinds-in-metadata.rs b/src/test/run-pass/builtin-superkinds-in-metadata.rs index 5261ea9d1e1..ba57f095e1a 100644 --- a/src/test/run-pass/builtin-superkinds-in-metadata.rs +++ b/src/test/run-pass/builtin-superkinds-in-metadata.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:trait_superkinds_in_metadata.rs diff --git a/src/test/run-pass/c-stack-as-value.rs b/src/test/run-pass/c-stack-as-value.rs index d590c35d9e2..89cbbc24475 100644 --- a/src/test/run-pass/c-stack-as-value.rs +++ b/src/test/run-pass/c-stack-as-value.rs @@ -9,7 +9,7 @@ // except according to those terms. mod rustrt { - use std::libc; + extern crate libc; #[link(name = "rustrt")] extern { diff --git a/src/test/run-pass/c-stack-returning-int64.rs b/src/test/run-pass/c-stack-returning-int64.rs index 9a02768faeb..c02a24c3f08 100644 --- a/src/test/run-pass/c-stack-returning-int64.rs +++ b/src/test/run-pass/c-stack-returning-int64.rs @@ -8,8 +8,12 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -mod libc { - use std::libc::{c_char, c_long, c_longlong}; +// ignore-fast doesn't like extern crate + +extern crate libc; + +mod mlibc { + use libc::{c_char, c_long, c_longlong}; extern { pub fn atol(x: *c_char) -> c_long; @@ -18,11 +22,11 @@ mod libc { } fn atol(s: ~str) -> int { - s.with_c_str(|x| unsafe { libc::atol(x) as int }) + s.with_c_str(|x| unsafe { mlibc::atol(x) as int }) } fn atoll(s: ~str) -> i64 { - s.with_c_str(|x| unsafe { libc::atoll(x) as i64 }) + s.with_c_str(|x| unsafe { mlibc::atoll(x) as i64 }) } pub fn main() { diff --git a/src/test/run-pass/capturing-logging.rs b/src/test/run-pass/capturing-logging.rs index 10976c5c612..bd4da3625db 100644 --- a/src/test/run-pass/capturing-logging.rs +++ b/src/test/run-pass/capturing-logging.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // ignore-android (FIXME #11419) // exec-env:RUST_LOG=info diff --git a/src/test/run-pass/cci_borrow.rs b/src/test/run-pass/cci_borrow.rs index b276c8a8b07..bfc08502625 100644 --- a/src/test/run-pass/cci_borrow.rs +++ b/src/test/run-pass/cci_borrow.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast - check-fast doesn't understand aux-build // aux-build:cci_borrow_lib.rs #[feature(managed_boxes)]; diff --git a/src/test/run-pass/cci_capture_clause.rs b/src/test/run-pass/cci_capture_clause.rs index fa96f65243e..c4bf8131506 100644 --- a/src/test/run-pass/cci_capture_clause.rs +++ b/src/test/run-pass/cci_capture_clause.rs @@ -9,7 +9,6 @@ // except according to those terms. // aux-build:cci_capture_clause.rs -// ignore-fast // This test makes sure we can do cross-crate inlining on functions // that use capture clauses. diff --git a/src/test/run-pass/cci_impl_exe.rs b/src/test/run-pass/cci_impl_exe.rs index ee01849e7e7..8a291febb6d 100644 --- a/src/test/run-pass/cci_impl_exe.rs +++ b/src/test/run-pass/cci_impl_exe.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast - check-fast doesn't understand aux-build // aux-build:cci_impl_lib.rs extern crate cci_impl_lib; diff --git a/src/test/run-pass/cci_iter_exe.rs b/src/test/run-pass/cci_iter_exe.rs index 4a5770b3c6c..0519ba6662b 100644 --- a/src/test/run-pass/cci_iter_exe.rs +++ b/src/test/run-pass/cci_iter_exe.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast - check-fast doesn't understand aux-build // aux-build:cci_iter_lib.rs extern crate cci_iter_lib; diff --git a/src/test/run-pass/cci_nested_exe.rs b/src/test/run-pass/cci_nested_exe.rs index 3810f7919ac..27ef4a19a53 100644 --- a/src/test/run-pass/cci_nested_exe.rs +++ b/src/test/run-pass/cci_nested_exe.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast - check-fast doesn't understand aux-build // aux-build:cci_nested_lib.rs #[feature(globs, managed_boxes)]; diff --git a/src/test/run-pass/cci_no_inline_exe.rs b/src/test/run-pass/cci_no_inline_exe.rs index 64da1feb34c..2f02fc9acb9 100644 --- a/src/test/run-pass/cci_no_inline_exe.rs +++ b/src/test/run-pass/cci_no_inline_exe.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast - check-fast doesn't understand aux-build // aux-build:cci_no_inline_lib.rs extern crate cci_no_inline_lib; diff --git a/src/test/run-pass/cfg-macros-foo.rs b/src/test/run-pass/cfg-macros-foo.rs index 6b447b88711..9eb44d510a9 100644 --- a/src/test/run-pass/cfg-macros-foo.rs +++ b/src/test/run-pass/cfg-macros-foo.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast compile-flags directive doesn't work for check-fast // compile-flags: --cfg foo // check that cfg correctly chooses between the macro impls (see also diff --git a/src/test/run-pass/cfg-macros-notfoo.rs b/src/test/run-pass/cfg-macros-notfoo.rs index da62eaffc41..3084e087bd2 100644 --- a/src/test/run-pass/cfg-macros-notfoo.rs +++ b/src/test/run-pass/cfg-macros-notfoo.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast compile-flags directive doesn't work for check-fast // compile-flags: // check that cfg correctly chooses between the macro impls (see also diff --git a/src/test/run-pass/cfg_inner_static.rs b/src/test/run-pass/cfg_inner_static.rs index 08951dfd50e..04912fc2003 100644 --- a/src/test/run-pass/cfg_inner_static.rs +++ b/src/test/run-pass/cfg_inner_static.rs @@ -9,7 +9,6 @@ // except according to those terms. // aux-build:cfg_inner_static.rs -// ignore-fast extern crate cfg_inner_static; diff --git a/src/test/run-pass/cfgs-on-items.rs b/src/test/run-pass/cfgs-on-items.rs index f1c91dbaf35..205dce64b78 100644 --- a/src/test/run-pass/cfgs-on-items.rs +++ b/src/test/run-pass/cfgs-on-items.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // compile-flags: --cfg fooA --cfg fooB // fooA AND !bar diff --git a/src/test/run-pass/class-cast-to-trait-cross-crate-2.rs b/src/test/run-pass/class-cast-to-trait-cross-crate-2.rs index a9a11361f9b..f6a6808c9e7 100644 --- a/src/test/run-pass/class-cast-to-trait-cross-crate-2.rs +++ b/src/test/run-pass/class-cast-to-trait-cross-crate-2.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:cci_class_cast.rs extern crate cci_class_cast; use std::to_str::ToStr; diff --git a/src/test/run-pass/class-cast-to-trait.rs b/src/test/run-pass/class-cast-to-trait.rs index b57851ea3cf..6750e43525f 100644 --- a/src/test/run-pass/class-cast-to-trait.rs +++ b/src/test/run-pass/class-cast-to-trait.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-freebsd FIXME fails on BSD + #[feature(managed_boxes)]; trait noisy { diff --git a/src/test/run-pass/class-exports.rs b/src/test/run-pass/class-exports.rs index 016b38826e5..62b2824b974 100644 --- a/src/test/run-pass/class-exports.rs +++ b/src/test/run-pass/class-exports.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at diff --git a/src/test/run-pass/class-impl-very-parameterized-trait.rs b/src/test/run-pass/class-impl-very-parameterized-trait.rs index e70341612df..bbdc7997aba 100644 --- a/src/test/run-pass/class-impl-very-parameterized-trait.rs +++ b/src/test/run-pass/class-impl-very-parameterized-trait.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast use std::cmp; diff --git a/src/test/run-pass/class-implement-trait-cross-crate.rs b/src/test/run-pass/class-implement-trait-cross-crate.rs index 1b4a9fbd099..fa78b7c3e98 100644 --- a/src/test/run-pass/class-implement-trait-cross-crate.rs +++ b/src/test/run-pass/class-implement-trait-cross-crate.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:cci_class_trait.rs extern crate cci_class_trait; use cci_class_trait::animals::noisy; diff --git a/src/test/run-pass/class-implement-traits.rs b/src/test/run-pass/class-implement-traits.rs index d967310b907..9fbdaa8c019 100644 --- a/src/test/run-pass/class-implement-traits.rs +++ b/src/test/run-pass/class-implement-traits.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast trait noisy { fn speak(&mut self); diff --git a/src/test/run-pass/class-method-cross-crate.rs b/src/test/run-pass/class-method-cross-crate.rs index 8ee367d281f..e05ed750b5d 100644 --- a/src/test/run-pass/class-method-cross-crate.rs +++ b/src/test/run-pass/class-method-cross-crate.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:cci_class_2.rs extern crate cci_class_2; use cci_class_2::kitties::cat; diff --git a/src/test/run-pass/class-methods-cross-crate.rs b/src/test/run-pass/class-methods-cross-crate.rs index ca3b491844f..4ff28700777 100644 --- a/src/test/run-pass/class-methods-cross-crate.rs +++ b/src/test/run-pass/class-methods-cross-crate.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:cci_class_3.rs extern crate cci_class_3; use cci_class_3::kitties::cat; diff --git a/src/test/run-pass/class-poly-methods-cross-crate.rs b/src/test/run-pass/class-poly-methods-cross-crate.rs index f8177bb0ada..ea3becb7060 100644 --- a/src/test/run-pass/class-poly-methods-cross-crate.rs +++ b/src/test/run-pass/class-poly-methods-cross-crate.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:cci_class_6.rs extern crate cci_class_6; use cci_class_6::kitties::cat; diff --git a/src/test/run-pass/class-separate-impl.rs b/src/test/run-pass/class-separate-impl.rs index a93f7c9d73b..637cdc63848 100644 --- a/src/test/run-pass/class-separate-impl.rs +++ b/src/test/run-pass/class-separate-impl.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast - use std::fmt; struct cat { diff --git a/src/test/run-pass/classes-cross-crate.rs b/src/test/run-pass/classes-cross-crate.rs index 2e1d19b9dda..c6b4af77f9f 100644 --- a/src/test/run-pass/classes-cross-crate.rs +++ b/src/test/run-pass/classes-cross-crate.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:cci_class_4.rs extern crate cci_class_4; use cci_class_4::kitties::cat; diff --git a/src/test/run-pass/classes-simple-cross-crate.rs b/src/test/run-pass/classes-simple-cross-crate.rs index 6d816e725b9..f6f742fb1df 100644 --- a/src/test/run-pass/classes-simple-cross-crate.rs +++ b/src/test/run-pass/classes-simple-cross-crate.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:cci_class.rs extern crate cci_class; use cci_class::kitties::cat; diff --git a/src/test/run-pass/clone-with-exterior.rs b/src/test/run-pass/clone-with-exterior.rs index 4f3db3a5f77..038c0418ecb 100644 --- a/src/test/run-pass/clone-with-exterior.rs +++ b/src/test/run-pass/clone-with-exterior.rs @@ -18,7 +18,7 @@ struct Pair { pub fn main() { let z = ~Pair { a : 10, b : 12}; - let f: proc:Send() = proc() { + let f: proc():Send = proc() { assert_eq!(z.a, 10); assert_eq!(z.b, 12); }; diff --git a/src/test/run-pass/closure-inference.rs b/src/test/run-pass/closure-inference.rs index 4b74ed3d4a7..410b7416546 100644 --- a/src/test/run-pass/closure-inference.rs +++ b/src/test/run-pass/closure-inference.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast fn foo(i: int) -> int { i + 1 } diff --git a/src/test/run-pass/closure-syntax.rs b/src/test/run-pass/closure-syntax.rs new file mode 100644 index 00000000000..983cd00f39c --- /dev/null +++ b/src/test/run-pass/closure-syntax.rs @@ -0,0 +1,76 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// ignore-pretty #13324 + +#![allow(dead_code)] + +fn foo<T>() {} + +trait Bar1 {} +impl Bar1 for proc() {} + +trait Bar2 {} +impl Bar2 for proc(): Send {} + +trait Bar3 {} +impl<'b> Bar3 for <'a>|&'a int|: 'b + Send -> &'a int {} + +trait Bar4 {} +impl Bar4 for proc<'a>(&'a int) -> &'a int {} + +struct Foo<'a> { + a: ||: 'a, + b: ||: 'static, + c: <'b>||: 'a, + d: ||: 'a + Share, + e: <'b>|int|: 'a + Share -> &'b f32, + f: proc(), + g: proc(): 'static + Share, + h: proc<'b>(int): Share -> &'b f32, +} + +fn f<'a>(a: &'a int, f: <'b>|&'b int| -> &'b int) -> &'a int { + f(a) +} + +fn g<'a>(a: &'a int, f: proc<'b>(&'b int) -> &'b int) -> &'a int { + f(a) +} + +fn bar<'b>() { + foo::<||>(); + foo::<|| -> ()>(); + foo::<||:>(); + foo::<||:'b>(); + foo::<||:'b + Share>(); + foo::<||:Share>(); + foo::< <'a>|int, f32, &'a int|:'b + Share -> &'a int>(); + foo::<proc()>(); + foo::<proc() -> ()>(); + foo::<proc():>(); + foo::<proc():'static>(); + foo::<proc():Share>(); + foo::<proc<'a>(int, f32, &'a int):'static + Share -> &'a int>(); + + // issue #11209 + let _: ||: 'b; // for comparison + let _: <'a> ||; + + let _: Option<||:'b>; + // let _: Option<<'a>||>; + let _: Option< <'a>||>; + + // issue #11210 + let _: ||: 'static; +} + +pub fn main() { +} diff --git a/src/test/run-pass/conditional-compile.rs b/src/test/run-pass/conditional-compile.rs index ba1011de081..ebb495de88b 100644 --- a/src/test/run-pass/conditional-compile.rs +++ b/src/test/run-pass/conditional-compile.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at diff --git a/src/test/run-pass/conditional-debug-macro-off.rs b/src/test/run-pass/conditional-debug-macro-off.rs index 460846ef31c..944141839cf 100644 --- a/src/test/run-pass/conditional-debug-macro-off.rs +++ b/src/test/run-pass/conditional-debug-macro-off.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast exec-env directive doesn't work for check-fast // compile-flags: --cfg ndebug // exec-env:RUST_LOG=conditional-debug-macro-off=4 diff --git a/src/test/run-pass/conditional-debug-macro-on.rs b/src/test/run-pass/conditional-debug-macro-on.rs index 324f1aade04..732c50afbf3 100644 --- a/src/test/run-pass/conditional-debug-macro-on.rs +++ b/src/test/run-pass/conditional-debug-macro-on.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast compile-flags directive doesn't work for check-fast // exec-env:RUST_LOG=conditional-debug-macro-on=4 pub fn main() { diff --git a/src/test/run-pass/const-cast.rs b/src/test/run-pass/const-cast.rs index d511930c70f..7b17b578b82 100644 --- a/src/test/run-pass/const-cast.rs +++ b/src/test/run-pass/const-cast.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::libc; +extern crate libc; extern fn foo() {} diff --git a/src/test/run-pass/const-cross-crate-const.rs b/src/test/run-pass/const-cross-crate-const.rs index c8dc98baac6..bcf58431d0d 100644 --- a/src/test/run-pass/const-cross-crate-const.rs +++ b/src/test/run-pass/const-cross-crate-const.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:cci_const.rs extern crate cci_const; diff --git a/src/test/run-pass/const-cross-crate-extern.rs b/src/test/run-pass/const-cross-crate-extern.rs index f5f6b599dc9..a299c74aa5b 100644 --- a/src/test/run-pass/const-cross-crate-extern.rs +++ b/src/test/run-pass/const-cross-crate-extern.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:cci_const.rs extern crate cci_const; diff --git a/src/test/run-pass/const-fn-val.rs b/src/test/run-pass/const-fn-val.rs index 18638ab6877..57e37aaf393 100644 --- a/src/test/run-pass/const-fn-val.rs +++ b/src/test/run-pass/const-fn-val.rs @@ -12,7 +12,7 @@ fn foo() -> int { return 0xca7f000d; } -struct Bar<'a> { f: 'a || -> int } +struct Bar<'a> { f: ||: 'a -> int } static mut b : Bar<'static> = Bar { f: foo }; diff --git a/src/test/run-pass/const-vec-of-fns.rs b/src/test/run-pass/const-vec-of-fns.rs index 9a93fcb5f89..1f5c1a556a9 100644 --- a/src/test/run-pass/const-vec-of-fns.rs +++ b/src/test/run-pass/const-vec-of-fns.rs @@ -17,7 +17,7 @@ fn f() { } static bare_fns: &'static [fn()] = &[f, f]; -struct S<'a>('a ||); +struct S<'a>(||:'a); static mut closures: &'static [S<'static>] = &[S(f), S(f)]; pub fn main() { diff --git a/src/test/run-pass/core-run-destroy.rs b/src/test/run-pass/core-run-destroy.rs index 83232b40873..c808534257a 100644 --- a/src/test/run-pass/core-run-destroy.rs +++ b/src/test/run-pass/core-run-destroy.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // ignore-pretty // compile-flags:--test @@ -17,6 +16,7 @@ // instead of in std. #[feature(macro_rules)]; +extern crate libc; extern crate native; extern crate green; @@ -34,7 +34,7 @@ macro_rules! iotest ( #[allow(unused_imports)]; use std::io::timer; - use std::libc; + use libc; use std::str; use std::io::process::{Process, ProcessOutput}; use native; @@ -87,7 +87,7 @@ iotest!(fn test_destroy_twice() { pub fn test_destroy_actually_kills(force: bool) { use std::io::process::{Process, ProcessOutput, ExitStatus, ExitSignal}; use std::io::timer; - use std::libc; + use libc; use std::str; #[cfg(unix,not(target_os="android"))] diff --git a/src/test/run-pass/crate-method-reexport-grrrrrrr.rs b/src/test/run-pass/crate-method-reexport-grrrrrrr.rs index 1b563d33433..e55508b4c15 100644 --- a/src/test/run-pass/crate-method-reexport-grrrrrrr.rs +++ b/src/test/run-pass/crate-method-reexport-grrrrrrr.rs @@ -14,7 +14,6 @@ // name_pool::methods impl in the other crate is reachable from this // crate. -// ignore-fast // aux-build:crate-method-reexport-grrrrrrr2.rs extern crate crate_method_reexport_grrrrrrr2; diff --git a/src/test/run-pass/crateresolve1.rs b/src/test/run-pass/crateresolve1.rs index bf13e66690c..61e269bf9e3 100644 --- a/src/test/run-pass/crateresolve1.rs +++ b/src/test/run-pass/crateresolve1.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:crateresolve1-1.rs // aux-build:crateresolve1-2.rs // aux-build:crateresolve1-3.rs diff --git a/src/test/run-pass/crateresolve2.rs b/src/test/run-pass/crateresolve2.rs index 1419d68ad68..5ed1f37c7b9 100644 --- a/src/test/run-pass/crateresolve2.rs +++ b/src/test/run-pass/crateresolve2.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:crateresolve2-1.rs // aux-build:crateresolve2-2.rs // aux-build:crateresolve2-3.rs diff --git a/src/test/run-pass/crateresolve3.rs b/src/test/run-pass/crateresolve3.rs index fd83c8f515a..cee9e6991c4 100644 --- a/src/test/run-pass/crateresolve3.rs +++ b/src/test/run-pass/crateresolve3.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:crateresolve3-1.rs // aux-build:crateresolve3-2.rs diff --git a/src/test/run-pass/crateresolve4.rs b/src/test/run-pass/crateresolve4.rs index 3243c909e03..c6896152226 100644 --- a/src/test/run-pass/crateresolve4.rs +++ b/src/test/run-pass/crateresolve4.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:crateresolve4a-1.rs // aux-build:crateresolve4a-2.rs // aux-build:crateresolve4b-1.rs diff --git a/src/test/run-pass/crateresolve5.rs b/src/test/run-pass/crateresolve5.rs index ca690b9089b..3f74731090b 100644 --- a/src/test/run-pass/crateresolve5.rs +++ b/src/test/run-pass/crateresolve5.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:crateresolve5-1.rs // aux-build:crateresolve5-2.rs diff --git a/src/test/run-pass/crateresolve8.rs b/src/test/run-pass/crateresolve8.rs index 46ccb01f660..1ce8a8a7350 100644 --- a/src/test/run-pass/crateresolve8.rs +++ b/src/test/run-pass/crateresolve8.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:crateresolve8-1.rs #[crate_id="crateresolve8#0.1"]; diff --git a/src/test/run-pass/cross-crate-const-pat.rs b/src/test/run-pass/cross-crate-const-pat.rs index 9e3a43469f2..14be5773e84 100644 --- a/src/test/run-pass/cross-crate-const-pat.rs +++ b/src/test/run-pass/cross-crate-const-pat.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:cci_const.rs extern crate cci_const; diff --git a/src/test/run-pass/cross-crate-newtype-struct-pat.rs b/src/test/run-pass/cross-crate-newtype-struct-pat.rs index 8988ee52b16..c2083c8e705 100644 --- a/src/test/run-pass/cross-crate-newtype-struct-pat.rs +++ b/src/test/run-pass/cross-crate-newtype-struct-pat.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:newtype_struct_xc.rs extern crate newtype_struct_xc; diff --git a/src/test/run-pass/deep-vector.rs b/src/test/run-pass/deep-vector.rs index 6a05dafb17c..20785780d2c 100644 --- a/src/test/run-pass/deep-vector.rs +++ b/src/test/run-pass/deep-vector.rs @@ -9,7 +9,6 @@ // except according to those terms. // ignore-test -// ignore-fast // // Too big for our poor macro infrastructure. diff --git a/src/test/run-pass/deep-vector2.rs b/src/test/run-pass/deep-vector2.rs index 615e94c3f4e..27258ed578a 100644 --- a/src/test/run-pass/deep-vector2.rs +++ b/src/test/run-pass/deep-vector2.rs @@ -9,7 +9,6 @@ // except according to those terms. // ignore-test -// ignore-fast // // Too big for our poor macro infrastructure. diff --git a/src/test/run-pass/deriving-encodable-decodable.rs b/src/test/run-pass/deriving-encodable-decodable.rs index 75567efa470..2742696a74d 100644 --- a/src/test/run-pass/deriving-encodable-decodable.rs +++ b/src/test/run-pass/deriving-encodable-decodable.rs @@ -11,7 +11,6 @@ // This actually tests a lot more than just encodable/decodable, but it gets the // job done at least -// ignore-fast // ignore-test FIXME(#5121) #[feature(struct_variant, managed_boxes)]; diff --git a/src/test/run-pass/deriving-global.rs b/src/test/run-pass/deriving-global.rs index a174b2c7ab1..55e2615835a 100644 --- a/src/test/run-pass/deriving-global.rs +++ b/src/test/run-pass/deriving-global.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast #7103 `extern crate` does not work on check-fast // ignore-pretty - does not converge // Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT diff --git a/src/test/run-pass/deriving-hash.rs b/src/test/run-pass/deriving-hash.rs index 087b7ce56ab..59d3383faf3 100644 --- a/src/test/run-pass/deriving-hash.rs +++ b/src/test/run-pass/deriving-hash.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast use std::hash; use std::hash::Hash; diff --git a/src/test/run-pass/deriving-meta-empty-trait-list.rs b/src/test/run-pass/deriving-meta-empty-trait-list.rs index b091c1a7639..e851ff566d5 100644 --- a/src/test/run-pass/deriving-meta-empty-trait-list.rs +++ b/src/test/run-pass/deriving-meta-empty-trait-list.rs @@ -10,7 +10,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast #[deriving] //~ WARNING empty trait list in `deriving` struct Foo; diff --git a/src/test/run-pass/deriving-meta-multiple.rs b/src/test/run-pass/deriving-meta-multiple.rs index 069f50f89f4..1eb7631da04 100644 --- a/src/test/run-pass/deriving-meta-multiple.rs +++ b/src/test/run-pass/deriving-meta-multiple.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at diff --git a/src/test/run-pass/deriving-meta.rs b/src/test/run-pass/deriving-meta.rs index 069f50f89f4..1eb7631da04 100644 --- a/src/test/run-pass/deriving-meta.rs +++ b/src/test/run-pass/deriving-meta.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at diff --git a/src/test/run-pass/deriving-rand.rs b/src/test/run-pass/deriving-rand.rs index c43d8a26fd9..9b295a57915 100644 --- a/src/test/run-pass/deriving-rand.rs +++ b/src/test/run-pass/deriving-rand.rs @@ -1,4 +1,3 @@ -// ignore-fast #6330 // Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. @@ -9,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast #7103 `extern crate` does not work on check-fast #[feature(struct_variant)]; diff --git a/src/test/run-pass/deriving-via-extension-hash-enum.rs b/src/test/run-pass/deriving-via-extension-hash-enum.rs index fed10567a19..778767cfcc1 100644 --- a/src/test/run-pass/deriving-via-extension-hash-enum.rs +++ b/src/test/run-pass/deriving-via-extension-hash-enum.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at diff --git a/src/test/run-pass/deriving-via-extension-hash-struct.rs b/src/test/run-pass/deriving-via-extension-hash-struct.rs index 57c13a504d3..a281c5156b6 100644 --- a/src/test/run-pass/deriving-via-extension-hash-struct.rs +++ b/src/test/run-pass/deriving-via-extension-hash-struct.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at diff --git a/src/test/run-pass/deriving-via-extension-type-params.rs b/src/test/run-pass/deriving-via-extension-type-params.rs index 077d82ec6dc..42915d8119d 100644 --- a/src/test/run-pass/deriving-via-extension-type-params.rs +++ b/src/test/run-pass/deriving-via-extension-type-params.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at diff --git a/src/test/run-pass/duplicated-external-mods.rs b/src/test/run-pass/duplicated-external-mods.rs index b50fd7cbb34..65e2b178abf 100644 --- a/src/test/run-pass/duplicated-external-mods.rs +++ b/src/test/run-pass/duplicated-external-mods.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:anon-extern-mod-cross-crate-1.rs // aux-build:anon-extern-mod-cross-crate-1.rs extern crate anonexternmod; diff --git a/src/test/run-pass/empty-allocation-rvalue-non-null.rs b/src/test/run-pass/empty-allocation-rvalue-non-null.rs new file mode 100644 index 00000000000..a5fc8425cf6 --- /dev/null +++ b/src/test/run-pass/empty-allocation-rvalue-non-null.rs @@ -0,0 +1,13 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +pub fn main() { + let x = *~(); +} diff --git a/src/test/run-pass/evec-internal.rs b/src/test/run-pass/evec-internal.rs index eb00bf205cf..36b5f86aeda 100644 --- a/src/test/run-pass/evec-internal.rs +++ b/src/test/run-pass/evec-internal.rs @@ -9,7 +9,6 @@ // except according to those terms. // ignore-test -// ignore-fast // Doesn't work; needs a design decision. diff --git a/src/test/run-pass/exec-env.rs b/src/test/run-pass/exec-env.rs index 9b251d4be77..317dfe3f927 100644 --- a/src/test/run-pass/exec-env.rs +++ b/src/test/run-pass/exec-env.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast (exec-env not supported in fast mode) // exec-env:TEST_EXEC_ENV=22 use std::os; diff --git a/src/test/run-pass/explicit_self_xcrate_exe.rs b/src/test/run-pass/explicit_self_xcrate_exe.rs index ce805fcf737..789d8f4b06f 100644 --- a/src/test/run-pass/explicit_self_xcrate_exe.rs +++ b/src/test/run-pass/explicit_self_xcrate_exe.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:explicit_self_xcrate.rs extern crate explicit_self_xcrate; diff --git a/src/test/run-pass/export-glob-imports-target.rs b/src/test/run-pass/export-glob-imports-target.rs index e4f037e4563..b960a31bc0c 100644 --- a/src/test/run-pass/export-glob-imports-target.rs +++ b/src/test/run-pass/export-glob-imports-target.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at diff --git a/src/test/run-pass/export-multi.rs b/src/test/run-pass/export-multi.rs index a823123bc77..2e44bf5be5b 100644 --- a/src/test/run-pass/export-multi.rs +++ b/src/test/run-pass/export-multi.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at diff --git a/src/test/run-pass/export-non-interference3.rs b/src/test/run-pass/export-non-interference3.rs index a0d97383f0a..091c389840a 100644 --- a/src/test/run-pass/export-non-interference3.rs +++ b/src/test/run-pass/export-non-interference3.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at diff --git a/src/test/run-pass/expr-block-fn.rs b/src/test/run-pass/expr-block-fn.rs index 9ca41c56dc9..3a6cd61fa09 100644 --- a/src/test/run-pass/expr-block-fn.rs +++ b/src/test/run-pass/expr-block-fn.rs @@ -11,7 +11,7 @@ fn test_fn() { - type t = 'static || -> int; + type t = ||: 'static -> int; fn ten() -> int { return 10; } let rs: t = ten; assert!((rs() == 10)); diff --git a/src/test/run-pass/expr-block-generic-box1.rs b/src/test/run-pass/expr-block-generic-box1.rs index eaead09a2f7..513dbf2eba8 100644 --- a/src/test/run-pass/expr-block-generic-box1.rs +++ b/src/test/run-pass/expr-block-generic-box1.rs @@ -10,7 +10,7 @@ #[feature(managed_boxes)]; -type compare<T> = 'static |@T, @T| -> bool; +type compare<T> = |@T, @T|: 'static -> bool; fn test_generic<T>(expected: @T, eq: compare<T>) { let actual: @T = { expected }; diff --git a/src/test/run-pass/expr-block-generic-box2.rs b/src/test/run-pass/expr-block-generic-box2.rs index 9727f41d144..7a5df556400 100644 --- a/src/test/run-pass/expr-block-generic-box2.rs +++ b/src/test/run-pass/expr-block-generic-box2.rs @@ -10,9 +10,8 @@ #[feature(managed_boxes)]; -// ignore-fast -type compare<'a, T> = 'a |T, T| -> bool; +type compare<'a, T> = |T, T|: 'a -> bool; fn test_generic<T:Clone>(expected: T, eq: compare<T>) { let actual: T = { expected.clone() }; diff --git a/src/test/run-pass/expr-block-generic-unique1.rs b/src/test/run-pass/expr-block-generic-unique1.rs index b3fbd8c7658..95f3ff62d26 100644 --- a/src/test/run-pass/expr-block-generic-unique1.rs +++ b/src/test/run-pass/expr-block-generic-unique1.rs @@ -10,7 +10,7 @@ -type compare<'a, T> = 'a |~T, ~T| -> bool; +type compare<'a, T> = |~T, ~T|: 'a -> bool; fn test_generic<T:Clone>(expected: ~T, eq: compare<T>) { let actual: ~T = { expected.clone() }; diff --git a/src/test/run-pass/expr-block-generic-unique2.rs b/src/test/run-pass/expr-block-generic-unique2.rs index 787f50c1b03..f45312f9e09 100644 --- a/src/test/run-pass/expr-block-generic-unique2.rs +++ b/src/test/run-pass/expr-block-generic-unique2.rs @@ -8,9 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast -type compare<'a, T> = 'a |T, T| -> bool; +type compare<'a, T> = |T, T|: 'a -> bool; fn test_generic<T:Clone>(expected: T, eq: compare<T>) { let actual: T = { expected.clone() }; diff --git a/src/test/run-pass/expr-block-generic.rs b/src/test/run-pass/expr-block-generic.rs index 3a1a79aa38e..677914fd60e 100644 --- a/src/test/run-pass/expr-block-generic.rs +++ b/src/test/run-pass/expr-block-generic.rs @@ -9,10 +9,9 @@ // except according to those terms. -// ignore-fast // Tests for standalone blocks as expressions with dynamic type sizes -type compare<'a, T> = 'a |T, T| -> bool; +type compare<'a, T> = |T, T|: 'a -> bool; fn test_generic<T:Clone>(expected: T, eq: compare<T>) { let actual: T = { expected.clone() }; diff --git a/src/test/run-pass/expr-copy.rs b/src/test/run-pass/expr-copy.rs index d47ef3c7f90..4a45ce66058 100644 --- a/src/test/run-pass/expr-copy.rs +++ b/src/test/run-pass/expr-copy.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast fn f(arg: &mut A) { arg.a = 100; diff --git a/src/test/run-pass/expr-if-generic-box1.rs b/src/test/run-pass/expr-if-generic-box1.rs index cba01fbd8dd..78f42120ab7 100644 --- a/src/test/run-pass/expr-if-generic-box1.rs +++ b/src/test/run-pass/expr-if-generic-box1.rs @@ -10,7 +10,7 @@ #[feature(managed_boxes)]; -type compare<T> = 'static |@T, @T| -> bool; +type compare<T> = |@T, @T|: 'static -> bool; fn test_generic<T>(expected: @T, not_expected: @T, eq: compare<T>) { let actual: @T = if true { expected } else { not_expected }; diff --git a/src/test/run-pass/expr-if-generic-box2.rs b/src/test/run-pass/expr-if-generic-box2.rs index eba30fa9bca..ffbb4764464 100644 --- a/src/test/run-pass/expr-if-generic-box2.rs +++ b/src/test/run-pass/expr-if-generic-box2.rs @@ -10,9 +10,8 @@ #[feature(managed_boxes)]; -// ignore-fast -type compare<T> = 'static |T, T| -> bool; +type compare<T> = |T, T|: 'static -> bool; fn test_generic<T:Clone>(expected: T, not_expected: T, eq: compare<T>) { let actual: T = if true { expected.clone() } else { not_expected }; diff --git a/src/test/run-pass/expr-if-generic.rs b/src/test/run-pass/expr-if-generic.rs index 7e58d466b90..b7408440404 100644 --- a/src/test/run-pass/expr-if-generic.rs +++ b/src/test/run-pass/expr-if-generic.rs @@ -8,10 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // Tests for if as expressions with dynamic type sizes -type compare<T> = 'static |T, T| -> bool; +type compare<T> = |T, T|: 'static -> bool; fn test_generic<T:Clone>(expected: T, not_expected: T, eq: compare<T>) { let actual: T = if true { expected.clone() } else { not_expected }; diff --git a/src/test/run-pass/expr-match-generic-box1.rs b/src/test/run-pass/expr-match-generic-box1.rs index 82e80e7da7d..287e0ea349d 100644 --- a/src/test/run-pass/expr-match-generic-box1.rs +++ b/src/test/run-pass/expr-match-generic-box1.rs @@ -10,7 +10,7 @@ #[feature(managed_boxes)]; -type compare<T> = 'static |@T, @T| -> bool; +type compare<T> = |@T, @T|: 'static -> bool; fn test_generic<T>(expected: @T, eq: compare<T>) { let actual: @T = match true { true => { expected }, _ => fail!() }; diff --git a/src/test/run-pass/expr-match-generic-box2.rs b/src/test/run-pass/expr-match-generic-box2.rs index 1ad9db46257..f342c141541 100644 --- a/src/test/run-pass/expr-match-generic-box2.rs +++ b/src/test/run-pass/expr-match-generic-box2.rs @@ -10,9 +10,8 @@ #[feature(managed_boxes)]; -// ignore-fast -type compare<T> = 'static |T, T| -> bool; +type compare<T> = |T, T|: 'static -> bool; fn test_generic<T:Clone>(expected: T, eq: compare<T>) { let actual: T = match true { true => { expected.clone() }, _ => fail!("wat") }; diff --git a/src/test/run-pass/expr-match-generic-unique1.rs b/src/test/run-pass/expr-match-generic-unique1.rs index af9022ed322..991a1f449f1 100644 --- a/src/test/run-pass/expr-match-generic-unique1.rs +++ b/src/test/run-pass/expr-match-generic-unique1.rs @@ -10,7 +10,7 @@ -type compare<T> = 'static |~T, ~T| -> bool; +type compare<T> = |~T, ~T|: 'static -> bool; fn test_generic<T:Clone>(expected: ~T, eq: compare<T>) { let actual: ~T = match true { diff --git a/src/test/run-pass/expr-match-generic-unique2.rs b/src/test/run-pass/expr-match-generic-unique2.rs index 97848471590..d229672d057 100644 --- a/src/test/run-pass/expr-match-generic-unique2.rs +++ b/src/test/run-pass/expr-match-generic-unique2.rs @@ -8,9 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast -type compare<'a, T> = 'a |T, T| -> bool; +type compare<'a, T> = |T, T|: 'a -> bool; fn test_generic<T:Clone>(expected: T, eq: compare<T>) { let actual: T = match true { diff --git a/src/test/run-pass/expr-match-generic.rs b/src/test/run-pass/expr-match-generic.rs index 4e7e7d6bdcf..ff19862fee3 100644 --- a/src/test/run-pass/expr-match-generic.rs +++ b/src/test/run-pass/expr-match-generic.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast type compare<T> = extern "Rust" fn(T, T) -> bool; diff --git a/src/test/run-pass/expr-scope.rs b/src/test/run-pass/expr-scope.rs index b79f9397bb0..324ff59dcb8 100644 --- a/src/test/run-pass/expr-scope.rs +++ b/src/test/run-pass/expr-scope.rs @@ -9,7 +9,6 @@ // except according to those terms. // Regression test for issue #762 -// ignore-fast pub fn f() { } pub fn main() { return ::f(); } diff --git a/src/test/run-pass/extern-call-deep.rs b/src/test/run-pass/extern-call-deep.rs index 67f2d750cc0..84574fb6787 100644 --- a/src/test/run-pass/extern-call-deep.rs +++ b/src/test/run-pass/extern-call-deep.rs @@ -8,10 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::libc; +extern crate libc; mod rustrt { - use std::libc; + extern crate libc; #[link(name = "rustrt")] extern { diff --git a/src/test/run-pass/extern-call-deep2.rs b/src/test/run-pass/extern-call-deep2.rs index 701ae33132d..60b80356d9f 100644 --- a/src/test/run-pass/extern-call-deep2.rs +++ b/src/test/run-pass/extern-call-deep2.rs @@ -8,11 +8,11 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::libc; +extern crate libc; use std::task; mod rustrt { - use std::libc; + extern crate libc; #[link(name = "rustrt")] extern { diff --git a/src/test/run-pass/extern-call-indirect.rs b/src/test/run-pass/extern-call-indirect.rs index 16142b2f896..391fdc616dc 100644 --- a/src/test/run-pass/extern-call-indirect.rs +++ b/src/test/run-pass/extern-call-indirect.rs @@ -8,10 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::libc; +extern crate libc; mod rustrt { - use std::libc; + extern crate libc; #[link(name = "rustrt")] extern { diff --git a/src/test/run-pass/extern-call-scrub.rs b/src/test/run-pass/extern-call-scrub.rs index c67810bb17a..a1aa2adc431 100644 --- a/src/test/run-pass/extern-call-scrub.rs +++ b/src/test/run-pass/extern-call-scrub.rs @@ -12,11 +12,11 @@ // make sure the stack pointers are maintained properly in both // directions -use std::libc; +extern crate libc; use std::task; mod rustrt { - use std::libc; + extern crate libc; #[link(name = "rustrt")] extern { diff --git a/src/test/run-pass/extern-calling-convention-test.rs b/src/test/run-pass/extern-calling-convention-test.rs index b895466cf7e..bdb1326aa15 100644 --- a/src/test/run-pass/extern-calling-convention-test.rs +++ b/src/test/run-pass/extern-calling-convention-test.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast: aux-build not compatible with fast // aux-build:extern_calling_convention.rs extern crate extern_calling_convention; diff --git a/src/test/run-pass/extern-crosscrate.rs b/src/test/run-pass/extern-crosscrate.rs index 43c7887d3ef..3faf5744199 100644 --- a/src/test/run-pass/extern-crosscrate.rs +++ b/src/test/run-pass/extern-crosscrate.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast //aux-build:extern-crosscrate-source.rs extern crate externcallback = "externcallback#0.1"; diff --git a/src/test/run-pass/extern-fn-reachable.rs b/src/test/run-pass/extern-fn-reachable.rs index d0f12ae7b10..615013888bd 100644 --- a/src/test/run-pass/extern-fn-reachable.rs +++ b/src/test/run-pass/extern-fn-reachable.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // ignore-win32 dynamic_lib can read dllexported symbols only // ignore-linux apparently dlsym doesn't work on program symbols? // ignore-android apparently dlsym doesn't work on program symbols? diff --git a/src/test/run-pass/extern-mod-ordering-exe.rs b/src/test/run-pass/extern-mod-ordering-exe.rs index f228c0c0992..7e9e6073252 100644 --- a/src/test/run-pass/extern-mod-ordering-exe.rs +++ b/src/test/run-pass/extern-mod-ordering-exe.rs @@ -9,7 +9,6 @@ // except according to those terms. // aux-build:extern_mod_ordering_lib.rs -// ignore-fast extern crate extern_mod_ordering_lib; diff --git a/src/test/run-pass/extern-mod-syntax.rs b/src/test/run-pass/extern-mod-syntax.rs index e31a9e3f7f5..f6136b153a1 100644 --- a/src/test/run-pass/extern-mod-syntax.rs +++ b/src/test/run-pass/extern-mod-syntax.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at diff --git a/src/test/run-pass/extern-stress.rs b/src/test/run-pass/extern-stress.rs index ef1b26fc1af..26fc334026f 100644 --- a/src/test/run-pass/extern-stress.rs +++ b/src/test/run-pass/extern-stress.rs @@ -11,11 +11,11 @@ // This creates a bunch of descheduling tasks that run concurrently // while holding onto C stacks -use std::libc; +extern crate libc; use std::task; mod rustrt { - use std::libc; + extern crate libc; #[link(name = "rustrt")] extern { diff --git a/src/test/run-pass/extern-yield.rs b/src/test/run-pass/extern-yield.rs index ba4f0ccfe64..aec7ee43412 100644 --- a/src/test/run-pass/extern-yield.rs +++ b/src/test/run-pass/extern-yield.rs @@ -8,11 +8,11 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::libc; +extern crate libc; use std::task; mod rustrt { - use std::libc; + extern crate libc; #[link(name = "rustrt")] extern { diff --git a/src/test/run-pass/fixed_length_vec_glue.rs b/src/test/run-pass/fixed_length_vec_glue.rs index 1e3754c61cf..1a786e968ca 100644 --- a/src/test/run-pass/fixed_length_vec_glue.rs +++ b/src/test/run-pass/fixed_length_vec_glue.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast: check-fast screws up repr paths use std::repr; diff --git a/src/test/run-pass/fn-coerce-field.rs b/src/test/run-pass/fn-coerce-field.rs index e49b1e9ed61..6b7490ba673 100644 --- a/src/test/run-pass/fn-coerce-field.rs +++ b/src/test/run-pass/fn-coerce-field.rs @@ -9,7 +9,7 @@ // except according to those terms. struct r<'a> { - field: 'a || + field: ||: 'a, } pub fn main() { diff --git a/src/test/run-pass/foreign-call-no-runtime.rs b/src/test/run-pass/foreign-call-no-runtime.rs index 130f04b3fb2..147cfb16fa2 100644 --- a/src/test/run-pass/foreign-call-no-runtime.rs +++ b/src/test/run-pass/foreign-call-no-runtime.rs @@ -8,8 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +extern crate libc; + use std::cast; -use std::libc; use std::unstable::run_in_bare_thread; #[link(name = "rustrt")] diff --git a/src/test/run-pass/foreign-dupe.rs b/src/test/run-pass/foreign-dupe.rs index 8a6c0e4abce..4da7d0fb743 100644 --- a/src/test/run-pass/foreign-dupe.rs +++ b/src/test/run-pass/foreign-dupe.rs @@ -8,11 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast - Somehow causes check-fast to livelock?? Probably because we're // calling pin_task and that's having wierd side-effects. mod rustrt1 { - use std::libc; + extern crate libc; #[link(name = "rustrt")] extern { @@ -21,7 +20,7 @@ mod rustrt1 { } mod rustrt2 { - use std::libc; + extern crate libc; #[link(name = "rustrt")] extern { diff --git a/src/test/run-pass/foreign-fn-linkname.rs b/src/test/run-pass/foreign-fn-linkname.rs index 7e6a362cabe..e35aaaf7f76 100644 --- a/src/test/run-pass/foreign-fn-linkname.rs +++ b/src/test/run-pass/foreign-fn-linkname.rs @@ -8,8 +8,13 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -mod libc { - use std::libc::{c_char, size_t}; +// ignore-fast doesn't like extern crate + +extern crate libc; + +mod mlibc { + extern crate libc; + use self::libc::{c_char, size_t}; extern { #[link_name = "strlen"] @@ -21,7 +26,7 @@ fn strlen(str: ~str) -> uint { // C string is terminated with a zero str.with_c_str(|buf| { unsafe { - libc::my_strlen(buf) as uint + mlibc::my_strlen(buf) as uint } }) } diff --git a/src/test/run-pass/foreign-mod-unused-const.rs b/src/test/run-pass/foreign-mod-unused-const.rs index 2f587653941..e1ed0b8ea3b 100644 --- a/src/test/run-pass/foreign-mod-unused-const.rs +++ b/src/test/run-pass/foreign-mod-unused-const.rs @@ -8,8 +8,12 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-fast doesn't like extern crate + +extern crate libc; + mod foo { - use std::libc::c_int; + use libc::c_int; extern { pub static errno: c_int; diff --git a/src/test/run-pass/foreign-no-abi.rs b/src/test/run-pass/foreign-no-abi.rs index eef45532265..0bf97a7d9b4 100644 --- a/src/test/run-pass/foreign-no-abi.rs +++ b/src/test/run-pass/foreign-no-abi.rs @@ -11,7 +11,7 @@ // ABI is cdecl by default mod rustrt { - use std::libc; + extern crate libc; #[link(name = "rustrt")] extern { diff --git a/src/test/run-pass/foreign2.rs b/src/test/run-pass/foreign2.rs index 7c9d2dfa87c..3c7e878c318 100644 --- a/src/test/run-pass/foreign2.rs +++ b/src/test/run-pass/foreign2.rs @@ -8,6 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-fast doesn't like extern crate + +extern crate libc; + mod bar { extern {} } @@ -16,8 +20,8 @@ mod zed { extern {} } -mod libc { - use std::libc::{c_int, c_void, size_t, ssize_t}; +mod mlibc { + use libc::{c_int, c_void, size_t, ssize_t}; extern { pub fn write(fd: c_int, buf: *c_void, count: size_t) -> ssize_t; diff --git a/src/test/run-pass/generic-default-type-params-cross-crate.rs b/src/test/run-pass/generic-default-type-params-cross-crate.rs index 72b41601891..ae168cb17c6 100644 --- a/src/test/run-pass/generic-default-type-params-cross-crate.rs +++ b/src/test/run-pass/generic-default-type-params-cross-crate.rs @@ -10,7 +10,6 @@ // aux-build:default_type_params_xc.rs -// ignore-fast #[feature] doesn't work with check-fast #[feature(default_type_params)]; extern crate default_type_params_xc; diff --git a/src/test/run-pass/generic-default-type-params.rs b/src/test/run-pass/generic-default-type-params.rs index 8be8fcbdd54..360f0884575 100644 --- a/src/test/run-pass/generic-default-type-params.rs +++ b/src/test/run-pass/generic-default-type-params.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast #[feature] doesn't work with check-fast #[feature(default_type_params)]; struct Foo<A = (int, char)> { diff --git a/src/test/run-pass/generic-temporary.rs b/src/test/run-pass/generic-temporary.rs index 99be8a5478c..3db794d88f0 100644 --- a/src/test/run-pass/generic-temporary.rs +++ b/src/test/run-pass/generic-temporary.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast fn mk() -> int { return 1; } diff --git a/src/test/run-pass/getopts_ref.rs b/src/test/run-pass/getopts_ref.rs index a4cae79c037..6ccd9c33be9 100644 --- a/src/test/run-pass/getopts_ref.rs +++ b/src/test/run-pass/getopts_ref.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at diff --git a/src/test/run-pass/glob-std.rs b/src/test/run-pass/glob-std.rs index 0a12731fb46..2918d5776f0 100644 --- a/src/test/run-pass/glob-std.rs +++ b/src/test/run-pass/glob-std.rs @@ -8,16 +8,14 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast check-fast doesn't like 'extern crate extra' // ignore-win32 TempDir may cause IoError on windows: #10462 -#[feature(macro_rules)]; +#![feature(macro_rules)] extern crate glob; use glob::glob; -use std::unstable::finally::Finally; -use std::{os, unstable}; +use std::os; use std::io; use std::io::TempDir; @@ -30,9 +28,9 @@ macro_rules! assert_eq ( ($e1:expr, $e2:expr) => ( pub fn main() { fn mk_file(path: &str, directory: bool) { if directory { - io::fs::mkdir(&Path::new(path), io::UserRWX); + io::fs::mkdir(&Path::new(path), io::UserRWX).unwrap(); } else { - io::File::create(&Path::new(path)); + io::File::create(&Path::new(path)).unwrap(); } } @@ -73,8 +71,8 @@ pub fn main() { mk_file("xyz/z", false); assert_eq!(glob_vec(""), Vec::new()); - assert_eq!(glob_vec("."), Vec::new()); - assert_eq!(glob_vec(".."), Vec::new()); + assert_eq!(glob_vec("."), vec!(os::getcwd())); + assert_eq!(glob_vec(".."), vec!(os::getcwd().join(".."))); assert_eq!(glob_vec("aaa"), vec!(abs_path("aaa"))); assert_eq!(glob_vec("aaa/"), vec!(abs_path("aaa"))); @@ -132,6 +130,15 @@ pub fn main() { abs_path("aaa/tomato/tomato.txt"), abs_path("aaa/tomato/tomoto.txt"))); + assert_eq!(glob_vec("./aaa"), vec!(abs_path("aaa"))); + assert_eq!(glob_vec("./*"), glob_vec("*")); + assert_eq!(glob_vec("*/..").pop().unwrap(), abs_path(".")); + assert_eq!(glob_vec("aaa/../bbb"), vec!(abs_path("bbb"))); + assert_eq!(glob_vec("nonexistent/../bbb"), Vec::new()); + assert_eq!(glob_vec("aaa/tomato/tomato.txt/.."), Vec::new()); + + assert_eq!(glob_vec("aaa/tomato/tomato.txt/"), Vec::new()); + assert_eq!(glob_vec("aa[a]"), vec!(abs_path("aaa"))); assert_eq!(glob_vec("aa[abc]"), vec!(abs_path("aaa"))); assert_eq!(glob_vec("a[bca]a"), vec!(abs_path("aaa"))); diff --git a/src/test/run-pass/global-scope.rs b/src/test/run-pass/global-scope.rs index a76b9d5ca0a..618916e8569 100644 --- a/src/test/run-pass/global-scope.rs +++ b/src/test/run-pass/global-scope.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast pub fn f() -> int { return 1; } diff --git a/src/test/run-pass/hashmap-memory.rs b/src/test/run-pass/hashmap-memory.rs index a57cf3e59ae..94035ddc7bb 100644 --- a/src/test/run-pass/hashmap-memory.rs +++ b/src/test/run-pass/hashmap-memory.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at @@ -28,7 +27,7 @@ mod map_reduce { use std::str; use std::task; - pub type putter<'a> = 'a |~str, ~str|; + pub type putter<'a> = |~str, ~str|: 'a; pub type mapper = extern fn(~str, putter); diff --git a/src/test/run-pass/ifmt.rs b/src/test/run-pass/ifmt.rs index 7cdd932faf6..17c54780fa2 100644 --- a/src/test/run-pass/ifmt.rs +++ b/src/test/run-pass/ifmt.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast: check-fast screws up repr paths #[feature(macro_rules)]; #![deny(warnings)] @@ -174,7 +173,7 @@ fn test_write() { writeln!(w, "{foo}", foo="bar"); } - let s = str::from_utf8_owned(buf.unwrap()).unwrap(); + let s = str::from_utf8(buf.unwrap().as_slice()).unwrap().to_owned(); t!(s, "34helloline\nbar\n"); } @@ -198,7 +197,7 @@ fn test_format_args() { format_args!(|args| { fmt::write(w, args); }, "test"); format_args!(|args| { fmt::write(w, args); }, "{test}", test=3); } - let s = str::from_utf8_owned(buf.unwrap()).unwrap(); + let s = str::from_utf8(buf.unwrap().as_slice()).unwrap().to_owned(); t!(s, "1test3"); let s = format_args!(fmt::format, "hello {}", "world"); diff --git a/src/test/run-pass/impl-privacy-xc-1.rs b/src/test/run-pass/impl-privacy-xc-1.rs index 9665d4d684d..d7e53f3c38f 100644 --- a/src/test/run-pass/impl-privacy-xc-1.rs +++ b/src/test/run-pass/impl-privacy-xc-1.rs @@ -9,7 +9,6 @@ // except according to those terms. // aux-build:impl_privacy_xc_1.rs -// ignore-fast extern crate impl_privacy_xc_1; diff --git a/src/test/run-pass/impl-privacy-xc-2.rs b/src/test/run-pass/impl-privacy-xc-2.rs index 8e67a5c74c5..3ef4b43d079 100644 --- a/src/test/run-pass/impl-privacy-xc-2.rs +++ b/src/test/run-pass/impl-privacy-xc-2.rs @@ -9,7 +9,6 @@ // except according to those terms. // aux-build:impl_privacy_xc_2.rs -// ignore-fast extern crate impl_privacy_xc_2; diff --git a/src/test/run-pass/import-from.rs b/src/test/run-pass/import-from.rs index 74f839546de..bbf914411fd 100644 --- a/src/test/run-pass/import-from.rs +++ b/src/test/run-pass/import-from.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at diff --git a/src/test/run-pass/import-glob-0.rs b/src/test/run-pass/import-glob-0.rs index 5f4bf557b23..44d98852054 100644 --- a/src/test/run-pass/import-glob-0.rs +++ b/src/test/run-pass/import-glob-0.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at diff --git a/src/test/run-pass/import-glob-crate.rs b/src/test/run-pass/import-glob-crate.rs index e1ca890f4fd..a154388b2c5 100644 --- a/src/test/run-pass/import-glob-crate.rs +++ b/src/test/run-pass/import-glob-crate.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at diff --git a/src/test/run-pass/import-trailing-comma.rs b/src/test/run-pass/import-trailing-comma.rs index 5a3bc43e04b..42a90b3e39a 100644 --- a/src/test/run-pass/import-trailing-comma.rs +++ b/src/test/run-pass/import-trailing-comma.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at diff --git a/src/test/run-pass/import.rs b/src/test/run-pass/import.rs index 5765df4dafa..6b0ad24da1d 100644 --- a/src/test/run-pass/import.rs +++ b/src/test/run-pass/import.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at diff --git a/src/test/run-pass/import2.rs b/src/test/run-pass/import2.rs index 7a3c6a13877..d684c30aca1 100644 --- a/src/test/run-pass/import2.rs +++ b/src/test/run-pass/import2.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at diff --git a/src/test/run-pass/import3.rs b/src/test/run-pass/import3.rs index 651f86e5898..1bbe141eaff 100644 --- a/src/test/run-pass/import3.rs +++ b/src/test/run-pass/import3.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at diff --git a/src/test/run-pass/import4.rs b/src/test/run-pass/import4.rs index ff858e81bb8..44f6b6140fb 100644 --- a/src/test/run-pass/import4.rs +++ b/src/test/run-pass/import4.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at diff --git a/src/test/run-pass/import5.rs b/src/test/run-pass/import5.rs index f41e4d7d373..18cc1aa0848 100644 --- a/src/test/run-pass/import5.rs +++ b/src/test/run-pass/import5.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at diff --git a/src/test/run-pass/import6.rs b/src/test/run-pass/import6.rs index cf8dfd5469c..a6b3d90a4ee 100644 --- a/src/test/run-pass/import6.rs +++ b/src/test/run-pass/import6.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at diff --git a/src/test/run-pass/import7.rs b/src/test/run-pass/import7.rs index fadbc534519..d5c9bc23e2a 100644 --- a/src/test/run-pass/import7.rs +++ b/src/test/run-pass/import7.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at diff --git a/src/test/run-pass/import8.rs b/src/test/run-pass/import8.rs index 69706a324b6..58ccf3aaa1e 100644 --- a/src/test/run-pass/import8.rs +++ b/src/test/run-pass/import8.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at diff --git a/src/test/run-pass/inner-static.rs b/src/test/run-pass/inner-static.rs index 3e04a8a3922..f9b430c1553 100644 --- a/src/test/run-pass/inner-static.rs +++ b/src/test/run-pass/inner-static.rs @@ -9,7 +9,6 @@ // except according to those terms. // aux-build:inner_static.rs -// ignore-fast extern crate inner_static; diff --git a/src/test/run-pass/intrinsic-alignment.rs b/src/test/run-pass/intrinsic-alignment.rs index 010ab8be747..12385a26437 100644 --- a/src/test/run-pass/intrinsic-alignment.rs +++ b/src/test/run-pass/intrinsic-alignment.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast Does not work with main in a submodule mod rusti { extern "rust-intrinsic" { diff --git a/src/test/run-pass/intrinsic-atomics-cc.rs b/src/test/run-pass/intrinsic-atomics-cc.rs index 7fda83a14bb..e6a81dbe5d9 100644 --- a/src/test/run-pass/intrinsic-atomics-cc.rs +++ b/src/test/run-pass/intrinsic-atomics-cc.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast - check-fast doesn't understand aux-build // aux-build:cci_intrinsic.rs extern crate cci_intrinsic; diff --git a/src/test/run-pass/intrinsics-integer.rs b/src/test/run-pass/intrinsics-integer.rs index 867e12d4139..164d16fe503 100644 --- a/src/test/run-pass/intrinsics-integer.rs +++ b/src/test/run-pass/intrinsics-integer.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at diff --git a/src/test/run-pass/intrinsics-math.rs b/src/test/run-pass/intrinsics-math.rs index db9edfbefdc..5e1981fbcbc 100644 --- a/src/test/run-pass/intrinsics-math.rs +++ b/src/test/run-pass/intrinsics-math.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at diff --git a/src/test/run-pass/invoke-external-foreign.rs b/src/test/run-pass/invoke-external-foreign.rs index def9a590a83..2603e2d1b09 100644 --- a/src/test/run-pass/invoke-external-foreign.rs +++ b/src/test/run-pass/invoke-external-foreign.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // ignore-pretty // aux-build:foreign_lib.rs diff --git a/src/test/run-pass/issue-10028.rs b/src/test/run-pass/issue-10028.rs index e69aabd46f5..f4f7e24d156 100644 --- a/src/test/run-pass/issue-10028.rs +++ b/src/test/run-pass/issue-10028.rs @@ -9,7 +9,6 @@ // except according to those terms. // aux-build:issue-10028.rs -// ignore-fast extern crate issue10028 = "issue-10028"; diff --git a/src/test/run-pass/issue-10031.rs b/src/test/run-pass/issue-10031.rs index bde8b194c40..a94ed4ed5b9 100644 --- a/src/test/run-pass/issue-10031.rs +++ b/src/test/run-pass/issue-10031.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast - check-fast doesn't understand aux-build // aux-build:issue_10031_aux.rs extern crate issue_10031_aux; diff --git a/src/test/run-pass/issue-10626.rs b/src/test/run-pass/issue-10626.rs index 3f2c3f4fbd7..4f3763f8039 100644 --- a/src/test/run-pass/issue-10626.rs +++ b/src/test/run-pass/issue-10626.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // Make sure that if a process doesn't have its stdio/stderr descriptors set up // that we don't die in a large ball of fire diff --git a/src/test/run-pass/issue-10767.rs b/src/test/run-pass/issue-10767.rs new file mode 100644 index 00000000000..3254f5bc35f --- /dev/null +++ b/src/test/run-pass/issue-10767.rs @@ -0,0 +1,15 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +pub fn main() { + fn f() { + }; + let _: ~fn() = ~f; +} diff --git a/src/test/run-pass/issue-10806.rs b/src/test/run-pass/issue-10806.rs index 2174227e8dd..69a23e80990 100644 --- a/src/test/run-pass/issue-10806.rs +++ b/src/test/run-pass/issue-10806.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast pub fn foo() -> int { 3 diff --git a/src/test/run-pass/issue-11085.rs b/src/test/run-pass/issue-11085.rs index 504109421ae..3483bdd53b5 100644 --- a/src/test/run-pass/issue-11085.rs +++ b/src/test/run-pass/issue-11085.rs @@ -9,7 +9,6 @@ // except according to those terms. // compile-flags: --cfg foo -// ignore-fast #[feature(struct_variant)]; diff --git a/src/test/run-pass/issue-11224.rs b/src/test/run-pass/issue-11224.rs index 23f1834fe87..c247893ef6b 100644 --- a/src/test/run-pass/issue-11224.rs +++ b/src/test/run-pass/issue-11224.rs @@ -9,7 +9,6 @@ // except according to those terms. // aux-build:issue-11224.rs -// ignore-fast extern crate unused = "issue-11224"; diff --git a/src/test/run-pass/issue-11225-1.rs b/src/test/run-pass/issue-11225-1.rs index ea0e6615144..ecedeaba751 100644 --- a/src/test/run-pass/issue-11225-1.rs +++ b/src/test/run-pass/issue-11225-1.rs @@ -9,7 +9,6 @@ // except according to those terms. // aux-build:issue-11225-1.rs -// ignore-fast extern crate foo = "issue-11225-1"; diff --git a/src/test/run-pass/issue-11225-2.rs b/src/test/run-pass/issue-11225-2.rs index 95ed77eba04..774d9e6d1b8 100644 --- a/src/test/run-pass/issue-11225-2.rs +++ b/src/test/run-pass/issue-11225-2.rs @@ -9,7 +9,6 @@ // except according to those terms. // aux-build:issue-11225-2.rs -// ignore-fast extern crate foo = "issue-11225-2"; diff --git a/src/test/run-pass/issue-11508.rs b/src/test/run-pass/issue-11508.rs index a7ad38cde0f..25d3a241ebd 100644 --- a/src/test/run-pass/issue-11508.rs +++ b/src/test/run-pass/issue-11508.rs @@ -9,7 +9,6 @@ // except according to those terms. // aux-build:issue-11508.rs -// ignore-fast extern crate rand = "issue-11508"; diff --git a/src/test/run-pass/issue-11529.rs b/src/test/run-pass/issue-11529.rs index 643e6ca4bda..c11f7c79db1 100644 --- a/src/test/run-pass/issue-11529.rs +++ b/src/test/run-pass/issue-11529.rs @@ -9,7 +9,6 @@ // except according to those terms. // aux-build:issue-11529.rs -// ignore-fast extern crate a = "issue-11529"; diff --git a/src/test/run-pass/issue-11881.rs b/src/test/run-pass/issue-11881.rs new file mode 100644 index 00000000000..7e51c6ad2ae --- /dev/null +++ b/src/test/run-pass/issue-11881.rs @@ -0,0 +1,58 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +extern crate serialize; + +use serialize::{Encodable, Encoder}; +use serialize::json; +use serialize::ebml::writer; +use std::io::MemWriter; +use std::str::from_utf8_owned; + +#[deriving(Encodable)] +struct Foo { + baz: bool, +} + +#[deriving(Encodable)] +struct Bar { + froboz: uint, +} + +enum WireProtocol { + JSON, + EBML, + // ... +} + +fn encode_json<'a, + T: Encodable<json::Encoder<'a>, + std::io::IoError>>(val: &T, + wr: &'a mut MemWriter) { + let mut encoder = json::Encoder::new(wr); + val.encode(&mut encoder); +} +fn encode_ebml<'a, + T: Encodable<writer::Encoder<'a, MemWriter>, + std::io::IoError>>(val: &T, + wr: &'a mut MemWriter) { + let mut encoder = writer::Encoder(wr); + val.encode(&mut encoder); +} + +pub fn main() { + let target = Foo{baz: false,}; + let mut wr = MemWriter::new(); + let proto = JSON; + match proto { + JSON => encode_json(&target, &mut wr), + EBML => encode_ebml(&target, &mut wr) + } +} diff --git a/src/test/run-pass/issue-1251.rs b/src/test/run-pass/issue-1251.rs index 70d2c58a631..3befa4e7fb4 100644 --- a/src/test/run-pass/issue-1251.rs +++ b/src/test/run-pass/issue-1251.rs @@ -11,7 +11,7 @@ #[crate_id="rust_get_test_int"]; mod rustrt { - use std::libc; + extern crate libc; extern { pub fn rust_get_test_int() -> libc::intptr_t; diff --git a/src/test/run-pass/issue-12612.rs b/src/test/run-pass/issue-12612.rs new file mode 100644 index 00000000000..fcb658036b6 --- /dev/null +++ b/src/test/run-pass/issue-12612.rs @@ -0,0 +1,23 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// aux-build:issue-12612-1.rs +// aux-build:issue-12612-2.rs + +extern crate foo = "issue-12612-1"; +extern crate bar = "issue-12612-2"; + +use foo::bar; + +mod test { + use bar::baz; +} + +fn main() {} diff --git a/src/test/run-pass/issue-12684.rs b/src/test/run-pass/issue-12684.rs index 40c087b5c25..009a0783b58 100644 --- a/src/test/run-pass/issue-12684.rs +++ b/src/test/run-pass/issue-12684.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast extern crate native; extern crate green; diff --git a/src/test/run-pass/issue-12699.rs b/src/test/run-pass/issue-12699.rs index 6409ba51375..02790dab7b9 100644 --- a/src/test/run-pass/issue-12699.rs +++ b/src/test/run-pass/issue-12699.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast extern crate native; diff --git a/src/test/run-pass/issue-12860.rs b/src/test/run-pass/issue-12860.rs index 3876aa45753..187a45e6543 100644 --- a/src/test/run-pass/issue-12860.rs +++ b/src/test/run-pass/issue-12860.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast extern crate collections; diff --git a/src/test/run-pass/issue-13304.rs b/src/test/run-pass/issue-13304.rs new file mode 100644 index 00000000000..20bd8e51a48 --- /dev/null +++ b/src/test/run-pass/issue-13304.rs @@ -0,0 +1,63 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// ignore-fast + +extern crate green; +extern crate rustuv; +extern crate native; + +use std::os; +use std::io; +use std::str; + +#[start] +fn start(argc: int, argv: **u8) -> int { + green::start(argc, argv, rustuv::event_loop, main) +} + +fn main() { + let args = os::args(); + if args.len() > 1 && args[1].as_slice() == "child" { + if args[2].as_slice() == "green" { + child(); + } else { + let (tx, rx) = channel(); + native::task::spawn(proc() { tx.send(child()); }); + rx.recv(); + } + } else { + parent(~"green"); + parent(~"native"); + let (tx, rx) = channel(); + native::task::spawn(proc() { + parent(~"green"); + parent(~"native"); + tx.send(()); + }); + rx.recv(); + } +} + +fn parent(flavor: ~str) { + let args = os::args(); + let mut p = io::Process::new(args[0].as_slice(), [~"child", flavor]).unwrap(); + p.stdin.get_mut_ref().write_str("test1\ntest2\ntest3").unwrap(); + let out = p.wait_with_output(); + assert!(out.status.success()); + let s = str::from_utf8(out.output.as_slice()).unwrap(); + assert_eq!(s, "test1\n\ntest2\n\ntest3\n"); +} + +fn child() { + for line in io::stdin().lines() { + println!("{}", line.unwrap()); + } +} diff --git a/src/test/run-pass/issue-1516.rs b/src/test/run-pass/issue-1516.rs index f3ffed7dc7b..3aaa480d776 100644 --- a/src/test/run-pass/issue-1516.rs +++ b/src/test/run-pass/issue-1516.rs @@ -9,5 +9,5 @@ // except according to those terms. pub fn main() { - let early_error: 'static |&str| -> ! = |_msg| { fail!() }; + let early_error: |&str|: 'static -> ! = |_msg| { fail!() }; } diff --git a/src/test/run-pass/issue-1696.rs b/src/test/run-pass/issue-1696.rs index 48a1fd3f783..0113b8e2fd9 100644 --- a/src/test/run-pass/issue-1696.rs +++ b/src/test/run-pass/issue-1696.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at diff --git a/src/test/run-pass/issue-2185.rs b/src/test/run-pass/issue-2185.rs index 591c1d285b0..492e76552d4 100644 --- a/src/test/run-pass/issue-2185.rs +++ b/src/test/run-pass/issue-2185.rs @@ -9,7 +9,6 @@ // except according to those terms. // ignore-test -// ignore-fast // notes on this test case: // On Thu, Apr 18, 2013-2014 at 6:30 PM, John Clements <clements@brinckerhoff.org> wrote: diff --git a/src/test/run-pass/issue-2190-1.rs b/src/test/run-pass/issue-2190-1.rs index d04717e380b..c8735e79e50 100644 --- a/src/test/run-pass/issue-2190-1.rs +++ b/src/test/run-pass/issue-2190-1.rs @@ -12,13 +12,13 @@ use std::task; static generations: uint = 1024+256+128+49; -fn spawn(f: proc:Send()) { +fn spawn(f: proc():Send) { let mut t = task::task(); t.opts.stack_size = Some(32 * 1024); t.spawn(f); } -fn child_no(x: uint) -> proc:Send() { +fn child_no(x: uint) -> proc():Send { proc() { if x < generations { spawn(child_no(x+1)); diff --git a/src/test/run-pass/issue-2214.rs b/src/test/run-pass/issue-2214.rs index f482790ef4c..1fa9fa8f4fb 100644 --- a/src/test/run-pass/issue-2214.rs +++ b/src/test/run-pass/issue-2214.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at @@ -10,8 +9,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +extern crate libc; + use std::cast; -use std::libc::{c_double, c_int}; +use libc::{c_double, c_int}; fn to_c_int(v: &mut int) -> &mut c_int { unsafe { @@ -26,7 +27,7 @@ fn lgamma(n: c_double, value: &mut int) -> c_double { } mod m { - use std::libc::{c_double, c_int}; + use libc::{c_double, c_int}; #[link_name = "m"] extern { diff --git a/src/test/run-pass/issue-2316-c.rs b/src/test/run-pass/issue-2316-c.rs index 8dd64b1dbc9..a27f0b8d659 100644 --- a/src/test/run-pass/issue-2316-c.rs +++ b/src/test/run-pass/issue-2316-c.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast - check-fast doesn't understand aux-build // aux-build:issue_2316_a.rs // aux-build:issue_2316_b.rs diff --git a/src/test/run-pass/issue-2380-b.rs b/src/test/run-pass/issue-2380-b.rs index f312a1b080a..22976aac6e7 100644 --- a/src/test/run-pass/issue-2380-b.rs +++ b/src/test/run-pass/issue-2380-b.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:issue-2380.rs extern crate a; diff --git a/src/test/run-pass/issue-2383.rs b/src/test/run-pass/issue-2383.rs index 5b13be23f8a..1197e53ffd9 100644 --- a/src/test/run-pass/issue-2383.rs +++ b/src/test/run-pass/issue-2383.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at diff --git a/src/test/run-pass/issue-2414-c.rs b/src/test/run-pass/issue-2414-c.rs index 86cd1576bb0..0b891fbddcc 100644 --- a/src/test/run-pass/issue-2414-c.rs +++ b/src/test/run-pass/issue-2414-c.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:issue-2414-a.rs // aux-build:issue-2414-b.rs diff --git a/src/test/run-pass/issue-2472.rs b/src/test/run-pass/issue-2472.rs index b025f80a888..53b0042405b 100644 --- a/src/test/run-pass/issue-2472.rs +++ b/src/test/run-pass/issue-2472.rs @@ -9,7 +9,6 @@ // except according to those terms. // aux-build:issue_2472_b.rs -// ignore-fast extern crate issue_2472_b; diff --git a/src/test/run-pass/issue-2526-a.rs b/src/test/run-pass/issue-2526-a.rs index 00323b60649..53c7f60ebb7 100644 --- a/src/test/run-pass/issue-2526-a.rs +++ b/src/test/run-pass/issue-2526-a.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:issue-2526.rs #![feature(globs)] diff --git a/src/test/run-pass/issue-2631-b.rs b/src/test/run-pass/issue-2631-b.rs index 1ea268eafca..38923446598 100644 --- a/src/test/run-pass/issue-2631-b.rs +++ b/src/test/run-pass/issue-2631-b.rs @@ -10,7 +10,6 @@ #[feature(managed_boxes)]; -// ignore-fast // aux-build:issue-2631-a.rs extern crate collections; diff --git a/src/test/run-pass/issue-2718.rs b/src/test/run-pass/issue-2718.rs index 2e294c30a3f..0598fafd96e 100644 --- a/src/test/run-pass/issue-2718.rs +++ b/src/test/run-pass/issue-2718.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at diff --git a/src/test/run-pass/issue-2723-b.rs b/src/test/run-pass/issue-2723-b.rs index 4bf5a562cf0..bab7b0d24db 100644 --- a/src/test/run-pass/issue-2723-b.rs +++ b/src/test/run-pass/issue-2723-b.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast: aux-build not compatible with fast // aux-build:issue_2723_a.rs extern crate issue_2723_a; diff --git a/src/test/run-pass/issue-2804-2.rs b/src/test/run-pass/issue-2804-2.rs index fccd9f3da0b..e03b383283f 100644 --- a/src/test/run-pass/issue-2804-2.rs +++ b/src/test/run-pass/issue-2804-2.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at diff --git a/src/test/run-pass/issue-2804.rs b/src/test/run-pass/issue-2804.rs index 907e0b5d11d..9be9b5237c8 100644 --- a/src/test/run-pass/issue-2804.rs +++ b/src/test/run-pass/issue-2804.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at diff --git a/src/test/run-pass/issue-2904.rs b/src/test/run-pass/issue-2904.rs index 2035d6f6903..16133a762c5 100644 --- a/src/test/run-pass/issue-2904.rs +++ b/src/test/run-pass/issue-2904.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at diff --git a/src/test/run-pass/issue-3012-2.rs b/src/test/run-pass/issue-3012-2.rs index 0ffbdc3c5b8..9290e6200c5 100644 --- a/src/test/run-pass/issue-3012-2.rs +++ b/src/test/run-pass/issue-3012-2.rs @@ -8,15 +8,14 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:issue-3012-1.rs #[feature(managed_boxes)]; extern crate socketlib; +extern crate libc; use socketlib::socket; -use std::libc; pub fn main() { let fd: libc::c_int = 1 as libc::c_int; diff --git a/src/test/run-pass/issue-3026.rs b/src/test/run-pass/issue-3026.rs index ee7f3aab47a..6c181935205 100644 --- a/src/test/run-pass/issue-3026.rs +++ b/src/test/run-pass/issue-3026.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at diff --git a/src/test/run-pass/issue-3052.rs b/src/test/run-pass/issue-3052.rs index 5bd41e8bf3b..00e6b5ca8fe 100644 --- a/src/test/run-pass/issue-3052.rs +++ b/src/test/run-pass/issue-3052.rs @@ -9,7 +9,7 @@ // except according to those terms. -type Connection = 'static |Vec<u8> |; +type Connection = |Vec<u8>|: 'static; fn f() -> Option<Connection> { let mock_connection: Connection = |_| {}; diff --git a/src/test/run-pass/issue-3424.rs b/src/test/run-pass/issue-3424.rs index 7cd995f18f4..385ac1a56e3 100644 --- a/src/test/run-pass/issue-3424.rs +++ b/src/test/run-pass/issue-3424.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at diff --git a/src/test/run-pass/issue-3609.rs b/src/test/run-pass/issue-3609.rs index 1f1de9ddb9b..95bbf77024c 100644 --- a/src/test/run-pass/issue-3609.rs +++ b/src/test/run-pass/issue-3609.rs @@ -11,7 +11,7 @@ use std::task; type RingBuffer = Vec<f64> ; -type SamplesFn = proc:Send(samples: &RingBuffer); +type SamplesFn = proc(samples: &RingBuffer):Send; enum Msg { diff --git a/src/test/run-pass/issue-3656.rs b/src/test/run-pass/issue-3656.rs index 404d29fb93e..6d70b15c621 100644 --- a/src/test/run-pass/issue-3656.rs +++ b/src/test/run-pass/issue-3656.rs @@ -8,12 +8,12 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast Can't redeclare malloc with wrong signature because bugs // Issue #3656 // Incorrect struct size computation in the FFI, because of not taking // the alignment of elements into account. -use std::libc::{c_uint, uint32_t, c_void}; +extern crate libc; +use libc::{c_uint, uint32_t, c_void}; struct KEYGEN { hash_algorithm: [c_uint, ..2], diff --git a/src/test/run-pass/issue-3904.rs b/src/test/run-pass/issue-3904.rs index fe6521b4df9..81a7d073c4c 100644 --- a/src/test/run-pass/issue-3904.rs +++ b/src/test/run-pass/issue-3904.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -type ErrPrinter<'a> = 'a |&str, &str|; +type ErrPrinter<'a> = |&str, &str|: 'a; fn example_err(prog: &str, arg: &str) { println!("{}: {}", prog, arg) diff --git a/src/test/run-pass/issue-3979-xcrate.rs b/src/test/run-pass/issue-3979-xcrate.rs index a50287de97e..a062b4c7175 100644 --- a/src/test/run-pass/issue-3979-xcrate.rs +++ b/src/test/run-pass/issue-3979-xcrate.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:issue_3979_traits.rs extern crate issue_3979_traits; use issue_3979_traits::{Positioned, Movable}; diff --git a/src/test/run-pass/issue-4016.rs b/src/test/run-pass/issue-4016.rs index 7f72850aaaf..3152cda2648 100644 --- a/src/test/run-pass/issue-4016.rs +++ b/src/test/run-pass/issue-4016.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. @@ -9,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast extern crate serialize; diff --git a/src/test/run-pass/issue-4036.rs b/src/test/run-pass/issue-4036.rs index 72efd252512..48e32922ce7 100644 --- a/src/test/run-pass/issue-4036.rs +++ b/src/test/run-pass/issue-4036.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // Issue #4036: Test for an issue that arose around fixing up type inference // byproducts in vtable records. diff --git a/src/test/run-pass/issue-4208.rs b/src/test/run-pass/issue-4208.rs index 508b4dc0b51..c186f1e57f9 100644 --- a/src/test/run-pass/issue-4208.rs +++ b/src/test/run-pass/issue-4208.rs @@ -9,7 +9,6 @@ // except according to those terms. // aux-build:issue-4208-cc.rs -// ignore-fast - check-fast hates cross-crate tests extern crate numeric; use numeric::{sin, Angle}; diff --git a/src/test/run-pass/issue-4241.rs b/src/test/run-pass/issue-4241.rs new file mode 100644 index 00000000000..a781ce115ad --- /dev/null +++ b/src/test/run-pass/issue-4241.rs @@ -0,0 +1,129 @@ +// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// ignore-test needs networking + +extern crate extra; + +use extra::net::tcp::TcpSocketBuf; + +use std::io; +use std::int; + +use std::io::{ReaderUtil,WriterUtil}; + +enum Result { + Nil, + Int(int), + Data(~[u8]), + List(~[Result]), + Error(~str), + Status(~str) +} + +priv fn parse_data(len: uint, io: @io::Reader) -> Result { + let res = + if (len > 0) { + let bytes = io.read_bytes(len as uint); + assert_eq!(bytes.len(), len); + Data(bytes) + } else { + Data(~[]) + }; + assert_eq!(io.read_char(), '\r'); + assert_eq!(io.read_char(), '\n'); + return res; +} + +priv fn parse_list(len: uint, io: @io::Reader) -> Result { + let mut list: ~[Result] = ~[]; + for _ in range(0, len) { + let v = match io.read_char() { + '$' => parse_bulk(io), + ':' => parse_int(io), + _ => fail!() + }; + list.push(v); + } + return List(list); +} + +priv fn chop(s: ~str) -> ~str { + s.slice(0, s.len() - 1).to_owned() +} + +priv fn parse_bulk(io: @io::Reader) -> Result { + match from_str::<int>(chop(io.read_line())) { + None => fail!(), + Some(-1) => Nil, + Some(len) if len >= 0 => parse_data(len as uint, io), + Some(_) => fail!() + } +} + +priv fn parse_multi(io: @io::Reader) -> Result { + match from_str::<int>(chop(io.read_line())) { + None => fail!(), + Some(-1) => Nil, + Some(0) => List(~[]), + Some(len) if len >= 0 => parse_list(len as uint, io), + Some(_) => fail!() + } +} + +priv fn parse_int(io: @io::Reader) -> Result { + match from_str::<int>(chop(io.read_line())) { + None => fail!(), + Some(i) => Int(i) + } +} + +priv fn parse_response(io: @io::Reader) -> Result { + match io.read_char() { + '$' => parse_bulk(io), + '*' => parse_multi(io), + '+' => Status(chop(io.read_line())), + '-' => Error(chop(io.read_line())), + ':' => parse_int(io), + _ => fail!() + } +} + +priv fn cmd_to_str(cmd: ~[~str]) -> ~str { + let mut res = ~"*"; + res.push_str(cmd.len().to_str()); + res.push_str("\r\n"); + for s in cmd.iter() { + res.push_str([~"$", s.len().to_str(), ~"\r\n", + (*s).clone(), ~"\r\n"].concat() ); + } + res +} + +fn query(cmd: ~[~str], sb: TcpSocketBuf) -> Result { + let cmd = cmd_to_str(cmd); + //println!("{}", cmd); + sb.write_str(cmd); + let res = parse_response(@sb as @io::Reader); + res +} + +fn query2(cmd: ~[~str]) -> Result { + let _cmd = cmd_to_str(cmd); + io::with_str_reader(~"$3\r\nXXX\r\n")(|sb| { + let res = parse_response(@sb as @io::Reader); + println!("{:?}", res); + res + }); +} + + +pub fn main() { +} diff --git a/src/test/run-pass/issue-4545.rs b/src/test/run-pass/issue-4545.rs index 9781f4aba7e..fdcee2e3b61 100644 --- a/src/test/run-pass/issue-4545.rs +++ b/src/test/run-pass/issue-4545.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast check-fast doesn't like aux-build // aux-build:issue-4545.rs extern crate somelib = "issue-4545"; diff --git a/src/test/run-pass/issue-4735.rs b/src/test/run-pass/issue-4735.rs index b8205d9635b..b23158522a3 100644 --- a/src/test/run-pass/issue-4735.rs +++ b/src/test/run-pass/issue-4735.rs @@ -8,9 +8,12 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-fast doesn't like extern crate + +extern crate libc; use std::cast::transmute; -use std::libc::c_void; +use libc::c_void; struct NonCopyable(*c_void); diff --git a/src/test/run-pass/issue-5521.rs b/src/test/run-pass/issue-5521.rs index ca62b7bb895..8f66d96d50e 100644 --- a/src/test/run-pass/issue-5521.rs +++ b/src/test/run-pass/issue-5521.rs @@ -9,7 +9,6 @@ // except according to those terms. // aux-build:issue-5521.rs -// ignore-fast #[feature(managed_boxes)]; diff --git a/src/test/run-pass/issue-5791.rs b/src/test/run-pass/issue-5791.rs index 251ae2f3194..1bda73a16c9 100644 --- a/src/test/run-pass/issue-5791.rs +++ b/src/test/run-pass/issue-5791.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::libc; +extern crate libc; extern { #[link_name = "malloc"] diff --git a/src/test/run-pass/issue-5950.rs b/src/test/run-pass/issue-5950.rs index 39f47be872e..fd852f7fd51 100644 --- a/src/test/run-pass/issue-5950.rs +++ b/src/test/run-pass/issue-5950.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast pub use local_alias = local; diff --git a/src/test/run-pass/issue-6157.rs b/src/test/run-pass/issue-6157.rs index 50e5f97034a..5a78aed5826 100644 --- a/src/test/run-pass/issue-6157.rs +++ b/src/test/run-pass/issue-6157.rs @@ -10,7 +10,7 @@ pub trait OpInt<'a> { fn call<'a>(&'a self, int, int) -> int; } -impl<'a> OpInt<'a> for 'a |int, int| -> int { +impl<'a> OpInt<'a> for |int, int|: 'a -> int { fn call(&self, a:int, b:int) -> int { (*self)(a, b) } diff --git a/src/test/run-pass/issue-6919.rs b/src/test/run-pass/issue-6919.rs index 5afffb3d029..997bca42f7d 100644 --- a/src/test/run-pass/issue-6919.rs +++ b/src/test/run-pass/issue-6919.rs @@ -9,7 +9,6 @@ // except according to those terms. // aux-build:iss.rs -// ignore-fast #[crate_id="issue-6919"]; extern crate issue6919_3; diff --git a/src/test/run-pass/issue-7178.rs b/src/test/run-pass/issue-7178.rs index a20ab1ca9e4..b11521b23b2 100644 --- a/src/test/run-pass/issue-7178.rs +++ b/src/test/run-pass/issue-7178.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:issue-7178.rs extern crate cross_crate_self = "issue-7178"; diff --git a/src/test/run-pass/issue-7663.rs b/src/test/run-pass/issue-7663.rs new file mode 100644 index 00000000000..baf37e31417 --- /dev/null +++ b/src/test/run-pass/issue-7663.rs @@ -0,0 +1,57 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![feature(globs)] +#![allow(unused_imports, dead_code)] + +mod test1 { + + mod foo { pub fn p() -> int { 1 } } + mod bar { pub fn p() -> int { 2 } } + + pub mod baz { + use test1::foo::*; + use test1::bar::*; + + pub fn my_main() { assert!(p() == 2); } + } +} + +mod test2 { + + mod foo { pub fn p() -> int { 1 } } + mod bar { pub fn p() -> int { 2 } } + + pub mod baz { + use test2::foo::p; + use test2::bar::p; + + pub fn my_main() { assert!(p() == 2); } + } +} + +mod test3 { + + mod foo { pub fn p() -> int { 1 } } + mod bar { pub fn p() -> int { 2 } } + + pub mod baz { + use test3::foo::*; + use test3::bar::p; + + pub fn my_main() { assert!(p() == 2); } + } +} + +fn main() { + test1::baz::my_main(); + test2::baz::my_main(); + test3::baz::my_main(); +} diff --git a/src/test/run-pass/issue-7899.rs b/src/test/run-pass/issue-7899.rs index 6ee734d0212..84c7cce2276 100644 --- a/src/test/run-pass/issue-7899.rs +++ b/src/test/run-pass/issue-7899.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:issue-7899.rs extern crate testcrate = "issue-7899"; diff --git a/src/test/run-pass/issue-8044.rs b/src/test/run-pass/issue-8044.rs index 450c8351516..06f41e9cb7a 100644 --- a/src/test/run-pass/issue-8044.rs +++ b/src/test/run-pass/issue-8044.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast check-fast doesn't like aux-build // aux-build:issue-8044.rs extern crate minimal = "issue-8044"; diff --git a/src/test/run-pass/issue-8259.rs b/src/test/run-pass/issue-8259.rs index 715c25feff3..484df474403 100644 --- a/src/test/run-pass/issue-8259.rs +++ b/src/test/run-pass/issue-8259.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:issue-8259.rs extern crate other = "issue-8259"; diff --git a/src/test/run-pass/issue-8401.rs b/src/test/run-pass/issue-8401.rs index e47d3b8edce..1ca91366f36 100644 --- a/src/test/run-pass/issue-8401.rs +++ b/src/test/run-pass/issue-8401.rs @@ -9,7 +9,6 @@ // except according to those terms. // aux-build:issue_8401.rs -// ignore-fast extern crate issue_8401; diff --git a/src/test/run-pass/issue-8860.rs b/src/test/run-pass/issue-8860.rs index d20d0eeb58c..c665c1da3fc 100644 --- a/src/test/run-pass/issue-8860.rs +++ b/src/test/run-pass/issue-8860.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast extern crate green; diff --git a/src/test/run-pass/issue-9047.rs b/src/test/run-pass/issue-9047.rs index 053d6aa3c90..4fe2247212f 100644 --- a/src/test/run-pass/issue-9047.rs +++ b/src/test/run-pass/issue-9047.rs @@ -16,4 +16,6 @@ fn decode() -> ~str { ~"" } -pub fn main() {} +pub fn main() { + println!("{}", decode()); +} diff --git a/src/test/run-pass/issue-9123.rs b/src/test/run-pass/issue-9123.rs index ea9d7edecd1..f66215aa43f 100644 --- a/src/test/run-pass/issue-9123.rs +++ b/src/test/run-pass/issue-9123.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast check-fast doesn't like aux-build // aux-build:issue_9123.rs extern crate issue_9123; diff --git a/src/test/run-pass/issue-9188.rs b/src/test/run-pass/issue-9188.rs index 8cded636338..31797deccf9 100644 --- a/src/test/run-pass/issue-9188.rs +++ b/src/test/run-pass/issue-9188.rs @@ -9,7 +9,6 @@ // except according to those terms. // aux-build:issue_9188.rs -// ignore-fast check-fast doesn't like aux-build extern crate issue_9188; diff --git a/src/test/run-pass/issue-9396.rs b/src/test/run-pass/issue-9396.rs index 2630057c988..9f08f1db410 100644 --- a/src/test/run-pass/issue-9396.rs +++ b/src/test/run-pass/issue-9396.rs @@ -20,9 +20,9 @@ pub fn main() { }); loop { match rx.try_recv() { - comm::Data(()) => break, - comm::Empty => {} - comm::Disconnected => unreachable!() + Ok(()) => break, + Err(comm::Empty) => {} + Err(comm::Disconnected) => unreachable!() } } } diff --git a/src/test/run-pass/issue-9906.rs b/src/test/run-pass/issue-9906.rs index c32cab9638c..6b8e250ea74 100644 --- a/src/test/run-pass/issue-9906.rs +++ b/src/test/run-pass/issue-9906.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast check-fast doesn't like extern crate // aux-build:issue-9906.rs extern crate testmod = "issue-9906"; diff --git a/src/test/run-pass/issue-9968.rs b/src/test/run-pass/issue-9968.rs index 468fcdca6bd..8768a76a9a2 100644 --- a/src/test/run-pass/issue-9968.rs +++ b/src/test/run-pass/issue-9968.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast check-fast doesn't like extern crate // aux-build:issue-9968.rs extern crate lib = "issue-9968"; diff --git a/src/test/run-pass/issue2170exe.rs b/src/test/run-pass/issue2170exe.rs index 481b6a2723b..b4a41ef44f8 100644 --- a/src/test/run-pass/issue2170exe.rs +++ b/src/test/run-pass/issue2170exe.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast - check-fail fast doesn't under aux-build // aux-build:issue2170lib.rs extern crate issue2170lib; diff --git a/src/test/run-pass/issue2378c.rs b/src/test/run-pass/issue2378c.rs index 17733361de4..49bec6f1e9e 100644 --- a/src/test/run-pass/issue2378c.rs +++ b/src/test/run-pass/issue2378c.rs @@ -10,7 +10,6 @@ // aux-build:issue2378a.rs // aux-build:issue2378b.rs -// ignore-fast - check-fast doesn't understand aux-build extern crate issue2378a; extern crate issue2378b; diff --git a/src/test/run-pass/issue_3136_b.rs b/src/test/run-pass/issue_3136_b.rs index 4144e0c85c8..a6fb993a96b 100644 --- a/src/test/run-pass/issue_3136_b.rs +++ b/src/test/run-pass/issue_3136_b.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast - check-fast doesn't understand aux-build // aux-build:issue_3136_a.rc extern crate issue_3136_a; diff --git a/src/test/run-pass/issue_9155.rs b/src/test/run-pass/issue_9155.rs index 09a6693eb4c..951cde3264b 100644 --- a/src/test/run-pass/issue_9155.rs +++ b/src/test/run-pass/issue_9155.rs @@ -9,7 +9,6 @@ // except according to those terms. // aux-build:issue_9155.rs -// ignore-fast check-fast doesn't like the aux-build extern crate issue_9155; diff --git a/src/test/run-pass/istr.rs b/src/test/run-pass/istr.rs index b8d56f761b8..67cb87145db 100644 --- a/src/test/run-pass/istr.rs +++ b/src/test/run-pass/istr.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +use std::strbuf::StrBuf; + fn test_stack_assign() { let s: ~str = ~"a"; println!("{}", s.clone()); @@ -43,21 +45,21 @@ fn test_heap_add() { } fn test_append() { - let mut s = ~""; + let mut s = StrBuf::new(); s.push_str("a"); - assert_eq!(s, ~"a"); + assert_eq!(s.as_slice(), "a"); - let mut s = ~"a"; + let mut s = StrBuf::from_str("a"); s.push_str("b"); println!("{}", s.clone()); - assert_eq!(s, ~"ab"); + assert_eq!(s.as_slice(), "ab"); - let mut s = ~"c"; + let mut s = StrBuf::from_str("c"); s.push_str("offee"); - assert!(s == ~"coffee"); + assert!(s.as_slice() == "coffee"); s.push_str("&tea"); - assert!(s == ~"coffee&tea"); + assert!(s.as_slice() == "coffee&tea"); } pub fn main() { diff --git a/src/test/run-pass/item-attributes.rs b/src/test/run-pass/item-attributes.rs index ae5a86c699e..e873221cf26 100644 --- a/src/test/run-pass/item-attributes.rs +++ b/src/test/run-pass/item-attributes.rs @@ -157,7 +157,7 @@ mod test_other_forms { mod test_foreign_items { pub mod rustrt { - use std::libc; + extern crate libc; extern { #![attr] diff --git a/src/test/run-pass/kinds-in-metadata.rs b/src/test/run-pass/kinds-in-metadata.rs index 05f58acd949..233db83d289 100644 --- a/src/test/run-pass/kinds-in-metadata.rs +++ b/src/test/run-pass/kinds-in-metadata.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:kinds_in_metadata.rs /* Any copyright is dedicated to the Public Domain. diff --git a/src/test/run-pass/lang-item-public.rs b/src/test/run-pass/lang-item-public.rs index 6256449b122..23e48b97427 100644 --- a/src/test/run-pass/lang-item-public.rs +++ b/src/test/run-pass/lang-item-public.rs @@ -9,10 +9,10 @@ // except according to those terms. // aux-build:lang-item-public.rs -// ignore-fast // ignore-android +// ignore-win32 #13361 -#[no_std]; +#![no_std] extern crate lang_lib = "lang-item-public"; diff --git a/src/test/run-pass/last-use-in-cap-clause.rs b/src/test/run-pass/last-use-in-cap-clause.rs index b72ef59075c..ec26dc0b3ed 100644 --- a/src/test/run-pass/last-use-in-cap-clause.rs +++ b/src/test/run-pass/last-use-in-cap-clause.rs @@ -12,10 +12,10 @@ struct A { a: ~int } -fn foo() -> 'static || -> int { +fn foo() -> ||: 'static -> int { let k = ~22; let _u = A {a: k.clone()}; - let result: 'static || -> int = || 22; + let result: ||: 'static -> int = || 22; result } diff --git a/src/test/run-pass/linkage-visibility.rs b/src/test/run-pass/linkage-visibility.rs index e4c0d023298..e263767990a 100644 --- a/src/test/run-pass/linkage-visibility.rs +++ b/src/test/run-pass/linkage-visibility.rs @@ -9,7 +9,6 @@ // except according to those terms. // aux-build:linkage-visibility.rs -// ignore-fast check-fast doesn't like 'extern crate' // ignore-android: FIXME(#10379) // ignore-win32: std::unstable::dynamic_lib does not work on win32 well diff --git a/src/test/run-pass/linkage1.rs b/src/test/run-pass/linkage1.rs index 4b2c9861493..2eafd34afca 100644 --- a/src/test/run-pass/linkage1.rs +++ b/src/test/run-pass/linkage1.rs @@ -9,7 +9,6 @@ // except according to those terms. // ignore-win32 -// ignore-fast // ignore-android // ignore-macos // aux-build:linkage1.rs diff --git a/src/test/run-pass/lint-cstack.rs b/src/test/run-pass/lint-cstack.rs index 5d89a2d5b3c..2194453aac2 100644 --- a/src/test/run-pass/lint-cstack.rs +++ b/src/test/run-pass/lint-cstack.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::libc; +extern crate libc; extern { fn rust_get_test_int() -> libc::intptr_t; diff --git a/src/test/run-pass/lint-non-camel-case-types-non-uppercase-statics-unicode.rs b/src/test/run-pass/lint-non-camel-case-types-non-uppercase-statics-unicode.rs index 76c5a199bdb..f755d85020f 100644 --- a/src/test/run-pass/lint-non-camel-case-types-non-uppercase-statics-unicode.rs +++ b/src/test/run-pass/lint-non-camel-case-types-non-uppercase-statics-unicode.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast feature doesn't work. #[forbid(non_camel_case_types)]; #[forbid(non_uppercase_statics)]; diff --git a/src/test/run-pass/log-knows-the-names-of-variants-in-std.rs b/src/test/run-pass/log-knows-the-names-of-variants-in-std.rs index 7e120658aae..52528828506 100644 --- a/src/test/run-pass/log-knows-the-names-of-variants-in-std.rs +++ b/src/test/run-pass/log-knows-the-names-of-variants-in-std.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at diff --git a/src/test/run-pass/log_syntax-trace_macros-macro-locations.rs b/src/test/run-pass/log_syntax-trace_macros-macro-locations.rs index a00ba6067dc..afcd154f647 100644 --- a/src/test/run-pass/log_syntax-trace_macros-macro-locations.rs +++ b/src/test/run-pass/log_syntax-trace_macros-macro-locations.rs @@ -8,8 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast feature doesn't work -#[feature(trace_macros, log_syntax)]; +#![feature(trace_macros, log_syntax)] // make sure these macros can be used as in the various places that // macros can occur. diff --git a/src/test/run-pass/logging-enabled-debug.rs b/src/test/run-pass/logging-enabled-debug.rs index f5db1c7b1d6..9320c77a285 100644 --- a/src/test/run-pass/logging-enabled-debug.rs +++ b/src/test/run-pass/logging-enabled-debug.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // compile-flags:--cfg ndebug // exec-env:RUST_LOG=logging-enabled-debug=debug diff --git a/src/test/run-pass/logging-enabled.rs b/src/test/run-pass/logging-enabled.rs index 31437586897..b1d24e8b9b6 100644 --- a/src/test/run-pass/logging-enabled.rs +++ b/src/test/run-pass/logging-enabled.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // exec-env:RUST_LOG=logging-enabled=info #![feature(phase)] diff --git a/src/test/run-pass/logging-only-prints-once.rs b/src/test/run-pass/logging-only-prints-once.rs index d582b770602..396b633b633 100644 --- a/src/test/run-pass/logging-only-prints-once.rs +++ b/src/test/run-pass/logging-only-prints-once.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast +// ignore-win32 // exec-env:RUST_LOG=debug use std::cell::Cell; diff --git a/src/test/run-pass/logging-right-crate.rs b/src/test/run-pass/logging-right-crate.rs index 68afcc98bba..31c2ae891e0 100644 --- a/src/test/run-pass/logging-right-crate.rs +++ b/src/test/run-pass/logging-right-crate.rs @@ -9,7 +9,6 @@ // except according to those terms. // aux-build:logging_right_crate.rs -// ignore-fast // exec-env:RUST_LOG=logging-right-crate=debug // This is a test for issue #3046 to make sure that when we monomorphize a diff --git a/src/test/run-pass/logging_before_rt_started.rs b/src/test/run-pass/logging_before_rt_started.rs index 4c659706b5b..8a21d60e468 100644 --- a/src/test/run-pass/logging_before_rt_started.rs +++ b/src/test/run-pass/logging_before_rt_started.rs @@ -9,7 +9,6 @@ // except according to those terms. // exec-env:RUST_LOG=std::ptr -// ignore-fast this would cause everything to print forever on check-fast... // In issue #9487, it was realized that std::ptr was invoking the logging // infrastructure, and when std::ptr was used during runtime initialization, diff --git a/src/test/run-pass/macro-crate-def-only.rs b/src/test/run-pass/macro-crate-def-only.rs index 75b001a71d2..abf8edc274c 100644 --- a/src/test/run-pass/macro-crate-def-only.rs +++ b/src/test/run-pass/macro-crate-def-only.rs @@ -9,7 +9,6 @@ // except according to those terms. // aux-build:macro_crate_def_only.rs -// ignore-fast #![feature(phase)] diff --git a/src/test/run-pass/macro-export-inner-module.rs b/src/test/run-pass/macro-export-inner-module.rs index d77b360336c..179c65cd046 100644 --- a/src/test/run-pass/macro-export-inner-module.rs +++ b/src/test/run-pass/macro-export-inner-module.rs @@ -10,7 +10,6 @@ //aux-build:macro_export_inner_module.rs //ignore-stage1 -//ignore-fast #![feature(phase)] diff --git a/src/test/run-pass/macro-meta-items.rs b/src/test/run-pass/macro-meta-items.rs index cfcde320d99..91f67abd8af 100644 --- a/src/test/run-pass/macro-meta-items.rs +++ b/src/test/run-pass/macro-meta-items.rs @@ -8,11 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // ignore-pretty - token trees can't pretty print // compile-flags: --cfg foo -#[feature(macro_rules)]; +#![feature(macro_rules)] macro_rules! compiles_fine { ($at:meta) => { diff --git a/src/test/run-pass/macro-with-attrs1.rs b/src/test/run-pass/macro-with-attrs1.rs index 57f63cdd7a5..48e6b09a90a 100644 --- a/src/test/run-pass/macro-with-attrs1.rs +++ b/src/test/run-pass/macro-with-attrs1.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast check-fast doesn't like compile-flags // compile-flags: --cfg foo #[feature(macro_rules)]; diff --git a/src/test/run-pass/mod-view-items.rs b/src/test/run-pass/mod-view-items.rs index b05a5702910..8a546a729d5 100644 --- a/src/test/run-pass/mod-view-items.rs +++ b/src/test/run-pass/mod-view-items.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at diff --git a/src/test/run-pass/mod_dir_implicit.rs b/src/test/run-pass/mod_dir_implicit.rs index 31691446289..1b89464c543 100644 --- a/src/test/run-pass/mod_dir_implicit.rs +++ b/src/test/run-pass/mod_dir_implicit.rs @@ -9,7 +9,6 @@ // except according to those terms. // ignore-pretty -// ignore-fast mod mod_dir_implicit_aux; diff --git a/src/test/run-pass/mod_dir_path.rs b/src/test/run-pass/mod_dir_path.rs index 612d0337619..e0327a1dcd4 100644 --- a/src/test/run-pass/mod_dir_path.rs +++ b/src/test/run-pass/mod_dir_path.rs @@ -9,7 +9,6 @@ // except according to those terms. // ignore-pretty -// ignore-fast mod mod_dir_simple { #[path = "test.rs"] diff --git a/src/test/run-pass/mod_dir_path2.rs b/src/test/run-pass/mod_dir_path2.rs index 54e17167663..2b5e67a6e83 100644 --- a/src/test/run-pass/mod_dir_path2.rs +++ b/src/test/run-pass/mod_dir_path2.rs @@ -9,7 +9,6 @@ // except according to those terms. // ignore-pretty -// ignore-fast #[path = "mod_dir_simple"] mod pancakes { diff --git a/src/test/run-pass/mod_dir_path3.rs b/src/test/run-pass/mod_dir_path3.rs index 0cbe2eed7c4..d6037bef6e5 100644 --- a/src/test/run-pass/mod_dir_path3.rs +++ b/src/test/run-pass/mod_dir_path3.rs @@ -9,7 +9,6 @@ // except according to those terms. // ignore-pretty -// ignore-fast #[path = "mod_dir_simple"] mod pancakes { diff --git a/src/test/run-pass/mod_dir_path_multi.rs b/src/test/run-pass/mod_dir_path_multi.rs index 0785e49396c..f1bf83ed767 100644 --- a/src/test/run-pass/mod_dir_path_multi.rs +++ b/src/test/run-pass/mod_dir_path_multi.rs @@ -9,7 +9,6 @@ // except according to those terms. // ignore-pretty -// ignore-fast #[path = "mod_dir_simple"] mod biscuits { diff --git a/src/test/run-pass/mod_dir_recursive.rs b/src/test/run-pass/mod_dir_recursive.rs index c9561a04c34..d7121ef7690 100644 --- a/src/test/run-pass/mod_dir_recursive.rs +++ b/src/test/run-pass/mod_dir_recursive.rs @@ -9,7 +9,6 @@ // except according to those terms. // ignore-pretty -// ignore-fast // Testing that the parser for each file tracks its modules // and paths independently. The load_another_mod module should diff --git a/src/test/run-pass/mod_dir_simple.rs b/src/test/run-pass/mod_dir_simple.rs index f6212fc8c3e..41c810b6fdd 100644 --- a/src/test/run-pass/mod_dir_simple.rs +++ b/src/test/run-pass/mod_dir_simple.rs @@ -9,7 +9,6 @@ // except according to those terms. // ignore-pretty -// ignore-fast mod mod_dir_simple { pub mod test; diff --git a/src/test/run-pass/monad.rs b/src/test/run-pass/monad.rs index 47f1fcc2934..6b508bc0ae7 100644 --- a/src/test/run-pass/monad.rs +++ b/src/test/run-pass/monad.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast trait vec_monad<A> { diff --git a/src/test/run-pass/morestack6.rs b/src/test/run-pass/morestack6.rs index 440acbcf4da..f1ba95b5efe 100644 --- a/src/test/run-pass/morestack6.rs +++ b/src/test/run-pass/morestack6.rs @@ -18,7 +18,7 @@ extern crate rand; use std::task; mod rustrt { - use std::libc; + extern crate libc; extern { pub fn debug_get_stk_seg() -> *u8; diff --git a/src/test/run-pass/move-out-of-field.rs b/src/test/run-pass/move-out-of-field.rs index 2041c69cecc..42b61695d60 100644 --- a/src/test/run-pass/move-out-of-field.rs +++ b/src/test/run-pass/move-out-of-field.rs @@ -8,8 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +use std::strbuf::StrBuf; + struct StringBuffer { - s: ~str + s: StrBuf, } impl StringBuffer { @@ -18,14 +20,16 @@ impl StringBuffer { } } -fn to_str(sb: StringBuffer) -> ~str { +fn to_str(sb: StringBuffer) -> StrBuf { sb.s } pub fn main() { - let mut sb = StringBuffer {s: ~""}; + let mut sb = StringBuffer { + s: StrBuf::new(), + }; sb.append("Hello, "); sb.append("World!"); let str = to_str(sb); - assert_eq!(str, ~"Hello, World!"); + assert_eq!(str.as_slice(), "Hello, World!"); } diff --git a/src/test/run-pass/moves-based-on-type-cross-crate.rs b/src/test/run-pass/moves-based-on-type-cross-crate.rs index abccd11d8b9..16f15804e0e 100644 --- a/src/test/run-pass/moves-based-on-type-cross-crate.rs +++ b/src/test/run-pass/moves-based-on-type-cross-crate.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:moves_based_on_type_lib.rs extern crate moves_based_on_type_lib; diff --git a/src/test/run-pass/native-always-waits.rs b/src/test/run-pass/native-always-waits.rs index 18a64c8bd5b..94a4308ab08 100644 --- a/src/test/run-pass/native-always-waits.rs +++ b/src/test/run-pass/native-always-waits.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // ignore-android (FIXME #11419) extern crate native; diff --git a/src/test/run-pass/native-print-no-runtime.rs b/src/test/run-pass/native-print-no-runtime.rs index 150435959e4..bf1a97f84b6 100644 --- a/src/test/run-pass/native-print-no-runtime.rs +++ b/src/test/run-pass/native-print-no-runtime.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast #[start] pub fn main(_: int, _: **u8) -> int { diff --git a/src/test/run-pass/nested_item_main.rs b/src/test/run-pass/nested_item_main.rs index 5fe1cd7fa55..d73fba56143 100644 --- a/src/test/run-pass/nested_item_main.rs +++ b/src/test/run-pass/nested_item_main.rs @@ -9,7 +9,6 @@ // except according to those terms. // aux-build:nested_item.rs -// ignore-fast extern crate nested_item; diff --git a/src/test/run-pass/newtype-struct-with-dtor.rs b/src/test/run-pass/newtype-struct-with-dtor.rs index ca79c304802..8631755f37f 100644 --- a/src/test/run-pass/newtype-struct-with-dtor.rs +++ b/src/test/run-pass/newtype-struct-with-dtor.rs @@ -8,8 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::libc::c_int; -use std::libc; +// ignore-fast doesn't like extern crate + +extern crate libc; +use libc::c_int; pub struct Fd(c_int); diff --git a/src/test/run-pass/newtype-struct-xc-2.rs b/src/test/run-pass/newtype-struct-xc-2.rs index 9aec3f2c4f7..0302a0588e4 100644 --- a/src/test/run-pass/newtype-struct-xc-2.rs +++ b/src/test/run-pass/newtype-struct-xc-2.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:newtype_struct_xc.rs extern crate newtype_struct_xc; diff --git a/src/test/run-pass/newtype-struct-xc.rs b/src/test/run-pass/newtype-struct-xc.rs index 98a55f29758..3e375c48316 100644 --- a/src/test/run-pass/newtype-struct-xc.rs +++ b/src/test/run-pass/newtype-struct-xc.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:newtype_struct_xc.rs extern crate newtype_struct_xc; diff --git a/src/test/run-pass/no-landing-pads.rs b/src/test/run-pass/no-landing-pads.rs index 799ad538c8d..bc7987f4a27 100644 --- a/src/test/run-pass/no-landing-pads.rs +++ b/src/test/run-pass/no-landing-pads.rs @@ -9,7 +9,6 @@ // except according to those terms. // compile-flags: -Z no-landing-pads -// ignore-fast use std::task; diff --git a/src/test/run-pass/once-move-out-on-heap.rs b/src/test/run-pass/once-move-out-on-heap.rs index d27cce4dd36..99580619a23 100644 --- a/src/test/run-pass/once-move-out-on-heap.rs +++ b/src/test/run-pass/once-move-out-on-heap.rs @@ -10,7 +10,6 @@ // Testing guarantees provided by once functions. -// ignore-fast #[feature(once_fns)]; extern crate sync; diff --git a/src/test/run-pass/once-move-out-on-stack.rs b/src/test/run-pass/once-move-out-on-stack.rs index f14827c7245..02fe2ff023c 100644 --- a/src/test/run-pass/once-move-out-on-stack.rs +++ b/src/test/run-pass/once-move-out-on-stack.rs @@ -10,9 +10,8 @@ // Testing guarantees provided by once functions. -// ignore-fast -#[feature(once_fns)]; +#![feature(once_fns)] extern crate sync; use sync::Arc; diff --git a/src/test/run-pass/operator-overloading.rs b/src/test/run-pass/operator-overloading.rs index c6819971e35..66783ad78e5 100644 --- a/src/test/run-pass/operator-overloading.rs +++ b/src/test/run-pass/operator-overloading.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast use std::cmp; use std::ops; diff --git a/src/test/run-pass/osx-frameworks.rs b/src/test/run-pass/osx-frameworks.rs index 5e45386353b..aa4e91320f7 100644 --- a/src/test/run-pass/osx-frameworks.rs +++ b/src/test/run-pass/osx-frameworks.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::libc; +extern crate libc; #[cfg(target_os = "macos")] #[link(name = "CoreFoundation", kind = "framework")] diff --git a/src/test/run-pass/out-of-stack.rs b/src/test/run-pass/out-of-stack.rs index 00861bd9b21..fd761082346 100644 --- a/src/test/run-pass/out-of-stack.rs +++ b/src/test/run-pass/out-of-stack.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast - #![feature(asm)] use std::io::Process; @@ -43,12 +41,12 @@ fn main() { } else { let silent = Process::output(args[0], [~"silent"]).unwrap(); assert!(!silent.status.success()); - let error = str::from_utf8_lossy(silent.error); + let error = str::from_utf8_lossy(silent.error.as_slice()); assert!(error.as_slice().contains("has overflowed its stack")); let loud = Process::output(args[0], [~"loud"]).unwrap(); assert!(!loud.status.success()); - let error = str::from_utf8_lossy(silent.error); + let error = str::from_utf8_lossy(silent.error.as_slice()); assert!(error.as_slice().contains("has overflowed its stack")); } } diff --git a/src/test/run-pass/overloaded-autoderef-xcrate.rs b/src/test/run-pass/overloaded-autoderef-xcrate.rs index fc969093d23..f8dd729ec67 100644 --- a/src/test/run-pass/overloaded-autoderef-xcrate.rs +++ b/src/test/run-pass/overloaded-autoderef-xcrate.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:overloaded_autoderef_xc.rs extern crate overloaded_autoderef_xc; diff --git a/src/test/run-pass/overloaded-autoderef.rs b/src/test/run-pass/overloaded-autoderef.rs index 6b347b3833e..6c66938af51 100644 --- a/src/test/run-pass/overloaded-autoderef.rs +++ b/src/test/run-pass/overloaded-autoderef.rs @@ -10,6 +10,7 @@ use std::cell::RefCell; use std::rc::Rc; +use std::strbuf::StrBuf; #[deriving(Eq, Show)] struct Point { @@ -33,7 +34,7 @@ pub fn main() { assert!(s.equiv(&("foo"))); assert_eq!(s.as_slice(), "foo"); - let mut_s = Rc::new(RefCell::new(~"foo")); + let mut_s = Rc::new(RefCell::new(StrBuf::from_str("foo"))); mut_s.borrow_mut().push_str("bar"); // HACK assert_eq! would fail here because it stores the LHS and RHS in two locals. assert!(mut_s.borrow().as_slice() == "foobar"); diff --git a/src/test/run-pass/overloaded-deref.rs b/src/test/run-pass/overloaded-deref.rs index aa9a66daed7..27edb2f0088 100644 --- a/src/test/run-pass/overloaded-deref.rs +++ b/src/test/run-pass/overloaded-deref.rs @@ -10,6 +10,7 @@ use std::cell::RefCell; use std::rc::Rc; +use std::strbuf::StrBuf; #[deriving(Eq, Show)] struct Point { @@ -31,7 +32,7 @@ pub fn main() { assert_eq!(*s, ~"foo"); assert_eq!((*s).as_slice(), "foo"); - let mut_s = Rc::new(RefCell::new(~"foo")); + let mut_s = Rc::new(RefCell::new(StrBuf::from_str("foo"))); (*(*mut_s).borrow_mut()).push_str("bar"); // assert_eq! would fail here because it stores the LHS and RHS in two locals. assert!((*(*mut_s).borrow()).as_slice() == "foobar"); diff --git a/src/test/run-pass/packed-struct-size-xc.rs b/src/test/run-pass/packed-struct-size-xc.rs index 2ee90eb2c4c..c2968956785 100644 --- a/src/test/run-pass/packed-struct-size-xc.rs +++ b/src/test/run-pass/packed-struct-size-xc.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:packed.rs extern crate packed; diff --git a/src/test/run-pass/phase-use-ignored.rs b/src/test/run-pass/phase-use-ignored.rs index 008a04eaa49..60f2619fffd 100644 --- a/src/test/run-pass/phase-use-ignored.rs +++ b/src/test/run-pass/phase-use-ignored.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast #![feature(phase)] diff --git a/src/test/run-pass/placement-new-arena.rs b/src/test/run-pass/placement-new-arena.rs index 876d9d2a690..1ca7e5aa3c4 100644 --- a/src/test/run-pass/placement-new-arena.rs +++ b/src/test/run-pass/placement-new-arena.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at diff --git a/src/test/run-pass/priv-impl-prim-ty.rs b/src/test/run-pass/priv-impl-prim-ty.rs index 4c7160a8eee..6af18992636 100644 --- a/src/test/run-pass/priv-impl-prim-ty.rs +++ b/src/test/run-pass/priv-impl-prim-ty.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:priv-impl-prim-ty.rs extern crate bar = "priv-impl-prim-ty"; diff --git a/src/test/run-pass/privacy-ns.rs b/src/test/run-pass/privacy-ns.rs index bc7df6bb599..6cdd0201a90 100644 --- a/src/test/run-pass/privacy-ns.rs +++ b/src/test/run-pass/privacy-ns.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // Check we do the correct privacy checks when we import a name and there is an // item with that name in both the value and type namespaces. diff --git a/src/test/run-pass/privacy-reexport.rs b/src/test/run-pass/privacy-reexport.rs index e9450d1e77d..b40aacdafc1 100644 --- a/src/test/run-pass/privacy-reexport.rs +++ b/src/test/run-pass/privacy-reexport.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:privacy_reexport.rs extern crate privacy_reexport; diff --git a/src/test/run-pass/proc-bounds.rs b/src/test/run-pass/proc-bounds.rs index 900e266584b..c103e087363 100644 --- a/src/test/run-pass/proc-bounds.rs +++ b/src/test/run-pass/proc-bounds.rs @@ -17,18 +17,18 @@ fn is_static<T: 'static>() {} pub fn main() { foo::<proc()>(); - foo::<proc:()>(); - foo::<proc:Send()>(); - foo::<proc:Send + Share()>(); - foo::<proc:'static + Send + Share()>(); + foo::<proc()>(); + foo::<proc():Send>(); + foo::<proc():Send + Share>(); + foo::<proc():'static + Send + Share>(); - is_send::<proc:Send()>(); - is_freeze::<proc:Share()>(); - is_static::<proc:'static()>(); + is_send::<proc():Send>(); + is_freeze::<proc():Share>(); + is_static::<proc():'static>(); let a = 3; - bar::<proc:()>(proc() { + bar::<proc():>(proc() { let b = &a; println!("{}", *b); }); diff --git a/src/test/run-pass/process-detach.rs b/src/test/run-pass/process-detach.rs index 3b80d9ce491..16cc414c0d9 100644 --- a/src/test/run-pass/process-detach.rs +++ b/src/test/run-pass/process-detach.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // ignore-win32 // ignore-android @@ -22,8 +21,8 @@ extern crate green; extern crate rustuv; +extern crate libc; -use std::libc; use std::io::process; use std::io::signal::{Listener, Interrupt}; diff --git a/src/test/run-pass/pub-use-xcrate.rs b/src/test/run-pass/pub-use-xcrate.rs index 2d4f5f743b8..cdc184898fd 100644 --- a/src/test/run-pass/pub-use-xcrate.rs +++ b/src/test/run-pass/pub-use-xcrate.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:pub_use_xcrate1.rs // aux-build:pub_use_xcrate2.rs diff --git a/src/test/run-pass/pub_use_mods_xcrate_exe.rs b/src/test/run-pass/pub_use_mods_xcrate_exe.rs index 87185e39aa9..a973598228d 100644 --- a/src/test/run-pass/pub_use_mods_xcrate_exe.rs +++ b/src/test/run-pass/pub_use_mods_xcrate_exe.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:pub_use_mods_xcrate.rs #[allow(unused_imports)]; diff --git a/src/test/run-pass/rec-align-u32.rs b/src/test/run-pass/rec-align-u32.rs index 49e0faf4693..ab56fac61b3 100644 --- a/src/test/run-pass/rec-align-u32.rs +++ b/src/test/run-pass/rec-align-u32.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast: check-fast screws up repr paths // Issue #2303 diff --git a/src/test/run-pass/rec-align-u64.rs b/src/test/run-pass/rec-align-u64.rs index 16d1a0c464c..3d3a4c53b97 100644 --- a/src/test/run-pass/rec-align-u64.rs +++ b/src/test/run-pass/rec-align-u64.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast: check-fast screws up repr paths // Issue #2303 diff --git a/src/test/run-pass/reexport-should-still-link.rs b/src/test/run-pass/reexport-should-still-link.rs index 0c22fcb44e9..c63d50d898c 100644 --- a/src/test/run-pass/reexport-should-still-link.rs +++ b/src/test/run-pass/reexport-should-still-link.rs @@ -9,7 +9,6 @@ // except according to those terms. // aux-build:reexport-should-still-link.rs -// ignore-fast check-fast doesn't like extern crate extern crate foo = "reexport-should-still-link"; diff --git a/src/test/run-pass/reexport-star.rs b/src/test/run-pass/reexport-star.rs index 3b7696b548a..6617ff08d1c 100644 --- a/src/test/run-pass/reexport-star.rs +++ b/src/test/run-pass/reexport-star.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at diff --git a/src/test/run-pass/reexported-static-methods-cross-crate.rs b/src/test/run-pass/reexported-static-methods-cross-crate.rs index b3a7cf74428..05abb95c117 100644 --- a/src/test/run-pass/reexported-static-methods-cross-crate.rs +++ b/src/test/run-pass/reexported-static-methods-cross-crate.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:reexported_static_methods.rs extern crate reexported_static_methods; diff --git a/src/test/run-pass/reflect-visit-type.rs b/src/test/run-pass/reflect-visit-type.rs index 36049bc0a18..ca0b5fd0703 100644 --- a/src/test/run-pass/reflect-visit-type.rs +++ b/src/test/run-pass/reflect-visit-type.rs @@ -73,8 +73,6 @@ impl TyVisitor for MyVisitor { fn visit_ptr(&mut self, _mtbl: uint, _inner: *TyDesc) -> bool { true } fn visit_rptr(&mut self, _mtbl: uint, _inner: *TyDesc) -> bool { true } - fn visit_vec(&mut self, _mtbl: uint, _inner: *TyDesc) -> bool { true } - fn visit_unboxed_vec(&mut self, _mtbl: uint, _inner: *TyDesc) -> bool { true } fn visit_evec_box(&mut self, _mtbl: uint, _inner: *TyDesc) -> bool { true } fn visit_evec_uniq(&mut self, _mtbl: uint, inner: *TyDesc) -> bool { self.types.push(~"["); diff --git a/src/test/run-pass/regions-copy-closure.rs b/src/test/run-pass/regions-copy-closure.rs index 55cb5c62684..ac40fb885a1 100644 --- a/src/test/run-pass/regions-copy-closure.rs +++ b/src/test/run-pass/regions-copy-closure.rs @@ -9,10 +9,10 @@ // except according to those terms. struct closure_box<'a> { - cl: 'a ||, + cl: ||: 'a, } -fn box_it<'r>(x: 'r ||) -> closure_box<'r> { +fn box_it<'r>(x: ||: 'r) -> closure_box<'r> { closure_box {cl: x} } diff --git a/src/test/run-pass/regions-dependent-autofn.rs b/src/test/run-pass/regions-dependent-autofn.rs index b50930dd294..e9cd7fb4973 100644 --- a/src/test/run-pass/regions-dependent-autofn.rs +++ b/src/test/run-pass/regions-dependent-autofn.rs @@ -11,9 +11,9 @@ // Test lifetimes are linked properly when we autoslice a vector. // Issue #3148. -fn subslice<'r>(v: 'r ||) -> 'r || { v } +fn subslice<'r>(v: ||: 'r) -> ||: 'r { v } -fn both<'r>(v: 'r ||) -> 'r || { +fn both<'r>(v: ||: 'r) -> ||: 'r { subslice(subslice(v)) } diff --git a/src/test/run-pass/regions-mock-tcx.rs b/src/test/run-pass/regions-mock-tcx.rs index c38df0f7a22..fabf4b7b428 100644 --- a/src/test/run-pass/regions-mock-tcx.rs +++ b/src/test/run-pass/regions-mock-tcx.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast `use` standards don't resolve // Test a sample usage pattern for regions. Makes use of the // following features: @@ -18,11 +17,11 @@ extern crate arena; extern crate collections; +extern crate libc; use arena::Arena; use collections::HashMap; use std::cast; -use std::libc; use std::mem; type Type<'tcx> = &'tcx TypeStructure<'tcx>; diff --git a/src/test/run-pass/regions-mock-trans.rs b/src/test/run-pass/regions-mock-trans.rs index 8cac6e8558f..b0198d56e05 100644 --- a/src/test/run-pass/regions-mock-trans.rs +++ b/src/test/run-pass/regions-mock-trans.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +extern crate libc; use std::cast; -use std::libc; use std::mem; struct arena(()); diff --git a/src/test/run-pass/regions-params.rs b/src/test/run-pass/regions-params.rs index 9f204182514..b83d7af9a11 100644 --- a/src/test/run-pass/regions-params.rs +++ b/src/test/run-pass/regions-params.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast fn region_identity<'r>(x: &'r uint) -> &'r uint { x } diff --git a/src/test/run-pass/regions-static-closure.rs b/src/test/run-pass/regions-static-closure.rs index ff4b43cb6b5..d91c11dde10 100644 --- a/src/test/run-pass/regions-static-closure.rs +++ b/src/test/run-pass/regions-static-closure.rs @@ -9,10 +9,10 @@ // except according to those terms. struct closure_box<'a> { - cl: 'a ||, + cl: ||: 'a, } -fn box_it<'r>(x: 'r ||) -> closure_box<'r> { +fn box_it<'r>(x: ||: 'r) -> closure_box<'r> { closure_box {cl: x} } diff --git a/src/test/run-pass/rename-directory.rs b/src/test/run-pass/rename-directory.rs index ef43dad2c68..8411ef32963 100644 --- a/src/test/run-pass/rename-directory.rs +++ b/src/test/run-pass/rename-directory.rs @@ -11,11 +11,10 @@ // This test can't be a unit test in std, // because it needs TempDir, which is in extra -// ignore-fast +extern crate libc; use std::io::TempDir; use std::os; -use std::libc; use std::io; use std::io::fs; diff --git a/src/test/run-pass/self-shadowing-import.rs b/src/test/run-pass/self-shadowing-import.rs index 98a3709a61a..19fdd04069e 100644 --- a/src/test/run-pass/self-shadowing-import.rs +++ b/src/test/run-pass/self-shadowing-import.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at diff --git a/src/test/run-pass/sendfn-is-a-block.rs b/src/test/run-pass/sendfn-is-a-block.rs index 23c936b1a01..3f94c7c8e54 100644 --- a/src/test/run-pass/sendfn-is-a-block.rs +++ b/src/test/run-pass/sendfn-is-a-block.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast fn test(f: |uint| -> uint) -> uint { return f(22u); diff --git a/src/test/run-pass/sendfn-spawn-with-fn-arg.rs b/src/test/run-pass/sendfn-spawn-with-fn-arg.rs index ac3dd80c383..a62c1ec3314 100644 --- a/src/test/run-pass/sendfn-spawn-with-fn-arg.rs +++ b/src/test/run-pass/sendfn-spawn-with-fn-arg.rs @@ -18,7 +18,7 @@ fn test05_start(f: proc(int)) { fn test05() { let three = ~3; - let fn_to_send: proc:Send(int) = proc(n) { + let fn_to_send: proc(int):Send = proc(n) { println!("{}", *three + n); // will copy x into the closure assert_eq!(*three, 3); }; diff --git a/src/test/run-pass/signal-exit-status.rs b/src/test/run-pass/signal-exit-status.rs index 2658755cea1..944174c1d8c 100644 --- a/src/test/run-pass/signal-exit-status.rs +++ b/src/test/run-pass/signal-exit-status.rs @@ -18,7 +18,7 @@ // option. this file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast calling itself doesn't work on check-fast +// ignore-win32 use std::os; use std::io::process::{Process, ExitSignal, ExitStatus}; diff --git a/src/test/run-pass/sigpipe-should-be-ignored.rs b/src/test/run-pass/sigpipe-should-be-ignored.rs index 5c62ea2ad21..957bcd0e423 100644 --- a/src/test/run-pass/sigpipe-should-be-ignored.rs +++ b/src/test/run-pass/sigpipe-should-be-ignored.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast - // Be sure that when a SIGPIPE would have been received that the entire process // doesn't die in a ball of fire, but rather it's gracefully handled. diff --git a/src/test/run-pass/simd-generics.rs b/src/test/run-pass/simd-generics.rs index 75062a46224..68c210b018a 100644 --- a/src/test/run-pass/simd-generics.rs +++ b/src/test/run-pass/simd-generics.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast #![feature(simd)] diff --git a/src/test/run-pass/simd-issue-10604.rs b/src/test/run-pass/simd-issue-10604.rs index 4e3c3afc5ad..2e533e3b263 100644 --- a/src/test/run-pass/simd-issue-10604.rs +++ b/src/test/run-pass/simd-issue-10604.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast #![allow(experimental)] #![feature(simd)] diff --git a/src/test/run-pass/simd-type.rs b/src/test/run-pass/simd-type.rs index c79f285e486..a1a74578112 100644 --- a/src/test/run-pass/simd-type.rs +++ b/src/test/run-pass/simd-type.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast feature doesn't work #![feature(simd)] diff --git a/src/test/run-pass/smallest-hello-world.rs b/src/test/run-pass/smallest-hello-world.rs index 2c128636dcb..d3c7a948e24 100644 --- a/src/test/run-pass/smallest-hello-world.rs +++ b/src/test/run-pass/smallest-hello-world.rs @@ -9,7 +9,6 @@ // except according to those terms. // ignore-test - FIXME(#8538) some kind of problem linking induced by extern "C" fns -// ignore-fast - check-fast doesn't like this // Smallest hello world with no runtime diff --git a/src/test/run-pass/spawning-with-debug.rs b/src/test/run-pass/spawning-with-debug.rs index db8dc0f64c4..df6bf767b9d 100644 --- a/src/test/run-pass/spawning-with-debug.rs +++ b/src/test/run-pass/spawning-with-debug.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-win32 // exec-env:RUST_LOG=debug -// ignore-fast // regression test for issue #10405, make sure we don't call println! too soon. diff --git a/src/test/run-pass/stat.rs b/src/test/run-pass/stat.rs index 96e76c798ff..d9eae02670f 100644 --- a/src/test/run-pass/stat.rs +++ b/src/test/run-pass/stat.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast use std::io::{File, TempDir}; diff --git a/src/test/run-pass/static-fn-inline-xc.rs b/src/test/run-pass/static-fn-inline-xc.rs index f679de04ba2..0d591998bc9 100644 --- a/src/test/run-pass/static-fn-inline-xc.rs +++ b/src/test/run-pass/static-fn-inline-xc.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:static_fn_inline_xc_aux.rs extern crate mycore = "static_fn_inline_xc_aux"; diff --git a/src/test/run-pass/static-fn-trait-xc.rs b/src/test/run-pass/static-fn-trait-xc.rs index 5643429d8e3..32a4046884d 100644 --- a/src/test/run-pass/static-fn-trait-xc.rs +++ b/src/test/run-pass/static-fn-trait-xc.rs @@ -9,7 +9,6 @@ // except according to those terms. // aux-build:static_fn_trait_xc_aux.rs -// ignore-fast extern crate mycore = "static_fn_trait_xc_aux"; diff --git a/src/test/run-pass/static-function-pointer-xc.rs b/src/test/run-pass/static-function-pointer-xc.rs index 8471b633792..8e5539ff8dc 100644 --- a/src/test/run-pass/static-function-pointer-xc.rs +++ b/src/test/run-pass/static-function-pointer-xc.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:static-function-pointer-aux.rs extern crate aux = "static-function-pointer-aux"; diff --git a/src/test/run-pass/static-impl.rs b/src/test/run-pass/static-impl.rs index ae547d417f0..065d069ff33 100644 --- a/src/test/run-pass/static-impl.rs +++ b/src/test/run-pass/static-impl.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast pub trait plus { diff --git a/src/test/run-pass/static-method-xcrate.rs b/src/test/run-pass/static-method-xcrate.rs index db3f61567d8..8d3f28b1e2e 100644 --- a/src/test/run-pass/static-method-xcrate.rs +++ b/src/test/run-pass/static-method-xcrate.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:static-methods-crate.rs extern crate static_methods_crate; diff --git a/src/test/run-pass/static-mut-foreign.rs b/src/test/run-pass/static-mut-foreign.rs index 0afe01bf7ed..4c88caa1d2c 100644 --- a/src/test/run-pass/static-mut-foreign.rs +++ b/src/test/run-pass/static-mut-foreign.rs @@ -12,7 +12,7 @@ // statics cannot. This ensures that there's some form of error if this is // attempted. -use std::libc; +extern crate libc; #[link(name = "rustrt")] extern { diff --git a/src/test/run-pass/static-mut-xc.rs b/src/test/run-pass/static-mut-xc.rs index c7b17d91a8f..5aa28ad80fa 100644 --- a/src/test/run-pass/static-mut-xc.rs +++ b/src/test/run-pass/static-mut-xc.rs @@ -12,7 +12,6 @@ // statics cannot. This ensures that there's some form of error if this is // attempted. -// ignore-fast // aux-build:static_mut_xc.rs extern crate static_mut_xc; diff --git a/src/test/run-pass/str-append.rs b/src/test/run-pass/str-append.rs deleted file mode 100644 index ad6e668524c..00000000000 --- a/src/test/run-pass/str-append.rs +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2012 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -fn test1() { - let mut s: ~str = ~"hello"; - s.push_str("world"); - println!("{}", s.clone()); - assert_eq!(s[9], 'd' as u8); -} - -fn test2() { - // This tests for issue #163 - - let ff: ~str = ~"abc"; - let a: ~str = ff + "ABC" + ff; - let b: ~str = ~"ABC" + ff + "ABC"; - println!("{}", a.clone()); - println!("{}", b.clone()); - assert_eq!(a, ~"abcABCabc"); - assert_eq!(b, ~"ABCabcABC"); -} - -pub fn main() { test1(); test2(); } diff --git a/src/test/run-pass/struct-destructuring-cross-crate.rs b/src/test/run-pass/struct-destructuring-cross-crate.rs index 31ba7149c29..2de2bcc9584 100644 --- a/src/test/run-pass/struct-destructuring-cross-crate.rs +++ b/src/test/run-pass/struct-destructuring-cross-crate.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:struct_destructuring_cross_crate.rs extern crate struct_destructuring_cross_crate; diff --git a/src/test/run-pass/struct_variant_xc.rs b/src/test/run-pass/struct_variant_xc.rs index c9cd64161b7..8b1b91a32b6 100644 --- a/src/test/run-pass/struct_variant_xc.rs +++ b/src/test/run-pass/struct_variant_xc.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast - check-fast doesn't understand aux-build // aux-build:struct_variant_xc_aux.rs extern crate struct_variant_xc_aux; diff --git a/src/test/run-pass/supported-cast.rs b/src/test/run-pass/supported-cast.rs index e3f2456c4c4..b87535713a7 100644 --- a/src/test/run-pass/supported-cast.rs +++ b/src/test/run-pass/supported-cast.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::libc; +extern crate libc; pub fn main() { let f = 1 as *libc::FILE; diff --git a/src/test/run-pass/syntax-extension-cfg.rs b/src/test/run-pass/syntax-extension-cfg.rs index 5695ed5d7d5..d09a4d990fd 100644 --- a/src/test/run-pass/syntax-extension-cfg.rs +++ b/src/test/run-pass/syntax-extension-cfg.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast compile-flags doesn't work with fast-check // compile-flags: --cfg foo --cfg bar(baz) --cfg qux="foo" pub fn main() { diff --git a/src/test/run-pass/tag-align-shape.rs b/src/test/run-pass/tag-align-shape.rs index 781a50b87a7..d032761eb0b 100644 --- a/src/test/run-pass/tag-align-shape.rs +++ b/src/test/run-pass/tag-align-shape.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast: check-fast screws up repr paths enum a_tag { a_tag(u64) diff --git a/src/test/run-pass/tag-exports.rs b/src/test/run-pass/tag-exports.rs index bc749b5d905..fa390954b97 100644 --- a/src/test/run-pass/tag-exports.rs +++ b/src/test/run-pass/tag-exports.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at diff --git a/src/test/run-pass/task-comm-0.rs b/src/test/run-pass/task-comm-0.rs index 55235974e13..469c1b868db 100644 --- a/src/test/run-pass/task-comm-0.rs +++ b/src/test/run-pass/task-comm-0.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast use std::task; diff --git a/src/test/run-pass/task-comm-10.rs b/src/test/run-pass/task-comm-10.rs index 6299cfdee20..17e1a72adc9 100644 --- a/src/test/run-pass/task-comm-10.rs +++ b/src/test/run-pass/task-comm-10.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast use std::task; diff --git a/src/test/run-pass/task-comm-11.rs b/src/test/run-pass/task-comm-11.rs index 254988c8b0e..719d8e8120e 100644 --- a/src/test/run-pass/task-comm-11.rs +++ b/src/test/run-pass/task-comm-11.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast use std::task; diff --git a/src/test/run-pass/task-comm-13.rs b/src/test/run-pass/task-comm-13.rs index 6d06578c6cd..3f3d6742971 100644 --- a/src/test/run-pass/task-comm-13.rs +++ b/src/test/run-pass/task-comm-13.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast use std::task; diff --git a/src/test/run-pass/task-comm-14.rs b/src/test/run-pass/task-comm-14.rs index 9559e5c84af..3f20495f652 100644 --- a/src/test/run-pass/task-comm-14.rs +++ b/src/test/run-pass/task-comm-14.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast use std::task; diff --git a/src/test/run-pass/task-comm-15.rs b/src/test/run-pass/task-comm-15.rs index 355f179ad17..fe4c233224d 100644 --- a/src/test/run-pass/task-comm-15.rs +++ b/src/test/run-pass/task-comm-15.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast use std::task; diff --git a/src/test/run-pass/task-comm-3.rs b/src/test/run-pass/task-comm-3.rs index a239a2de78a..c2f6fe580fc 100644 --- a/src/test/run-pass/task-comm-3.rs +++ b/src/test/run-pass/task-comm-3.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast use std::task; diff --git a/src/test/run-pass/task-comm-7.rs b/src/test/run-pass/task-comm-7.rs index 5d918a4c88f..121740bb6a2 100644 --- a/src/test/run-pass/task-comm-7.rs +++ b/src/test/run-pass/task-comm-7.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast #[allow(dead_assignment)]; diff --git a/src/test/run-pass/task-comm-9.rs b/src/test/run-pass/task-comm-9.rs index a4e6be4f2d5..009b013353c 100644 --- a/src/test/run-pass/task-comm-9.rs +++ b/src/test/run-pass/task-comm-9.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast use std::task; diff --git a/src/test/run-pass/tcp-stress.rs b/src/test/run-pass/tcp-stress.rs index d18e2ac7354..063ffed3151 100644 --- a/src/test/run-pass/tcp-stress.rs +++ b/src/test/run-pass/tcp-stress.rs @@ -9,18 +9,25 @@ // except according to those terms. // ignore-linux see joyent/libuv#1189 -// ignore-fast // ignore-android needs extra network permissions // exec-env:RUST_LOG=debug #![feature(phase)] #[phase(syntax, link)] extern crate log; +extern crate libc; +extern crate green; +extern crate rustuv; -use std::libc; use std::io::net::ip::{Ipv4Addr, SocketAddr}; use std::io::net::tcp::{TcpListener, TcpStream}; use std::io::{Acceptor, Listener}; +use std::task; + +#[start] +fn start(argc: int, argv: **u8) -> int { + green::start(argc, argv, rustuv::event_loop, main) +} fn main() { // This test has a chance to time out, try to not let it time out @@ -54,7 +61,9 @@ fn main() { let (tx, rx) = channel(); for _ in range(0, 1000) { let tx = tx.clone(); - spawn(proc() { + let mut builder = task::task(); + builder.opts.stack_size = Some(32 * 1024); + builder.spawn(proc() { match TcpStream::connect(addr) { Ok(stream) => { let mut stream = stream; diff --git a/src/test/run-pass/tempfile.rs b/src/test/run-pass/tempfile.rs index e2806421518..437d6faea38 100644 --- a/src/test/run-pass/tempfile.rs +++ b/src/test/run-pass/tempfile.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast check-fast doesn't like 'extern crate' // ignore-win32 TempDir may cause IoError on windows: #10463 // These tests are here to exercise the functionality of the `tempfile` module. @@ -36,7 +35,7 @@ fn test_tempdir() { fn test_rm_tempdir() { let (tx, rx) = channel(); - let f: proc:Send() = proc() { + let f: proc():Send = proc() { let tmp = TempDir::new("test_rm_tempdir").unwrap(); tx.send(tmp.path().clone()); fail!("fail to unwind past `tmp`"); @@ -47,7 +46,7 @@ fn test_rm_tempdir() { let tmp = TempDir::new("test_rm_tempdir").unwrap(); let path = tmp.path().clone(); - let f: proc:Send() = proc() { + let f: proc():Send = proc() { let _tmp = tmp; fail!("fail to unwind past `tmp`"); }; diff --git a/src/test/run-pass/test-ignore-cfg.rs b/src/test/run-pass/test-ignore-cfg.rs index ba131569bc4..54546560c14 100644 --- a/src/test/run-pass/test-ignore-cfg.rs +++ b/src/test/run-pass/test-ignore-cfg.rs @@ -9,7 +9,6 @@ // except according to those terms. // compile-flags: --test --cfg ignorecfg -// ignore-fast #[test] #[ignore(cfg(ignorecfg))] diff --git a/src/test/run-pass/test-runner-hides-main.rs b/src/test/run-pass/test-runner-hides-main.rs index 3781a60fcfe..954d88c0bdc 100644 --- a/src/test/run-pass/test-runner-hides-main.rs +++ b/src/test/run-pass/test-runner-hides-main.rs @@ -9,7 +9,6 @@ // except according to those terms. // compile-flags:--test -// ignore-fast // ignore-win32 #10872 // Building as a test runner means that a synthetic main will be run, diff --git a/src/test/run-pass/trait-bounds-in-arc.rs b/src/test/run-pass/trait-bounds-in-arc.rs index 3deb0b7527d..a3049de663e 100644 --- a/src/test/run-pass/trait-bounds-in-arc.rs +++ b/src/test/run-pass/trait-bounds-in-arc.rs @@ -13,7 +13,6 @@ // Tests that a heterogeneous list of existential types can be put inside an Arc // and shared between tasks as long as all types fulfill Send. -// ignore-fast extern crate sync; diff --git a/src/test/run-pass/trait-default-method-xc-2.rs b/src/test/run-pass/trait-default-method-xc-2.rs index ccd7c9b8a3a..9e4a7c4be97 100644 --- a/src/test/run-pass/trait-default-method-xc-2.rs +++ b/src/test/run-pass/trait-default-method-xc-2.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:trait_default_method_xc_aux.rs // aux-build:trait_default_method_xc_aux_2.rs diff --git a/src/test/run-pass/trait-default-method-xc.rs b/src/test/run-pass/trait-default-method-xc.rs index 0974efa00ee..25b5b7fbd5f 100644 --- a/src/test/run-pass/trait-default-method-xc.rs +++ b/src/test/run-pass/trait-default-method-xc.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:trait_default_method_xc_aux.rs extern crate aux = "trait_default_method_xc_aux"; diff --git a/src/test/run-pass/trait-generic.rs b/src/test/run-pass/trait-generic.rs index a2c945436d3..41f83c46f0b 100644 --- a/src/test/run-pass/trait-generic.rs +++ b/src/test/run-pass/trait-generic.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast trait to_str { diff --git a/src/test/run-pass/trait-inheritance-auto-xc-2.rs b/src/test/run-pass/trait-inheritance-auto-xc-2.rs index bf6c429b6c8..5944106ad50 100644 --- a/src/test/run-pass/trait-inheritance-auto-xc-2.rs +++ b/src/test/run-pass/trait-inheritance-auto-xc-2.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:trait_inheritance_auto_xc_2_aux.rs extern crate aux = "trait_inheritance_auto_xc_2_aux"; diff --git a/src/test/run-pass/trait-inheritance-auto-xc.rs b/src/test/run-pass/trait-inheritance-auto-xc.rs index ef72611e76f..09c58316611 100644 --- a/src/test/run-pass/trait-inheritance-auto-xc.rs +++ b/src/test/run-pass/trait-inheritance-auto-xc.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:trait_inheritance_auto_xc_aux.rs extern crate aux = "trait_inheritance_auto_xc_aux"; diff --git a/src/test/run-pass/trait-inheritance-cross-trait-call-xc.rs b/src/test/run-pass/trait-inheritance-cross-trait-call-xc.rs index cdc0c5a80a9..0afd91c5857 100644 --- a/src/test/run-pass/trait-inheritance-cross-trait-call-xc.rs +++ b/src/test/run-pass/trait-inheritance-cross-trait-call-xc.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:trait_inheritance_cross_trait_call_xc_aux.rs extern crate aux = "trait_inheritance_cross_trait_call_xc_aux"; diff --git a/src/test/run-pass/trait-inheritance-num.rs b/src/test/run-pass/trait-inheritance-num.rs index 3c3198379be..a611a55896e 100644 --- a/src/test/run-pass/trait-inheritance-num.rs +++ b/src/test/run-pass/trait-inheritance-num.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at diff --git a/src/test/run-pass/trait-inheritance-num0.rs b/src/test/run-pass/trait-inheritance-num0.rs index 273de361c4b..51d889d1098 100644 --- a/src/test/run-pass/trait-inheritance-num0.rs +++ b/src/test/run-pass/trait-inheritance-num0.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at diff --git a/src/test/run-pass/trait-inheritance-num2.rs b/src/test/run-pass/trait-inheritance-num2.rs index 2bfe11d23a3..3edf0c52619 100644 --- a/src/test/run-pass/trait-inheritance-num2.rs +++ b/src/test/run-pass/trait-inheritance-num2.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at diff --git a/src/test/run-pass/trait-inheritance-overloading-xc-exe.rs b/src/test/run-pass/trait-inheritance-overloading-xc-exe.rs index faadc68f135..7760395bf1c 100644 --- a/src/test/run-pass/trait-inheritance-overloading-xc-exe.rs +++ b/src/test/run-pass/trait-inheritance-overloading-xc-exe.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast - check-fast doesn't understand aux-build // aux-build:trait_inheritance_overloading_xc.rs extern crate trait_inheritance_overloading_xc; diff --git a/src/test/run-pass/trait-static-method-overwriting.rs b/src/test/run-pass/trait-static-method-overwriting.rs index 8f515d7fac1..a8cea24db0c 100644 --- a/src/test/run-pass/trait-static-method-overwriting.rs +++ b/src/test/run-pass/trait-static-method-overwriting.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at diff --git a/src/test/run-pass/trait-to-str.rs b/src/test/run-pass/trait-to-str.rs index 1cd31195b56..98afa043249 100644 --- a/src/test/run-pass/trait-to-str.rs +++ b/src/test/run-pass/trait-to-str.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast trait to_str { diff --git a/src/test/run-pass/tydesc-name.rs b/src/test/run-pass/tydesc-name.rs index 42ce18dccaf..4f473755cb6 100644 --- a/src/test/run-pass/tydesc-name.rs +++ b/src/test/run-pass/tydesc-name.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast: check-fast screws up repr paths use std::intrinsics::get_tydesc; diff --git a/src/test/run-pass/type-param-constraints.rs b/src/test/run-pass/type-param-constraints.rs index c86cb10fa05..1f615dc6cec 100644 --- a/src/test/run-pass/type-param-constraints.rs +++ b/src/test/run-pass/type-param-constraints.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast #[feature(managed_boxes)]; diff --git a/src/test/run-pass/typeid-intrinsic.rs b/src/test/run-pass/typeid-intrinsic.rs index c874fbb7a8b..90f0767534b 100644 --- a/src/test/run-pass/typeid-intrinsic.rs +++ b/src/test/run-pass/typeid-intrinsic.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast check-fast doesn't like aux-build // aux-build:typeid-intrinsic.rs // aux-build:typeid-intrinsic2.rs diff --git a/src/test/run-pass/uniq-cc-generic.rs b/src/test/run-pass/uniq-cc-generic.rs index 78fa7520f33..3c164d3e2da 100644 --- a/src/test/run-pass/uniq-cc-generic.rs +++ b/src/test/run-pass/uniq-cc-generic.rs @@ -19,10 +19,10 @@ enum maybe_pointy { struct Pointy { a : maybe_pointy, - d : proc:Send() -> uint, + d : proc():Send -> uint, } -fn make_uniq_closure<A:Send>(a: A) -> proc:Send() -> uint { +fn make_uniq_closure<A:Send>(a: A) -> proc():Send -> uint { proc() { &a as *A as uint } } diff --git a/src/test/run-pass/uniq-cc.rs b/src/test/run-pass/uniq-cc.rs index aa048a239db..6c273199c6f 100644 --- a/src/test/run-pass/uniq-cc.rs +++ b/src/test/run-pass/uniq-cc.rs @@ -20,7 +20,7 @@ enum maybe_pointy { struct Pointy { a : maybe_pointy, c : ~int, - d : proc:Send()->(), + d : proc():Send->(), } fn empty_pointy() -> @RefCell<Pointy> { diff --git a/src/test/run-pass/unwind-resource.rs b/src/test/run-pass/unwind-resource.rs index 2d05eb22196..13370ea340f 100644 --- a/src/test/run-pass/unwind-resource.rs +++ b/src/test/run-pass/unwind-resource.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast use std::task; diff --git a/src/test/run-pass/use.rs b/src/test/run-pass/use.rs index fb021411508..8b4e47a5562 100644 --- a/src/test/run-pass/use.rs +++ b/src/test/run-pass/use.rs @@ -1,4 +1,3 @@ -// ignore-fast // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at @@ -10,7 +9,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast #[allow(unused_imports)]; diff --git a/src/test/run-pass/use_inline_dtor.rs b/src/test/run-pass/use_inline_dtor.rs index 9cb11c10e3e..18cb478be38 100644 --- a/src/test/run-pass/use_inline_dtor.rs +++ b/src/test/run-pass/use_inline_dtor.rs @@ -9,7 +9,6 @@ // except according to those terms. // aux-build:inline_dtor.rs -// ignore-fast extern crate inline_dtor; diff --git a/src/test/run-pass/utf8_chars.rs b/src/test/run-pass/utf8_chars.rs index cac2619f35c..a418cd0ae02 100644 --- a/src/test/run-pass/utf8_chars.rs +++ b/src/test/run-pass/utf8_chars.rs @@ -38,14 +38,4 @@ pub fn main() { assert!((!str::is_utf8([0xf0_u8, 0x10_u8]))); assert!((!str::is_utf8([0xf0_u8, 0xff_u8, 0x10_u8]))); assert!((!str::is_utf8([0xf0_u8, 0xff_u8, 0xff_u8, 0x10_u8]))); - - let mut stack = ~"a×c€"; - assert_eq!(stack.pop_char(), Some('€')); - assert_eq!(stack.pop_char(), Some('c')); - stack.push_char('u'); - assert!(stack == ~"a×u"); - assert_eq!(stack.shift_char(), Some('a')); - assert_eq!(stack.shift_char(), Some('×')); - stack.unshift_char('ß'); - assert!(stack == ~"ßu"); } diff --git a/src/test/run-pass/utf8_idents.rs b/src/test/run-pass/utf8_idents.rs index 9197f147874..640a02c1535 100644 --- a/src/test/run-pass/utf8_idents.rs +++ b/src/test/run-pass/utf8_idents.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast feature doesn't work. #[feature(non_ascii_idents)]; diff --git a/src/test/run-pass/variadic-ffi.rs b/src/test/run-pass/variadic-ffi.rs index 9cb2f22d38e..903b76a29ce 100644 --- a/src/test/run-pass/variadic-ffi.rs +++ b/src/test/run-pass/variadic-ffi.rs @@ -8,8 +8,11 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +extern crate libc; use std::c_str::CString; -use std::libc::{c_char, c_int}; +use libc::{c_char, c_int}; + +// ignore-fast doesn't like extern crate extern { fn sprintf(s: *mut c_char, format: *c_char, ...) -> c_int; diff --git a/src/test/run-pass/str-growth.rs b/src/test/run-pass/vec-macro-with-trailing-comma.rs index 0cdf1841331..07033d60497 100644 --- a/src/test/run-pass/str-growth.rs +++ b/src/test/run-pass/vec-macro-with-trailing-comma.rs @@ -1,4 +1,4 @@ -// Copyright 2012 The Rust Project Developers. See the COPYRIGHT +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -9,16 +9,7 @@ // except according to those terms. - pub fn main() { - let mut s = ~"a"; - s.push_char('b'); - assert_eq!(s[0], 'a' as u8); - assert_eq!(s[1], 'b' as u8); - s.push_char('c'); - s.push_char('d'); - assert_eq!(s[0], 'a' as u8); - assert_eq!(s[1], 'b' as u8); - assert_eq!(s[2], 'c' as u8); - assert_eq!(s[3], 'd' as u8); + assert_eq!(vec!(1), vec!(1,)); + assert_eq!(vec!(1, 2, 3), vec!(1, 2, 3,)); } diff --git a/src/test/run-pass/vector-sort-failure-safe.rs b/src/test/run-pass/vector-sort-failure-safe.rs index 0190355e127..00bc95b36f7 100644 --- a/src/test/run-pass/vector-sort-failure-safe.rs +++ b/src/test/run-pass/vector-sort-failure-safe.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast #7103 `extern crate` does not work on check-fast extern crate rand; use std::task; diff --git a/src/test/run-pass/while-prelude-drop.rs b/src/test/run-pass/while-prelude-drop.rs index 503e37fcd76..358d296de49 100644 --- a/src/test/run-pass/while-prelude-drop.rs +++ b/src/test/run-pass/while-prelude-drop.rs @@ -8,13 +8,14 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +use std::strbuf::StrBuf; #[deriving(Eq)] -enum t { a, b(~str), } +enum t { a, b(StrBuf), } fn make(i: int) -> t { if i > 10 { return a; } - let mut s = ~"hello"; + let mut s = StrBuf::from_str("hello"); // Ensure s is non-const. s.push_str("there"); diff --git a/src/test/run-pass/xcrate-address-insignificant.rs b/src/test/run-pass/xcrate-address-insignificant.rs index b231b859a06..ddb83dedcc0 100644 --- a/src/test/run-pass/xcrate-address-insignificant.rs +++ b/src/test/run-pass/xcrate-address-insignificant.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast check-fast doesn't like aux-build // aux-build:xcrate_address_insignificant.rs extern crate foo = "xcrate_address_insignificant"; diff --git a/src/test/run-pass/xcrate-static-addresses.rs b/src/test/run-pass/xcrate-static-addresses.rs index d3184968ee6..634c9623e84 100644 --- a/src/test/run-pass/xcrate-static-addresses.rs +++ b/src/test/run-pass/xcrate-static-addresses.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:xcrate_static_addresses.rs extern crate xcrate_static_addresses; diff --git a/src/test/run-pass/xcrate-trait-lifetime-param.rs b/src/test/run-pass/xcrate-trait-lifetime-param.rs index b5aae62841f..56d6b4eae94 100644 --- a/src/test/run-pass/xcrate-trait-lifetime-param.rs +++ b/src/test/run-pass/xcrate-trait-lifetime-param.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-fast // aux-build:xcrate-trait-lifetime-param.rs extern crate other = "xcrate-trait-lifetime-param"; diff --git a/src/test/run-pass/xcrate-unit-struct.rs b/src/test/run-pass/xcrate-unit-struct.rs index 3a440037cf8..ae8d628289d 100644 --- a/src/test/run-pass/xcrate-unit-struct.rs +++ b/src/test/run-pass/xcrate-unit-struct.rs @@ -9,7 +9,6 @@ // except according to those terms. // aux-build:xcrate_unit_struct.rs -// ignore-fast extern crate xcrate_unit_struct; static s1: xcrate_unit_struct::Struct = xcrate_unit_struct::Struct; |
