Add appropriate #[feature] directives to tests
This commit is contained in:
parent
dd98f7089f
commit
3396365cab
108 changed files with 174 additions and 44 deletions
|
@ -40,6 +40,7 @@ c = open("tmp/run_pass_stage2.rc", "w")
|
||||||
i = 0
|
i = 0
|
||||||
c.write("// AUTO-GENERATED FILE: DO NOT EDIT\n")
|
c.write("// AUTO-GENERATED FILE: DO NOT EDIT\n")
|
||||||
c.write("#[link(name=\"run_pass_stage2\", vers=\"0.1\")];\n")
|
c.write("#[link(name=\"run_pass_stage2\", vers=\"0.1\")];\n")
|
||||||
|
c.write("#[feature(globs, macro_rules, struct_variant)];\n")
|
||||||
for t in stage2_tests:
|
for t in stage2_tests:
|
||||||
p = os.path.join(run_pass, t)
|
p = os.path.join(run_pass, t)
|
||||||
p = p.replace("\\", "\\\\")
|
p = p.replace("\\", "\\\\")
|
||||||
|
@ -51,6 +52,7 @@ c.close()
|
||||||
|
|
||||||
d = open("tmp/run_pass_stage2_driver.rs", "w")
|
d = open("tmp/run_pass_stage2_driver.rs", "w")
|
||||||
d.write("// AUTO-GENERATED FILE: DO NOT EDIT\n")
|
d.write("// AUTO-GENERATED FILE: DO NOT EDIT\n")
|
||||||
|
d.write("#[feature(globs)];\n")
|
||||||
d.write("extern mod extra;\n")
|
d.write("extern mod extra;\n")
|
||||||
d.write("extern mod run_pass_stage2;\n")
|
d.write("extern mod run_pass_stage2;\n")
|
||||||
d.write("use run_pass_stage2::*;\n")
|
d.write("use run_pass_stage2::*;\n")
|
||||||
|
|
|
@ -63,6 +63,7 @@ while cur < len(lines):
|
||||||
#[ allow(unused_variable) ];\n
|
#[ allow(unused_variable) ];\n
|
||||||
#[ allow(dead_assignment) ];\n
|
#[ allow(dead_assignment) ];\n
|
||||||
#[ allow(unused_mut) ];\n
|
#[ allow(unused_mut) ];\n
|
||||||
|
#[ feature(macro_rules, globs, struct_variant) ];\n
|
||||||
""" + block
|
""" + block
|
||||||
if xfail:
|
if xfail:
|
||||||
block = "// xfail-test\n" + block
|
block = "// xfail-test\n" + block
|
||||||
|
|
|
@ -159,7 +159,7 @@ pub fn phase_2_configure_and_expand(sess: Session,
|
||||||
*sess.building_library = session::building_library(sess.opts.crate_type,
|
*sess.building_library = session::building_library(sess.opts.crate_type,
|
||||||
&crate, sess.opts.test);
|
&crate, sess.opts.test);
|
||||||
|
|
||||||
time(time_passes, ~"gated feature checking", (), |_|
|
time(time_passes, "gated feature checking", (), |_|
|
||||||
front::feature_gate::check_crate(sess, &crate));
|
front::feature_gate::check_crate(sess, &crate));
|
||||||
|
|
||||||
// strip before expansion to allow macros to depend on
|
// strip before expansion to allow macros to depend on
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#[allow(unused_imports)];
|
#[allow(unused_imports)];
|
||||||
|
#[feature(globs)];
|
||||||
|
|
||||||
extern mod issue_2316_a;
|
extern mod issue_2316_a;
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,8 @@
|
||||||
vers = "0.1")];
|
vers = "0.1")];
|
||||||
#[crate_type = "lib"];
|
#[crate_type = "lib"];
|
||||||
|
|
||||||
|
#[feature(struct_variant)];
|
||||||
|
|
||||||
pub enum Enum {
|
pub enum Enum {
|
||||||
Variant { arg: u8 }
|
Variant { arg: u8 }
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
|
|
||||||
// Microbenchmarks for various functions in std and extra
|
// Microbenchmarks for various functions in std and extra
|
||||||
|
|
||||||
|
#[feature(macro_rules)];
|
||||||
|
|
||||||
extern mod extra;
|
extern mod extra;
|
||||||
|
|
||||||
use extra::time::precise_time_s;
|
use extra::time::precise_time_s;
|
||||||
|
|
|
@ -14,7 +14,7 @@ use std::os;
|
||||||
use std::uint;
|
use std::uint;
|
||||||
use std::rt::test::spawntask_later;
|
use std::rt::test::spawntask_later;
|
||||||
use std::cell::Cell;
|
use std::cell::Cell;
|
||||||
use std::comm::*;
|
use std::comm::oneshot;
|
||||||
|
|
||||||
// A simple implementation of parfib. One subtree is found in a new
|
// A simple implementation of parfib. One subtree is found in a new
|
||||||
// task and communicated over a oneshot pipe, the other is found
|
// task and communicated over a oneshot pipe, the other is found
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
extern mod extra;
|
extern mod extra;
|
||||||
|
|
||||||
use std::cell::Cell;
|
use std::cell::Cell;
|
||||||
use std::comm::*;
|
use std::comm::{stream, SharedChan};
|
||||||
use std::io;
|
use std::io;
|
||||||
use std::option;
|
use std::option;
|
||||||
use std::os;
|
use std::os;
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
extern mod extra;
|
extern mod extra;
|
||||||
|
|
||||||
use extra::{time, getopts};
|
use extra::{time, getopts};
|
||||||
use std::comm::*;
|
use std::comm::{stream, SharedChan};
|
||||||
use std::io::WriterUtil;
|
use std::io::WriterUtil;
|
||||||
use std::io;
|
use std::io;
|
||||||
use std::os;
|
use std::os;
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
// Creates in the background 'num_tasks' tasks, all blocked forever.
|
// Creates in the background 'num_tasks' tasks, all blocked forever.
|
||||||
// Doesn't return until all such tasks are ready, but doesn't block forever itself.
|
// Doesn't return until all such tasks are ready, but doesn't block forever itself.
|
||||||
|
|
||||||
use std::comm::*;
|
use std::comm::{stream, SharedChan};
|
||||||
use std::os;
|
use std::os;
|
||||||
use std::result;
|
use std::result;
|
||||||
use std::task;
|
use std::task;
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
|
#[feature(struct_variant)];
|
||||||
|
|
||||||
use std::num::FromPrimitive;
|
use std::num::FromPrimitive;
|
||||||
use std::int;
|
use std::int;
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
|
#[feature(struct_variant)];
|
||||||
|
|
||||||
enum Foo { C { a: int, b: int } }
|
enum Foo { C { a: int, b: int } }
|
||||||
struct C { a: int, b: int } //~ ERROR error: duplicate definition of type `C`
|
struct C { a: int, b: int } //~ ERROR error: duplicate definition of type `C`
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
// xfail-fast #7103
|
// xfail-fast #7103
|
||||||
extern mod extra;
|
extern mod extra;
|
||||||
use extra::arc::*;
|
use extra::arc::Arc;
|
||||||
|
|
||||||
struct A { y: Arc<int>, x: Arc<int> }
|
struct A { y: Arc<int>, x: Arc<int> }
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
|
|
||||||
// error-pattern: unresolved name
|
// error-pattern: unresolved name
|
||||||
|
|
||||||
|
#[feature(globs)];
|
||||||
|
|
||||||
use module_of_many_things::*;
|
use module_of_many_things::*;
|
||||||
|
|
||||||
mod module_of_many_things {
|
mod module_of_many_things {
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
|
|
||||||
// error-pattern: unresolved
|
// error-pattern: unresolved
|
||||||
|
|
||||||
|
#[feature(globs)];
|
||||||
|
|
||||||
mod circ1 {
|
mod circ1 {
|
||||||
pub use circ2::f2;
|
pub use circ2::f2;
|
||||||
pub fn f1() { info2!("f1"); }
|
pub fn f1() { info2!("f1"); }
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
|
|
||||||
// Testing that we don't fail abnormally after hitting the errors
|
// Testing that we don't fail abnormally after hitting the errors
|
||||||
|
|
||||||
|
#[feature(globs)];
|
||||||
|
|
||||||
use unresolved::*; //~ ERROR unresolved import. maybe a missing
|
use unresolved::*; //~ ERROR unresolved import. maybe a missing
|
||||||
//~^ ERROR failed to resolve import
|
//~^ ERROR failed to resolve import
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,8 @@
|
||||||
// ensures that 'use foo:*' doesn't import non-public 'use' statements in the
|
// ensures that 'use foo:*' doesn't import non-public 'use' statements in the
|
||||||
// module 'foo'
|
// module 'foo'
|
||||||
|
|
||||||
|
#[feature(globs)];
|
||||||
|
|
||||||
use m1::*;
|
use m1::*;
|
||||||
|
|
||||||
mod foo {
|
mod foo {
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
|
#[feature(macro_rules)];
|
||||||
|
|
||||||
use std::io;
|
use std::io;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
macro_rules! e( //~ ERROR unknown macro variable `nonexistent`
|
#[feature(macro_rules)];
|
||||||
|
|
||||||
|
// error-pattern: unknown macro variable `nonexistent`
|
||||||
|
|
||||||
|
macro_rules! e(
|
||||||
($inp:ident) => (
|
($inp:ident) => (
|
||||||
$nonexistent
|
$nonexistent
|
||||||
);
|
);
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
// When denying at the crate level, be sure to not get random warnings from the
|
// When denying at the crate level, be sure to not get random warnings from the
|
||||||
// injected intrinsics by the compiler.
|
// injected intrinsics by the compiler.
|
||||||
|
#[feature(struct_variant)];
|
||||||
#[deny(missing_doc)];
|
#[deny(missing_doc)];
|
||||||
|
|
||||||
struct Foo {
|
struct Foo {
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
// xfail-fast aux-build
|
// xfail-fast aux-build
|
||||||
// aux-build:lint_stability.rs
|
// aux-build:lint_stability.rs
|
||||||
|
|
||||||
|
#[feature(globs)];
|
||||||
#[deny(unstable)];
|
#[deny(unstable)];
|
||||||
#[deny(deprecated)];
|
#[deny(deprecated)];
|
||||||
#[deny(experimental)];
|
#[deny(experimental)];
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
|
#[feature(globs)];
|
||||||
#[deny(unused_imports)];
|
#[deny(unused_imports)];
|
||||||
|
|
||||||
mod A {
|
mod A {
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
|
#[feature(globs)];
|
||||||
#[deny(unused_imports)];
|
#[deny(unused_imports)];
|
||||||
|
|
||||||
use cal = bar::c::cc;
|
use cal = bar::c::cc;
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
|
#[feature(macro_rules)];
|
||||||
|
|
||||||
macro_rules! ignored_item {
|
macro_rules! ignored_item {
|
||||||
() => {
|
() => {
|
||||||
fn foo() {}
|
fn foo() {}
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#[feature(macro_rules)];
|
||||||
|
|
||||||
macro_rules! test ( ($nm:ident,
|
macro_rules! test ( ($nm:ident,
|
||||||
$a:attr,
|
$a:attr,
|
||||||
$i:item) => (mod $nm { $a; $i }); )
|
$i:item) => (mod $nm { $a; $i }); )
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#[feature(macro_rules)];
|
||||||
|
|
||||||
macro_rules! test ( ($nm:ident,
|
macro_rules! test ( ($nm:ident,
|
||||||
$a:attr,
|
$a:attr,
|
||||||
$i:item) => (mod $nm { $a $i }); )
|
$i:item) => (mod $nm { $a $i }); )
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
|
#[feature(globs)];
|
||||||
|
|
||||||
// error-pattern:declaration of `None` shadows
|
// error-pattern:declaration of `None` shadows
|
||||||
use std::option::*;
|
use std::option::*;
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
// xfail-fast
|
// xfail-fast
|
||||||
// aux-build:cci_class_5.rs
|
// aux-build:cci_class_5.rs
|
||||||
extern mod cci_class_5;
|
extern mod cci_class_5;
|
||||||
use cci_class_5::kitties::*;
|
use cci_class_5::kitties::cat;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let nyan : cat = cat(52, 99);
|
let nyan : cat = cat(52, 99);
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
// aux-build:cci_class.rs
|
// aux-build:cci_class.rs
|
||||||
extern mod cci_class;
|
extern mod cci_class;
|
||||||
use cci_class::kitties::*;
|
use cci_class::kitties::cat;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let nyan : cat = cat(52u, 99);
|
let nyan : cat = cat(52u, 99);
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
|
#[feature(struct_variant)];
|
||||||
|
|
||||||
enum A {
|
enum A {
|
||||||
B { x: Option<int> },
|
B { x: Option<int> },
|
||||||
C
|
C
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
// check:$3 = {4820353753753434}
|
// check:$3 = {4820353753753434}
|
||||||
|
|
||||||
#[allow(unused_variable)];
|
#[allow(unused_variable)];
|
||||||
|
#[feature(struct_variant)];
|
||||||
|
|
||||||
// The first element is to ensure proper alignment, irrespective of the machines word size. Since
|
// The first element is to ensure proper alignment, irrespective of the machines word size. Since
|
||||||
// the size of the discriminant value is machine dependent, this has be taken into account when
|
// the size of the discriminant value is machine dependent, this has be taken into account when
|
||||||
|
|
|
@ -41,6 +41,8 @@
|
||||||
// check:$7 = {{Case1, x = 0, y = 8970181431921507452}, {Case1, 0, 2088533116, 2088533116}}
|
// check:$7 = {{Case1, x = 0, y = 8970181431921507452}, {Case1, 0, 2088533116, 2088533116}}
|
||||||
// debugger:continue
|
// debugger:continue
|
||||||
|
|
||||||
|
#[feature(struct_variant)];
|
||||||
|
|
||||||
#[deriving(Clone)]
|
#[deriving(Clone)]
|
||||||
struct Struct {
|
struct Struct {
|
||||||
a: int,
|
a: int,
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
// check:$5 = 5
|
// check:$5 = 5
|
||||||
// debugger:continue
|
// debugger:continue
|
||||||
|
|
||||||
|
#[feature(struct_variant)];
|
||||||
|
|
||||||
struct Struct {
|
struct Struct {
|
||||||
x: int
|
x: int
|
||||||
|
|
|
@ -26,6 +26,8 @@
|
||||||
// debugger:print univariant
|
// debugger:print univariant
|
||||||
// check:$4 = {a = -1}
|
// check:$4 = {a = -1}
|
||||||
|
|
||||||
|
#[feature(struct_variant)];
|
||||||
|
|
||||||
// NOTE: This is a copy of the non-generic test case. The `Txx` type parameters have to be
|
// NOTE: This is a copy of the non-generic test case. The `Txx` type parameters have to be
|
||||||
// substituted with something of size `xx` bits and the same alignment as an integer type of the
|
// substituted with something of size `xx` bits and the same alignment as an integer type of the
|
||||||
// same size.
|
// same size.
|
||||||
|
|
|
@ -63,6 +63,8 @@
|
||||||
// check:$15 = 400
|
// check:$15 = 400
|
||||||
// debugger:continue
|
// debugger:continue
|
||||||
|
|
||||||
|
#[feature(macro_rules)];
|
||||||
|
|
||||||
macro_rules! trivial(
|
macro_rules! trivial(
|
||||||
($e1:expr) => ($e1)
|
($e1:expr) => ($e1)
|
||||||
)
|
)
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
// check:$3 = {-9747455}
|
// check:$3 = {-9747455}
|
||||||
|
|
||||||
#[allow(unused_variable)];
|
#[allow(unused_variable)];
|
||||||
|
#[feature(struct_variant)];
|
||||||
|
|
||||||
// The first element is to ensure proper alignment, irrespective of the machines word size. Since
|
// The first element is to ensure proper alignment, irrespective of the machines word size. Since
|
||||||
// the size of the discriminant value is machine dependent, this has be taken into account when
|
// the size of the discriminant value is machine dependent, this has be taken into account when
|
||||||
|
|
|
@ -92,6 +92,8 @@
|
||||||
// check:$21 = -16
|
// check:$21 = -16
|
||||||
// debugger:continue
|
// debugger:continue
|
||||||
|
|
||||||
|
#[feature(struct_variant)];
|
||||||
|
|
||||||
enum Enum {
|
enum Enum {
|
||||||
Variant1 { x: u16, y: u16 },
|
Variant1 { x: u16, y: u16 },
|
||||||
Variant2 (u32)
|
Variant2 (u32)
|
||||||
|
|
|
@ -33,6 +33,8 @@
|
||||||
|
|
||||||
// debugger:continue
|
// debugger:continue
|
||||||
|
|
||||||
|
#[feature(struct_variant)];
|
||||||
|
|
||||||
// If a struct has exactly two variants, one of them is empty, and the other one
|
// If a struct has exactly two variants, one of them is empty, and the other one
|
||||||
// contains a non-nullable pointer, then this value is used as the discriminator.
|
// contains a non-nullable pointer, then this value is used as the discriminator.
|
||||||
// The test cases in this file make sure that something readable is generated for
|
// The test cases in this file make sure that something readable is generated for
|
||||||
|
|
|
@ -99,6 +99,7 @@
|
||||||
// debugger:continue
|
// debugger:continue
|
||||||
|
|
||||||
#[allow(unused_variable)];
|
#[allow(unused_variable)];
|
||||||
|
#[feature(struct_variant)];
|
||||||
|
|
||||||
enum Opt<T> {
|
enum Opt<T> {
|
||||||
Empty,
|
Empty,
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
// check:$5 = 5
|
// check:$5 = 5
|
||||||
// debugger:continue
|
// debugger:continue
|
||||||
|
|
||||||
|
#[feature(struct_variant)];
|
||||||
|
|
||||||
struct Struct {
|
struct Struct {
|
||||||
x: int
|
x: int
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
// check:$4 = {a = -1}
|
// check:$4 = {a = -1}
|
||||||
|
|
||||||
#[allow(unused_variable)];
|
#[allow(unused_variable)];
|
||||||
|
#[feature(struct_variant)];
|
||||||
|
|
||||||
// The first element is to ensure proper alignment, irrespective of the machines word size. Since
|
// The first element is to ensure proper alignment, irrespective of the machines word size. Since
|
||||||
// the size of the discriminant value is machine dependent, this has be taken into account when
|
// the size of the discriminant value is machine dependent, this has be taken into account when
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
// check:$3 = {123234}
|
// check:$3 = {123234}
|
||||||
|
|
||||||
#[allow(unused_variable)];
|
#[allow(unused_variable)];
|
||||||
|
#[feature(struct_variant)];
|
||||||
|
|
||||||
// The first element is to ensure proper alignment, irrespective of the machines word size. Since
|
// The first element is to ensure proper alignment, irrespective of the machines word size. Since
|
||||||
// the size of the discriminant value is machine dependent, this has be taken into account when
|
// the size of the discriminant value is machine dependent, this has be taken into account when
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
// aux-build:anon-extern-mod-cross-crate-1.rs
|
// aux-build:anon-extern-mod-cross-crate-1.rs
|
||||||
extern mod anonexternmod;
|
extern mod anonexternmod;
|
||||||
|
|
||||||
use anonexternmod::*;
|
use anonexternmod::rust_get_test_int;
|
||||||
|
|
||||||
#[fixed_stack_segment]
|
#[fixed_stack_segment]
|
||||||
pub fn main() {
|
pub fn main() {
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
extern mod extra;
|
extern mod extra;
|
||||||
use extra::bitv::*;
|
use extra::bitv::Bitv;
|
||||||
|
|
||||||
fn bitv_test() {
|
fn bitv_test() {
|
||||||
let mut v1 = ~Bitv::new(31, false);
|
let mut v1 = ~Bitv::new(31, false);
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
// Check that we do not ICE when compiling this
|
// Check that we do not ICE when compiling this
|
||||||
// macro, which reuses the expression `$id`
|
// macro, which reuses the expression `$id`
|
||||||
|
|
||||||
|
#[feature(macro_rules)];
|
||||||
|
|
||||||
struct Foo {
|
struct Foo {
|
||||||
a: int
|
a: int
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
// xfail-fast - check-fast doesn't understand aux-build
|
// xfail-fast - check-fast doesn't understand aux-build
|
||||||
// aux-build:cci_nested_lib.rs
|
// aux-build:cci_nested_lib.rs
|
||||||
|
|
||||||
|
#[feature(globs)];
|
||||||
|
|
||||||
extern mod cci_nested_lib;
|
extern mod cci_nested_lib;
|
||||||
use cci_nested_lib::*;
|
use cci_nested_lib::*;
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
// check that cfg correctly chooses between the macro impls (see also
|
// check that cfg correctly chooses between the macro impls (see also
|
||||||
// cfg-macros-notfoo.rs)
|
// cfg-macros-notfoo.rs)
|
||||||
|
|
||||||
|
#[feature(macro_rules)];
|
||||||
|
|
||||||
#[cfg(foo)]
|
#[cfg(foo)]
|
||||||
#[macro_escape]
|
#[macro_escape]
|
||||||
mod foo {
|
mod foo {
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
// check that cfg correctly chooses between the macro impls (see also
|
// check that cfg correctly chooses between the macro impls (see also
|
||||||
// cfg-macros-foo.rs)
|
// cfg-macros-foo.rs)
|
||||||
|
|
||||||
|
#[feature(macro_rules)];
|
||||||
|
|
||||||
#[cfg(foo)]
|
#[cfg(foo)]
|
||||||
#[macro_escape]
|
#[macro_escape]
|
||||||
mod foo {
|
mod foo {
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
// aux-build:cci_class_cast.rs
|
// aux-build:cci_class_cast.rs
|
||||||
extern mod cci_class_cast;
|
extern mod cci_class_cast;
|
||||||
use std::to_str::ToStr;
|
use std::to_str::ToStr;
|
||||||
use cci_class_cast::kitty::*;
|
use cci_class_cast::kitty::cat;
|
||||||
|
|
||||||
fn print_out(thing: @ToStr, expected: ~str) {
|
fn print_out(thing: @ToStr, expected: ~str) {
|
||||||
let actual = thing.to_str();
|
let actual = thing.to_str();
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
/* Test that exporting a class also exports its
|
/* Test that exporting a class also exports its
|
||||||
public fields and methods */
|
public fields and methods */
|
||||||
|
|
||||||
use kitty::*;
|
use kitty::cat;
|
||||||
|
|
||||||
mod kitty {
|
mod kitty {
|
||||||
pub struct cat {
|
pub struct cat {
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
// xfail-fast
|
// xfail-fast
|
||||||
// aux-build:cci_class_trait.rs
|
// aux-build:cci_class_trait.rs
|
||||||
extern mod cci_class_trait;
|
extern mod cci_class_trait;
|
||||||
use cci_class_trait::animals::*;
|
use cci_class_trait::animals::noisy;
|
||||||
|
|
||||||
struct cat {
|
struct cat {
|
||||||
priv meows: uint,
|
priv meows: uint,
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
// xfail-fast
|
// xfail-fast
|
||||||
// aux-build:cci_class_2.rs
|
// aux-build:cci_class_2.rs
|
||||||
extern mod cci_class_2;
|
extern mod cci_class_2;
|
||||||
use cci_class_2::kitties::*;
|
use cci_class_2::kitties::cat;
|
||||||
|
|
||||||
pub fn main() {
|
pub fn main() {
|
||||||
let nyan : cat = cat(52u, 99);
|
let nyan : cat = cat(52u, 99);
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
// xfail-fast
|
// xfail-fast
|
||||||
// aux-build:cci_class_3.rs
|
// aux-build:cci_class_3.rs
|
||||||
extern mod cci_class_3;
|
extern mod cci_class_3;
|
||||||
use cci_class_3::kitties::*;
|
use cci_class_3::kitties::cat;
|
||||||
|
|
||||||
pub fn main() {
|
pub fn main() {
|
||||||
let mut nyan : cat = cat(52u, 99);
|
let mut nyan : cat = cat(52u, 99);
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
// xfail-fast
|
// xfail-fast
|
||||||
// aux-build:cci_class_6.rs
|
// aux-build:cci_class_6.rs
|
||||||
extern mod cci_class_6;
|
extern mod cci_class_6;
|
||||||
use cci_class_6::kitties::*;
|
use cci_class_6::kitties::cat;
|
||||||
|
|
||||||
pub fn main() {
|
pub fn main() {
|
||||||
let mut nyan : cat<char> = cat::<char>(52u, 99, ~['p']);
|
let mut nyan : cat<char> = cat::<char>(52u, 99, ~['p']);
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
// xfail-fast
|
// xfail-fast
|
||||||
// aux-build:cci_class_4.rs
|
// aux-build:cci_class_4.rs
|
||||||
extern mod cci_class_4;
|
extern mod cci_class_4;
|
||||||
use cci_class_4::kitties::*;
|
use cci_class_4::kitties::cat;
|
||||||
|
|
||||||
pub fn main() {
|
pub fn main() {
|
||||||
let mut nyan = cat(0u, 2, ~"nyan");
|
let mut nyan = cat(0u, 2, ~"nyan");
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
// xfail-fast
|
// xfail-fast
|
||||||
// aux-build:cci_class.rs
|
// aux-build:cci_class.rs
|
||||||
extern mod cci_class;
|
extern mod cci_class;
|
||||||
use cci_class::kitties::*;
|
use cci_class::kitties::cat;
|
||||||
|
|
||||||
pub fn main() {
|
pub fn main() {
|
||||||
let nyan : cat = cat(52u, 99);
|
let nyan : cat = cat(52u, 99);
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
|
#[feature(struct_variant)];
|
||||||
|
|
||||||
enum E {
|
enum E {
|
||||||
S0 { s: ~str },
|
S0 { s: ~str },
|
||||||
S1 { u: uint }
|
S1 { u: uint }
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
// instead of in std.
|
// instead of in std.
|
||||||
|
|
||||||
use std::libc;
|
use std::libc;
|
||||||
use std::run::*;
|
|
||||||
use std::run;
|
use std::run;
|
||||||
use std::str;
|
use std::str;
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
|
#[feature(struct_variant)];
|
||||||
|
|
||||||
#[deriving(Eq, TotalEq, Ord, TotalOrd)]
|
#[deriving(Eq, TotalEq, Ord, TotalOrd)]
|
||||||
enum ES<T> {
|
enum ES<T> {
|
||||||
ES1 { x: T },
|
ES1 { x: T },
|
||||||
|
|
|
@ -13,11 +13,13 @@
|
||||||
|
|
||||||
// xfail-fast
|
// xfail-fast
|
||||||
|
|
||||||
|
#[feature(struct_variant)];
|
||||||
|
|
||||||
extern mod extra;
|
extern mod extra;
|
||||||
|
|
||||||
use std::io;
|
use std::io;
|
||||||
use std::rand::{random, Rand};
|
use std::rand::{random, Rand};
|
||||||
use extra::serialize::*;
|
use extra::serialize::{Encodable, Decodable};
|
||||||
use extra::ebml;
|
use extra::ebml;
|
||||||
use extra::ebml::writer::Encoder;
|
use extra::ebml::writer::Encoder;
|
||||||
use extra::ebml::reader::Decoder;
|
use extra::ebml::reader::Decoder;
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
|
#[feature(struct_variant)];
|
||||||
|
|
||||||
use std::rand;
|
use std::rand;
|
||||||
|
|
||||||
#[deriving(Rand)]
|
#[deriving(Rand)]
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
|
#[feature(struct_variant)];
|
||||||
|
|
||||||
#[deriving(ToStr)]
|
#[deriving(ToStr)]
|
||||||
enum A {}
|
enum A {}
|
||||||
#[deriving(ToStr)]
|
#[deriving(ToStr)]
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#[feature(struct_variant)];
|
||||||
|
|
||||||
#[deriving(Eq)]
|
#[deriving(Eq)]
|
||||||
enum S {
|
enum S {
|
||||||
X { x: int, y: int },
|
X { x: int, y: int },
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#[allow(dead_assignment)];
|
#[allow(dead_assignment)];
|
||||||
#[allow(unused_variable)];
|
#[allow(unused_variable)];
|
||||||
|
#[feature(struct_variant)];
|
||||||
|
|
||||||
enum Animal {
|
enum Animal {
|
||||||
Dog (~str, f64),
|
Dog (~str, f64),
|
||||||
|
|
|
@ -15,6 +15,8 @@
|
||||||
|
|
||||||
// Modified to not use export since it's going away. --pcw
|
// Modified to not use export since it's going away. --pcw
|
||||||
|
|
||||||
|
#[feature(globs)];
|
||||||
|
|
||||||
mod foo {
|
mod foo {
|
||||||
use foo::bar::*;
|
use foo::bar::*;
|
||||||
pub mod bar {
|
pub mod bar {
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
extern mod extra;
|
extern mod extra;
|
||||||
|
|
||||||
use extra::getopts::*;
|
use extra::getopts::{optopt, getopts};
|
||||||
|
|
||||||
pub fn main() {
|
pub fn main() {
|
||||||
let args = ~[];
|
let args = ~[];
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
extern mod extra;
|
extern mod extra;
|
||||||
|
|
||||||
use extra::glob::*;
|
use extra::glob::glob;
|
||||||
use extra::tempfile;
|
use extra::tempfile;
|
||||||
use std::unstable::finally::Finally;
|
use std::unstable::finally::Finally;
|
||||||
use std::{io, os, unstable};
|
use std::{io, os, unstable};
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
pub fn map(filename: ~str, emit: map_reduce::putter) { emit(filename, ~"1"); }
|
pub fn map(filename: ~str, emit: map_reduce::putter) { emit(filename, ~"1"); }
|
||||||
|
|
||||||
mod map_reduce {
|
mod map_reduce {
|
||||||
use std::comm::*;
|
use std::comm::{stream, SharedChan};
|
||||||
use std::hashmap::HashMap;
|
use std::hashmap::HashMap;
|
||||||
use std::str;
|
use std::str;
|
||||||
use std::task;
|
use std::task;
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
// A test of the macro system. Can we do HTML literals?
|
// A test of the macro system. Can we do HTML literals?
|
||||||
|
|
||||||
|
#[feature(macro_rules)];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
// xfail-fast: check-fast screws up repr paths
|
// xfail-fast: check-fast screws up repr paths
|
||||||
|
|
||||||
|
#[feature(macro_rules)];
|
||||||
#[deny(warnings)];
|
#[deny(warnings)];
|
||||||
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
|
#[feature(globs)];
|
||||||
|
|
||||||
use module_of_many_things::*;
|
use module_of_many_things::*;
|
||||||
use dug::too::greedily::and::too::deep::*;
|
use dug::too::greedily::and::too::deep::*;
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
|
#[feature(globs)];
|
||||||
#[allow(dead_assignment)];
|
#[allow(dead_assignment)];
|
||||||
|
|
||||||
extern mod extra;
|
extern mod extra;
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
|
#[feature(globs)];
|
||||||
|
|
||||||
pub fn main() {
|
pub fn main() {
|
||||||
use std::util::replace;
|
use std::util::replace;
|
||||||
let mut x = 5;
|
let mut x = 5;
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
|
#[feature(globs)];
|
||||||
|
|
||||||
extern mod extra;
|
extern mod extra;
|
||||||
|
|
||||||
mod rusti {
|
mod rusti {
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
|
#[feature(globs)];
|
||||||
|
|
||||||
mod rusti {
|
mod rusti {
|
||||||
#[abi = "rust-intrinsic"]
|
#[abi = "rust-intrinsic"]
|
||||||
extern "rust-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
// xfail-fast
|
// xfail-fast
|
||||||
// aux-build:issue-2526.rs
|
// aux-build:issue-2526.rs
|
||||||
|
|
||||||
|
#[feature(globs)];
|
||||||
#[allow(unused_imports)];
|
#[allow(unused_imports)];
|
||||||
|
|
||||||
extern mod issue_2526;
|
extern mod issue_2526;
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
extern mod req;
|
extern mod req;
|
||||||
|
|
||||||
use req::*;
|
use req::request;
|
||||||
use std::hashmap::HashMap;
|
use std::hashmap::HashMap;
|
||||||
|
|
||||||
pub fn main() {
|
pub fn main() {
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
// aux-build:issue_2723_a.rs
|
// aux-build:issue_2723_a.rs
|
||||||
|
|
||||||
extern mod issue_2723_a;
|
extern mod issue_2723_a;
|
||||||
use issue_2723_a::*;
|
use issue_2723_a::f;
|
||||||
|
|
||||||
pub fn main() {
|
pub fn main() {
|
||||||
unsafe {
|
unsafe {
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// Incorrect struct size computation in the FFI, because of not taking
|
// Incorrect struct size computation in the FFI, because of not taking
|
||||||
// the alignment of elements into account.
|
// the alignment of elements into account.
|
||||||
|
|
||||||
use std::libc::*;
|
use std::libc::{c_uint, uint32_t, c_void};
|
||||||
|
|
||||||
struct KEYGEN {
|
struct KEYGEN {
|
||||||
hash_algorithm: [c_uint, ..2],
|
hash_algorithm: [c_uint, ..2],
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
// xfail-fast
|
// xfail-fast
|
||||||
// aux-build:issue_3979_traits.rs
|
// aux-build:issue_3979_traits.rs
|
||||||
extern mod issue_3979_traits;
|
extern mod issue_3979_traits;
|
||||||
use issue_3979_traits::*;
|
use issue_3979_traits::{Positioned, Movable};
|
||||||
|
|
||||||
struct Point { x: int, y: int }
|
struct Point { x: int, y: int }
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
// xfail-fast - Windows hates cross-crate tests
|
// xfail-fast - Windows hates cross-crate tests
|
||||||
|
|
||||||
extern mod numeric;
|
extern mod numeric;
|
||||||
use numeric::*;
|
use numeric::{sin, Angle};
|
||||||
|
|
||||||
fn foo<T, A:Angle<T>>(theta: A) -> T { sin(&theta) }
|
fn foo<T, A:Angle<T>>(theta: A) -> T { sin(&theta) }
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
|
#[feature(macro_rules)];
|
||||||
|
|
||||||
use std::io;
|
use std::io;
|
||||||
|
|
||||||
macro_rules! print_hd_tl (
|
macro_rules! print_hd_tl (
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
|
#[feature(struct_variant)];
|
||||||
|
|
||||||
enum Enum {
|
enum Enum {
|
||||||
Foo { foo: uint },
|
Foo { foo: uint },
|
||||||
Bar { bar: uint }
|
Bar { bar: uint }
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
|
#[feature(macro_rules)];
|
||||||
|
|
||||||
use std::num::Zero;
|
use std::num::Zero;
|
||||||
|
|
||||||
pub struct X<T> {
|
pub struct X<T> {
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
|
#[feature(macro_rules)];
|
||||||
|
|
||||||
macro_rules! silly_macro(
|
macro_rules! silly_macro(
|
||||||
() => (
|
() => (
|
||||||
pub mod Qux {
|
pub mod Qux {
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
|
#[feature(macro_rules)];
|
||||||
|
|
||||||
// shouldn't affect evaluation of $ex:
|
// shouldn't affect evaluation of $ex:
|
||||||
macro_rules! bad_macro (($ex:expr) => ({let _x = 9; $ex}))
|
macro_rules! bad_macro (($ex:expr) => ({let _x = 9; $ex}))
|
||||||
pub fn main() {
|
pub fn main() {
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
|
|
||||||
// xfail-pretty - token trees can't pretty print
|
// xfail-pretty - token trees can't pretty print
|
||||||
|
|
||||||
|
#[feature(macro_rules)];
|
||||||
|
|
||||||
pub fn main() {
|
pub fn main() {
|
||||||
|
|
||||||
macro_rules! mylambda_tt(
|
macro_rules! mylambda_tt(
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
|
#[feature(macro_rules)];
|
||||||
|
|
||||||
macro_rules! overly_complicated (
|
macro_rules! overly_complicated (
|
||||||
($fnname:ident, $arg:ident, $ty:ty, $body:block, $val:expr, $pat:pat, $res:path) =>
|
($fnname:ident, $arg:ident, $ty:ty, $body:block, $val:expr, $pat:pat, $res:path) =>
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
|
#[feature(macro_rules)];
|
||||||
|
|
||||||
mod m {
|
mod m {
|
||||||
pub type t = int;
|
pub type t = int;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
|
|
||||||
// xfail-pretty - token trees can't pretty print
|
// xfail-pretty - token trees can't pretty print
|
||||||
|
|
||||||
|
#[feature(macro_rules)];
|
||||||
|
|
||||||
macro_rules! myfn(
|
macro_rules! myfn(
|
||||||
( $f:ident, ( $( $x:ident ),* ), $body:block ) => (
|
( $f:ident, ( $( $x:ident ),* ), $body:block ) => (
|
||||||
fn $f( $( $x : int),* ) -> int $body
|
fn $f( $( $x : int),* ) -> int $body
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
|
|
||||||
// regression test for issue #5625
|
// regression test for issue #5625
|
||||||
|
|
||||||
|
#[feature(struct_variant)];
|
||||||
|
|
||||||
enum E {
|
enum E {
|
||||||
Foo{f : int},
|
Foo{f : int},
|
||||||
Bar
|
Bar
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
|
#[feature(struct_variant)];
|
||||||
|
|
||||||
enum E {
|
enum E {
|
||||||
Foo{f : int},
|
Foo{f : int},
|
||||||
Bar
|
Bar
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
|
#[feature(macro_rules, struct_variant)];
|
||||||
|
|
||||||
enum Foo {
|
enum Foo {
|
||||||
B { b1: int, bb1: int},
|
B { b1: int, bb1: int},
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
extern mod extra;
|
extern mod extra;
|
||||||
|
|
||||||
use extra::list::*;
|
use extra::list::{List, Cons, Nil, head, is_empty};
|
||||||
|
|
||||||
fn pure_length_go<T:Clone>(ls: @List<T>, acc: uint) -> uint {
|
fn pure_length_go<T:Clone>(ls: @List<T>, acc: uint) -> uint {
|
||||||
match *ls { Nil => { acc } Cons(_, tl) => { pure_length_go(tl, acc + 1u) } }
|
match *ls { Nil => { acc } Cons(_, tl) => { pure_length_go(tl, acc + 1u) } }
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
|
#[feature(macro_rules)];
|
||||||
|
|
||||||
use std::sys;
|
use std::sys;
|
||||||
|
|
||||||
enum E<T> { Thing(int, T), Nothing((), ((), ()), [i8, ..0]) }
|
enum E<T> { Thing(int, T), Nothing((), ((), ()), [i8, ..0]) }
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
|
#[feature(globs)];
|
||||||
|
|
||||||
// FIXME #3654
|
// FIXME #3654
|
||||||
|
|
||||||
mod a {
|
mod a {
|
||||||
|
|
|
@ -17,12 +17,11 @@ extern mod extra;
|
||||||
use extra::tempfile::mkdtemp;
|
use extra::tempfile::mkdtemp;
|
||||||
use std::os;
|
use std::os;
|
||||||
use std::libc;
|
use std::libc;
|
||||||
use std::libc::*;
|
|
||||||
|
|
||||||
fn rename_directory() {
|
fn rename_directory() {
|
||||||
#[fixed_stack_segment];
|
#[fixed_stack_segment];
|
||||||
unsafe {
|
unsafe {
|
||||||
static U_RWX: i32 = (S_IRUSR | S_IWUSR | S_IXUSR) as i32;
|
static U_RWX: i32 = (libc::S_IRUSR | libc::S_IWUSR | libc::S_IXUSR) as i32;
|
||||||
|
|
||||||
let tmpdir = mkdtemp(&os::tmpdir(), "rename_directory").expect("rename_directory failed");
|
let tmpdir = mkdtemp(&os::tmpdir(), "rename_directory").expect("rename_directory failed");
|
||||||
let old_path = tmpdir.push_many(["foo", "bar", "baz"]);
|
let old_path = tmpdir.push_many(["foo", "bar", "baz"]);
|
||||||
|
@ -38,13 +37,13 @@ fn rename_directory() {
|
||||||
assert!((ostream as uint != 0u));
|
assert!((ostream as uint != 0u));
|
||||||
let s = ~"hello";
|
let s = ~"hello";
|
||||||
do "hello".with_c_str |buf| {
|
do "hello".with_c_str |buf| {
|
||||||
let write_len = libc::fwrite(buf as *c_void,
|
let write_len = libc::fwrite(buf as *libc::c_void,
|
||||||
1u as size_t,
|
1u as libc::size_t,
|
||||||
(s.len() + 1u) as size_t,
|
(s.len() + 1u) as libc::size_t,
|
||||||
ostream);
|
ostream);
|
||||||
assert_eq!(write_len, (s.len() + 1) as size_t)
|
assert_eq!(write_len, (s.len() + 1) as libc::size_t)
|
||||||
}
|
}
|
||||||
assert_eq!(libc::fclose(ostream), (0u as c_int));
|
assert_eq!(libc::fclose(ostream), (0u as libc::c_int));
|
||||||
|
|
||||||
let new_path = tmpdir.push_many(["quux", "blat"]);
|
let new_path = tmpdir.push_many(["quux", "blat"]);
|
||||||
assert!(os::mkdir_recursive(&new_path, U_RWX));
|
assert!(os::mkdir_recursive(&new_path, U_RWX));
|
||||||
|
|
|
@ -23,9 +23,9 @@
|
||||||
//
|
//
|
||||||
// See #9341
|
// See #9341
|
||||||
|
|
||||||
use std::rt::io::process::*;
|
use std::rt::io::process::{Process, ProcessConfig, CreatePipe, Ignored};
|
||||||
use std::rt::io::{Reader, Writer};
|
use std::rt::io::{Reader, Writer};
|
||||||
use std::rt::io::pipe::*;
|
use std::rt::io::pipe::PipeStream;
|
||||||
use std::str;
|
use std::str;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
|
#[feature(struct_variant)];
|
||||||
|
|
||||||
enum Foo {
|
enum Foo {
|
||||||
Bar {
|
Bar {
|
||||||
a: int,
|
a: int,
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
|
#[feature(struct_variant)];
|
||||||
|
|
||||||
enum Foo {
|
enum Foo {
|
||||||
Bar {
|
Bar {
|
||||||
x: int,
|
x: int,
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue