1
Fork 0

rustdoc: Replace no-pretty-expanded with pretty-expanded

Now that features must be declared expanded source often does not compile.
This adds 'pretty-expanded' to a bunch of test cases that still work.
This commit is contained in:
Brian Anderson 2015-03-22 13:13:15 -07:00
parent e9019101a8
commit 8c93a79e38
1544 changed files with 3093 additions and 12 deletions

View file

@ -40,8 +40,8 @@ pub struct TestProps {
pub check_stdout: bool, pub check_stdout: bool,
// Don't force a --crate-type=dylib flag on the command line // Don't force a --crate-type=dylib flag on the command line
pub no_prefer_dynamic: bool, pub no_prefer_dynamic: bool,
// Don't run --pretty expanded when running pretty printing tests // Run --pretty expanded when running pretty printing tests
pub no_pretty_expanded: bool, pub pretty_expanded: bool,
// Which pretty mode are we testing with, default to 'normal' // Which pretty mode are we testing with, default to 'normal'
pub pretty_mode: String, pub pretty_mode: String,
// Only compare pretty output and don't try compiling // Only compare pretty output and don't try compiling
@ -62,7 +62,7 @@ pub fn load_props(testfile: &Path) -> TestProps {
let mut force_host = false; let mut force_host = false;
let mut check_stdout = false; let mut check_stdout = false;
let mut no_prefer_dynamic = false; let mut no_prefer_dynamic = false;
let mut no_pretty_expanded = false; let mut pretty_expanded = false;
let mut pretty_mode = None; let mut pretty_mode = None;
let mut pretty_compare_only = false; let mut pretty_compare_only = false;
let mut forbid_output = Vec::new(); let mut forbid_output = Vec::new();
@ -96,8 +96,8 @@ pub fn load_props(testfile: &Path) -> TestProps {
no_prefer_dynamic = parse_no_prefer_dynamic(ln); no_prefer_dynamic = parse_no_prefer_dynamic(ln);
} }
if !no_pretty_expanded { if !pretty_expanded {
no_pretty_expanded = parse_no_pretty_expanded(ln); pretty_expanded = parse_pretty_expanded(ln);
} }
if pretty_mode.is_none() { if pretty_mode.is_none() {
@ -152,7 +152,7 @@ pub fn load_props(testfile: &Path) -> TestProps {
force_host: force_host, force_host: force_host,
check_stdout: check_stdout, check_stdout: check_stdout,
no_prefer_dynamic: no_prefer_dynamic, no_prefer_dynamic: no_prefer_dynamic,
no_pretty_expanded: no_pretty_expanded, pretty_expanded: pretty_expanded,
pretty_mode: pretty_mode.unwrap_or("normal".to_string()), pretty_mode: pretty_mode.unwrap_or("normal".to_string()),
pretty_compare_only: pretty_compare_only, pretty_compare_only: pretty_compare_only,
forbid_output: forbid_output, forbid_output: forbid_output,
@ -295,8 +295,8 @@ fn parse_no_prefer_dynamic(line: &str) -> bool {
parse_name_directive(line, "no-prefer-dynamic") parse_name_directive(line, "no-prefer-dynamic")
} }
fn parse_no_pretty_expanded(line: &str) -> bool { fn parse_pretty_expanded(line: &str) -> bool {
parse_name_directive(line, "no-pretty-expanded") parse_name_directive(line, "pretty-expanded")
} }
fn parse_pretty_mode(line: &str) -> Option<String> { fn parse_pretty_mode(line: &str) -> Option<String> {
@ -340,7 +340,8 @@ fn parse_pp_exact(line: &str, testfile: &Path) -> Option<PathBuf> {
} }
fn parse_name_directive(line: &str, directive: &str) -> bool { fn parse_name_directive(line: &str, directive: &str) -> bool {
line.contains(directive) // This 'no-' rule is a quick hack to allow pretty-expanded and no-pretty-expanded to coexist
line.contains(directive) && !line.contains(&("no-".to_string() + directive))
} }
pub fn parse_name_value_directive(line: &str, directive: &str) pub fn parse_name_value_directive(line: &str, directive: &str)

View file

@ -245,7 +245,7 @@ fn run_pretty_test(config: &Config, props: &TestProps, testfile: &Path) {
if !proc_res.status.success() { if !proc_res.status.success() {
fatal_proc_rec("pretty-printed source does not typecheck", &proc_res); fatal_proc_rec("pretty-printed source does not typecheck", &proc_res);
} }
if props.no_pretty_expanded { return } if !props.pretty_expanded { return }
// additionally, run `--pretty expanded` and try to build it. // additionally, run `--pretty expanded` and try to build it.
let proc_res = print_source(config, props, testfile, srcs[round].clone(), "expanded"); let proc_res = print_source(config, props, testfile, srcs[round].clone(), "expanded");

View file

@ -12,6 +12,8 @@
// Regression test for issue #374 // Regression test for issue #374
// pretty-expanded FIXME #23616
enum sty { ty_nil, } enum sty { ty_nil, }
struct RawT {struct_: sty, cname: Option<String>, hash: uint} struct RawT {struct_: sty, cname: Option<String>, hash: uint}

View file

@ -9,6 +9,8 @@
// except according to those terms. // except according to those terms.
// pretty-expanded FIXME #23616
enum option<T> { some(T), none, } enum option<T> { some(T), none, }
struct R<T> {v: Vec<option<T>> } struct R<T> {v: Vec<option<T>> }

View file

@ -9,6 +9,8 @@
// except according to those terms. // except according to those terms.
// aux-build:anon-extern-mod-cross-crate-1.rs // aux-build:anon-extern-mod-cross-crate-1.rs
// pretty-expanded FIXME #23616
extern crate anonexternmod; extern crate anonexternmod;
use anonexternmod::rust_get_test_int; use anonexternmod::rust_get_test_int;

View file

@ -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.
// pretty-expanded FIXME #23616
#![feature(libc)] #![feature(libc)]
extern crate libc; extern crate libc;

View file

@ -9,6 +9,8 @@
// except according to those terms. // except according to those terms.
// pretty-expanded FIXME #23616
struct X { struct X {
x: int x: int
} }

View file

@ -10,6 +10,8 @@
// pretty-expanded FIXME #23616
pub fn main() { pub fn main() {
let i32_c: int = 0x10101010; let i32_c: int = 0x10101010;
assert!(i32_c + i32_c * 2 / 3 * 2 + (i32_c - 7 % 3) == assert!(i32_c + i32_c * 2 / 3 * 2 + (i32_c - 7 % 3) ==

View file

@ -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.
// pretty-expanded FIXME #23616
#![allow(type_limits)] #![allow(type_limits)]
// Unsigned integer operations // Unsigned integer operations

View file

@ -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.
// pretty-expanded FIXME #23616
fn f() -> int { { return 3; } } fn f() -> int { { return 3; } }
pub fn main() { assert!((f() == 3)); } pub fn main() { assert!((f() == 3)); }

View file

@ -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.
// pretty-expanded FIXME #23616
fn main() { fn main() {
assert_eq!(3 as uint * 3, 9); assert_eq!(3 as uint * 3, 9);
assert_eq!(3 as (uint) * 3, 9); assert_eq!(3 as (uint) * 3, 9);

View file

@ -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.
// pretty-expanded FIXME #23616
#![feature(asm)] #![feature(asm)]
pub fn main() { pub fn main() {

View file

@ -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.
// pretty-expanded FIXME #23616
#![feature(asm)] #![feature(asm)]
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))] #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]

View file

@ -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.
// pretty-expanded FIXME #23616
#![feature(asm)] #![feature(asm)]
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))] #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]

View file

@ -9,6 +9,8 @@
// except according to those terms. // except according to those terms.
// Issue 483 - Assignment expressions result in nil // Issue 483 - Assignment expressions result in nil
// pretty-expanded FIXME #23616
fn test_assign() { fn test_assign() {
let mut x: int; let mut x: int;
let y: () = x = 10; let y: () = x = 10;

View file

@ -12,6 +12,8 @@
// making method calls, but only if there aren't any matches without // making method calls, but only if there aren't any matches without
// it. // it.
// pretty-expanded FIXME #23616
#![feature(unboxed_closures)] #![feature(unboxed_closures)]
trait iterable<A> { trait iterable<A> {

View file

@ -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.
// pretty-expanded FIXME #23616
#![feature(core)] #![feature(core)]
use std::marker::MarkerTrait; use std::marker::MarkerTrait;

View file

@ -11,6 +11,8 @@
// Test a case where the associated type binding (to `bool`, in this // Test a case where the associated type binding (to `bool`, in this
// case) is derived from the trait definition. Issue #21636. // case) is derived from the trait definition. Issue #21636.
// pretty-expanded FIXME #23616
use std::vec; use std::vec;
pub trait BitIter { pub trait BitIter {

View file

@ -10,6 +10,8 @@
// Test equality constraints on associated types in a where clause. // Test equality constraints on associated types in a where clause.
// pretty-expanded FIXME #23616
pub trait Foo { pub trait Foo {
type A; type A;
fn boo(&self) -> <Self as Foo>::A; fn boo(&self) -> <Self as Foo>::A;

View file

@ -10,6 +10,8 @@
// Test equality constrai32s on associated types in a where clause. // Test equality constrai32s on associated types in a where clause.
// pretty-expanded FIXME #23616
pub trait ToI32 { pub trait ToI32 {
fn to_i32(&self) -> i32; fn to_i32(&self) -> i32;
} }

View file

@ -14,6 +14,8 @@
// `Target=[A]`, then the impl marked with `(*)` is seen to conflict // `Target=[A]`, then the impl marked with `(*)` is seen to conflict
// with all the others. // with all the others.
// pretty-expanded FIXME #23616
use std::marker::PhantomData; use std::marker::PhantomData;
use std::ops::Deref; use std::ops::Deref;

View file

@ -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.
// pretty-expanded FIXME #23616
trait SignedUnsigned { trait SignedUnsigned {
type Opposite; type Opposite;
fn convert(self) -> Self::Opposite; fn convert(self) -> Self::Opposite;

View file

@ -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.
// pretty-expanded FIXME #23616
#![allow(unknown_features)] #![allow(unknown_features)]
#![feature(box_syntax)] #![feature(box_syntax)]

View file

@ -12,6 +12,8 @@
// (modulo bound lifetime names) appears in the environment // (modulo bound lifetime names) appears in the environment
// twice. Issue #21965. // twice. Issue #21965.
// pretty-expanded FIXME #23616
fn foo<T>(t: T) -> i32 fn foo<T>(t: T) -> i32
where T : for<'a> Fn(&'a u8) -> i32, where T : for<'a> Fn(&'a u8) -> i32,
T : for<'b> Fn(&'b u8) -> i32, T : for<'b> Fn(&'b u8) -> i32,

View file

@ -11,6 +11,8 @@
// Check that we do not report ambiguities when the same predicate // Check that we do not report ambiguities when the same predicate
// appears in the environment twice. Issue #21965. // appears in the environment twice. Issue #21965.
// pretty-expanded FIXME #23616
trait Foo { trait Foo {
type B; type B;

View file

@ -10,6 +10,8 @@
// Test associated types appearing in struct-like enum variants. // Test associated types appearing in struct-like enum variants.
// pretty-expanded FIXME #23616
use self::VarValue::*; use self::VarValue::*;
pub trait UnifyKey { pub trait UnifyKey {

View file

@ -10,6 +10,8 @@
// Test associated types appearing in tuple-like enum variants. // Test associated types appearing in tuple-like enum variants.
// pretty-expanded FIXME #23616
use self::VarValue::*; use self::VarValue::*;
pub trait UnifyKey { pub trait UnifyKey {

View file

@ -10,6 +10,8 @@
// Test equality constraints on associated types inside of an object type // Test equality constraints on associated types inside of an object type
// pretty-expanded FIXME #23616
pub trait Foo { pub trait Foo {
type A; type A;
fn boo(&self) -> <Self as Foo>::A; fn boo(&self) -> <Self as Foo>::A;

View file

@ -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.
// pretty-expanded FIXME #23616
trait Get { trait Get {
type Value; type Value;
fn get(&self) -> &<Self as Get>::Value; fn get(&self) -> &<Self as Get>::Value;

View file

@ -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.
// pretty-expanded FIXME #23616
trait Get { trait Get {
type Value; type Value;
fn get(&self) -> &<Self as Get>::Value; fn get(&self) -> &<Self as Get>::Value;

View file

@ -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.
// pretty-expanded FIXME #23616
trait Get { trait Get {
type Value; type Value;
fn get(&self) -> &<Self as Get>::Value; fn get(&self) -> &<Self as Get>::Value;

View file

@ -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.
// pretty-expanded FIXME #23616
trait Get { trait Get {
type Value; type Value;
fn get(&self) -> &<Self as Get>::Value; fn get(&self) -> &<Self as Get>::Value;

View file

@ -10,6 +10,8 @@
// Test references to `Self::Item` in the trait. Issue #20220. // Test references to `Self::Item` in the trait. Issue #20220.
// pretty-expanded FIXME #23616
use std::vec; use std::vec;
trait IntoIteratorX { trait IntoIteratorX {

View file

@ -11,6 +11,8 @@
// Test that we are able to have an impl that defines an associated type // Test that we are able to have an impl that defines an associated type
// before the actual trait. // before the actual trait.
// pretty-expanded FIXME #23616
#![feature(core)] #![feature(core)]
use std::marker::MarkerTrait; use std::marker::MarkerTrait;

View file

@ -13,6 +13,8 @@
// where clauses in the environment which in turn required normalizing // where clauses in the environment which in turn required normalizing
// `Self::Input`. // `Self::Input`.
// pretty-expanded FIXME #23616
pub trait Parser { pub trait Parser {
type Input; type Input;

View file

@ -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.
// pretty-expanded FIXME #23616
fn pairwise_sub<T:DoubleEndedIterator<Item=int>>(mut t: T) -> int { fn pairwise_sub<T:DoubleEndedIterator<Item=int>>(mut t: T) -> int {
let mut result = 0; let mut result = 0;
loop { loop {

View file

@ -10,6 +10,8 @@
// Test that we can resolve nested projection types. Issue #20666. // Test that we can resolve nested projection types. Issue #20666.
// pretty-expanded FIXME #23616
#![feature(core)] #![feature(core)]
use std::marker::MarkerTrait; use std::marker::MarkerTrait;

View file

@ -11,6 +11,8 @@
// Test that we normalize associated types that appear in a bound that // Test that we normalize associated types that appear in a bound that
// contains a binding. Issue #21664. // contains a binding. Issue #21664.
// pretty-expanded FIXME #23616
#![feature(core)] #![feature(core)]
#![allow(dead_code)] #![allow(dead_code)]

View file

@ -11,6 +11,8 @@
// Test that we normalize associated types that appear in bounds; if // Test that we normalize associated types that appear in bounds; if
// we didn't, the call to `self.split2()` fails to type check. // we didn't, the call to `self.split2()` fails to type check.
// pretty-expanded FIXME #23616
use std::marker::PhantomData; use std::marker::PhantomData;
struct Splits<'a, T:'a, P>(PhantomData<(&'a T, P)>); struct Splits<'a, T:'a, P>(PhantomData<(&'a T, P)>);

View file

@ -11,6 +11,8 @@
// Test that we normalize associated types that appear in bounds; if // Test that we normalize associated types that appear in bounds; if
// we didn't, the call to `self.split2()` fails to type check. // we didn't, the call to `self.split2()` fails to type check.
// pretty-expanded FIXME #23616
use std::marker::PhantomData; use std::marker::PhantomData;
struct Splits<'a, T, P>(PhantomData<(&'a(),T,P)>); struct Splits<'a, T, P>(PhantomData<(&'a(),T,P)>);

View file

@ -12,6 +12,8 @@
// various special paths in the `type_is_immediate` function. // various special paths in the `type_is_immediate` function.
// pretty-expanded FIXME #23616
pub trait OffsetState: Sized {} pub trait OffsetState: Sized {}
pub trait Offset { pub trait Offset {
type State: OffsetState; type State: OffsetState;

View file

@ -12,6 +12,8 @@
// `Item` originates in a where-clause, not the declaration of // `Item` originates in a where-clause, not the declaration of
// `T`. Issue #20300. // `T`. Issue #20300.
// pretty-expanded FIXME #23616
#![feature(core)] #![feature(core)]
use std::marker::{MarkerTrait, PhantomData}; use std::marker::{MarkerTrait, PhantomData};

View file

@ -10,6 +10,8 @@
// Test where the impl self type uses a projection from a constant type. // Test where the impl self type uses a projection from a constant type.
// pretty-expanded FIXME #23616
trait Int trait Int
{ {
type T; type T;

View file

@ -13,6 +13,8 @@
// appear in associated type bindings in object types, which were not // appear in associated type bindings in object types, which were not
// being properly flagged. // being properly flagged.
// pretty-expanded FIXME #23616
use std::ops::{Shl, Shr}; use std::ops::{Shl, Shr};
use std::cell::RefCell; use std::cell::RefCell;

View file

@ -11,6 +11,8 @@
// Test that we are handle to correctly handle a projection type // Test that we are handle to correctly handle a projection type
// that appears in a supertrait bound. Issue #20559. // that appears in a supertrait bound. Issue #20559.
// pretty-expanded FIXME #23616
trait A trait A
{ {
type TA; type TA;

View file

@ -10,6 +10,8 @@
// Test a where clause that uses a non-normalized projection type. // Test a where clause that uses a non-normalized projection type.
// pretty-expanded FIXME #23616
trait Int trait Int
{ {
type T; type T;

View file

@ -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.
// pretty-expanded FIXME #23616
trait Foo<T> { trait Foo<T> {
type Bar; type Bar;
fn get_bar() -> <Self as Foo<T>>::Bar; fn get_bar() -> <Self as Foo<T>>::Bar;

View file

@ -10,6 +10,8 @@
// Test associated type references in structure fields. // Test associated type references in structure fields.
// pretty-expanded FIXME #23616
trait Test { trait Test {
type V; type V;

View file

@ -10,6 +10,8 @@
// Test associated type references in a struct literal. Issue #20535. // Test associated type references in a struct literal. Issue #20535.
// pretty-expanded FIXME #23616
pub trait Foo { pub trait Foo {
type Bar; type Bar;

View file

@ -11,6 +11,8 @@
// Regression test for #20582. This test caused an ICE related to // Regression test for #20582. This test caused an ICE related to
// inconsistent region erasure in trans. // inconsistent region erasure in trans.
// pretty-expanded FIXME #23616
struct Foo<'a> { struct Foo<'a> {
buf: &'a[u8] buf: &'a[u8]
} }

View file

@ -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.
// pretty-expanded FIXME #23616
trait Get<T> { trait Get<T> {
fn get(&self) -> T; fn get(&self) -> T;
} }

View file

@ -10,6 +10,8 @@
// Test equality constraints on associated types in a where clause. // Test equality constraints on associated types in a where clause.
// pretty-expanded FIXME #23616
pub trait Foo { pub trait Foo {
type A; type A;
fn boo(&self) -> <Self as Foo>::A; fn boo(&self) -> <Self as Foo>::A;

View file

@ -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.
// pretty-expanded FIXME #23616
trait Get { trait Get {
type Value; type Value;
fn get(&self) -> &<Self as Get>::Value; fn get(&self) -> &<Self as Get>::Value;

View file

@ -11,6 +11,8 @@
// Test references to the trait `Stream` in the bounds for associated // Test references to the trait `Stream` in the bounds for associated
// types defined on `Stream`. Issue #20551. // types defined on `Stream`. Issue #20551.
// pretty-expanded FIXME #23616
trait Stream { trait Stream {
type Car; type Car;
type Cdr: Stream; type Cdr: Stream;

View file

@ -11,6 +11,8 @@
// Test that we correctly normalize the type of a struct field // Test that we correctly normalize the type of a struct field
// which has an associated type. // which has an associated type.
// pretty-expanded FIXME #23616
pub trait UnifyKey { pub trait UnifyKey {
type Value; type Value;

View file

@ -11,6 +11,8 @@
// Test that we correctly normalize the type of a struct field // Test that we correctly normalize the type of a struct field
// which has an associated type. // which has an associated type.
// pretty-expanded FIXME #23616
pub trait UnifyKey { pub trait UnifyKey {
type Value; type Value;

View file

@ -10,6 +10,8 @@
// Test paths to associated types using the type-parameter-only sugar. // Test paths to associated types using the type-parameter-only sugar.
// pretty-expanded FIXME #23616
pub trait Foo { pub trait Foo {
type A; type A;
fn boo(&self) -> Self::A; fn boo(&self) -> Self::A;

View file

@ -13,6 +13,8 @@
// carries a predicate that references the trait (`u32 : Trait1`, // carries a predicate that references the trait (`u32 : Trait1`,
// substituted). // substituted).
// pretty-expanded FIXME #23616
#![allow(dead_code)] #![allow(dead_code)]
trait Trait1 : Trait2<SomeType<u32>> { trait Trait1 : Trait2<SomeType<u32>> {

View file

@ -10,6 +10,8 @@
// error-pattern:expected item // error-pattern:expected item
// pretty-expanded FIXME #23616
#![feature(custom_attribute, test)] #![feature(custom_attribute, test)]
#[foo = "bar"] #[foo = "bar"]

View file

@ -10,6 +10,8 @@
// error-pattern:expected item // error-pattern:expected item
// pretty-expanded FIXME #23616
#![feature(custom_attribute, test)] #![feature(custom_attribute, test)]
mod m { mod m {

View file

@ -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.
// pretty-expanded FIXME #23616
#![feature(main)] #![feature(main)]
pub fn main() { pub fn main() {

View file

@ -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.
// pretty-expanded FIXME #23616
#![feature(main)] #![feature(main)]
#[main] #[main]

View file

@ -7,6 +7,8 @@
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// 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.
// pretty-expanded FIXME #23616
#![allow(unused_attribute)] #![allow(unused_attribute)]
#![feature(custom_attribute)] #![feature(custom_attribute)]

View file

@ -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.
// pretty-expanded FIXME #23616
#![feature(unsafe_destructor)] #![feature(unsafe_destructor)]
#![feature(unsafe_no_drop_flag)] #![feature(unsafe_no_drop_flag)]

View file

@ -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.
// pretty-expanded FIXME #23616
#![feature(start)] #![feature(start)]
#[start] #[start]

View file

@ -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.
// pretty-expanded FIXME #23616
#![feature(main)] #![feature(main)]
#[main] #[main]

View file

@ -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.
// pretty-expanded FIXME #23616
pub fn main() { pub fn main() {
let mut sum = 0; let mut sum = 0;
let xs = vec!(1, 2, 3, 4, 5); let xs = vec!(1, 2, 3, 4, 5);

View file

@ -9,6 +9,8 @@
// except according to those terms. // except according to those terms.
// pretty-expanded FIXME #23616
trait Pushable<T> { trait Pushable<T> {
fn push_val(&mut self, t: T); fn push_val(&mut self, t: T);
} }

View file

@ -9,6 +9,8 @@
// except according to those terms. // except according to those terms.
// pretty-expanded FIXME #23616
fn f<T>(x: Vec<T>) -> T { return x.into_iter().next().unwrap(); } fn f<T>(x: Vec<T>) -> T { return x.into_iter().next().unwrap(); }
fn g<F>(act: F) -> int where F: FnOnce(Vec<int>) -> int { return act(vec!(1, 2, 3)); } fn g<F>(act: F) -> int where F: FnOnce(Vec<int>) -> int { return act(vec!(1, 2, 3)); }

View file

@ -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.
// pretty-expanded FIXME #23616
struct Foo { struct Foo {
x: int, x: int,
} }

View file

@ -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.
// pretty-expanded FIXME #23616
#![allow(unknown_features)] #![allow(unknown_features)]
#![feature(box_syntax)] #![feature(box_syntax)]

View file

@ -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.
// pretty-expanded FIXME #23616
#![allow(unknown_features)] #![allow(unknown_features)]
#![feature(box_syntax)] #![feature(box_syntax)]

View file

@ -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.
// pretty-expanded FIXME #23616
#![allow(unknown_features)] #![allow(unknown_features)]
#![feature(box_syntax)] #![feature(box_syntax)]

View file

@ -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.
// pretty-expanded FIXME #23616
#![allow(unknown_features)] #![allow(unknown_features)]
#![feature(box_syntax)] #![feature(box_syntax)]

View file

@ -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.
// pretty-expanded FIXME #23616
#![allow(unknown_features)] #![allow(unknown_features)]
#![feature(box_syntax)] #![feature(box_syntax)]

View file

@ -9,6 +9,8 @@
// except according to those terms. // except according to those terms.
// pretty-expanded FIXME #23616
#![allow(unknown_features)] #![allow(unknown_features)]
#![feature(box_syntax)] #![feature(box_syntax)]

View file

@ -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.
// pretty-expanded FIXME #23616
pub fn main() { pub fn main() {
assert_eq!(0xffffffff, (-1 as u32)); assert_eq!(0xffffffff, (-1 as u32));
assert_eq!(4294967295, (-1 as u32)); assert_eq!(4294967295, (-1 as u32));

View file

@ -10,6 +10,8 @@
// Check that issue #954 stays fixed // Check that issue #954 stays fixed
// pretty-expanded FIXME #23616
pub fn main() { pub fn main() {
match -1 { -1 => {}, _ => panic!("wat") } match -1 { -1 => {}, _ => panic!("wat") }
assert_eq!(1-1, 0); assert_eq!(1-1, 0);

View file

@ -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.
// pretty-expanded FIXME #23616
use std::sync::Arc; use std::sync::Arc;
fn dispose(_x: Arc<bool>) { } fn dispose(_x: Arc<bool>) { }

View file

@ -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.
// pretty-expanded FIXME #23616
pub fn main() { pub fn main() {
struct Foo { x: int, y: int } struct Foo { x: int, y: int }
let mut f = Foo { x: 10, y: 0 }; let mut f = Foo { x: 10, y: 0 };

View file

@ -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.
// pretty-expanded FIXME #23616
#![allow(unknown_features)] #![allow(unknown_features)]
#![feature(box_syntax, collections)] #![feature(box_syntax, collections)]

View file

@ -11,6 +11,8 @@
// aux-build:blind-item-mixed-crate-use-item-foo.rs // aux-build:blind-item-mixed-crate-use-item-foo.rs
// aux-build:blind-item-mixed-crate-use-item-foo2.rs // aux-build:blind-item-mixed-crate-use-item-foo2.rs
// pretty-expanded FIXME #23616
mod m { mod m {
pub fn f<T>(_: T, _: (), _: ()) { } pub fn f<T>(_: T, _: (), _: ()) { }
pub fn g<T>(_: T, _: (), _: ()) { } pub fn g<T>(_: T, _: (), _: ()) { }

View file

@ -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.
// pretty-expanded FIXME #23616
mod m { mod m {
pub fn f<T>(_: T, _: ()) { } pub fn f<T>(_: T, _: ()) { }
pub fn g<T>(_: T, _: ()) { } pub fn g<T>(_: T, _: ()) { }

View file

@ -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.
// pretty-expanded FIXME #23616
fn asBlock<F>(f: F) -> uint where F: FnOnce() -> uint { fn asBlock<F>(f: F) -> uint where F: FnOnce() -> uint {
return f(); return f();
} }

View file

@ -13,6 +13,8 @@
// no-reformat // no-reformat
// pretty-expanded FIXME #23616
/* /*
* *
* When you write a block-expression thing followed by * When you write a block-expression thing followed by

View file

@ -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.
// pretty-expanded FIXME #23616
fn force<F>(f: F) -> int where F: FnOnce() -> int { return f(); } fn force<F>(f: F) -> int where F: FnOnce() -> int { return f(); }
pub fn main() { pub fn main() {

View file

@ -11,6 +11,8 @@
// pretty-expanded FIXME #23616
pub fn main() { pub fn main() {
if !false { assert!((true)); } else { assert!((false)); } if !false { assert!((true)); } else { assert!((false)); }
if !true { assert!((false)); } else { assert!((true)); } if !true { assert!((false)); } else { assert!((true)); }

View file

@ -10,6 +10,8 @@
// Basic boolean tests // Basic boolean tests
// pretty-expanded FIXME #23616
use std::cmp::Ordering::{Equal, Greater, Less}; use std::cmp::Ordering::{Equal, Greater, Less};
use std::ops::{BitAnd, BitOr, BitXor}; use std::ops::{BitAnd, BitOr, BitXor};

View file

@ -9,6 +9,8 @@
// except according to those terms. // except according to those terms.
// pretty-expanded FIXME #23616
trait Foo { trait Foo {
fn foo(self); fn foo(self);
} }

View file

@ -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.
// pretty-expanded FIXME #23616
struct Foo(int, int); struct Foo(int, int);
fn main() { fn main() {

View file

@ -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.
// pretty-expanded FIXME #23616
pub fn main() { pub fn main() {
struct A { struct A {
a: int, a: int,

View file

@ -9,6 +9,8 @@
// except according to those terms. // except according to those terms.
// pretty-expanded FIXME #23616
struct F { f: Vec<int> } struct F { f: Vec<int> }
fn impure(_v: &[int]) { fn impure(_v: &[int]) {

View file

@ -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.
// pretty-expanded FIXME #23616
#![allow(unknown_features)] #![allow(unknown_features)]
#![feature(box_syntax)] #![feature(box_syntax)]

View file

@ -13,6 +13,8 @@
// //
// Example from src/librustc_borrowck/borrowck/README.md // Example from src/librustc_borrowck/borrowck/README.md
// pretty-expanded FIXME #23616
fn foo<'a>(mut t0: &'a mut int, fn foo<'a>(mut t0: &'a mut int,
mut t1: &'a mut int) { mut t1: &'a mut int) {
let p: &int = &*t0; // Freezes `*t0` let p: &int = &*t0; // Freezes `*t0`

View file

@ -14,6 +14,8 @@
// that the main function can read the variable too while // that the main function can read the variable too while
// the closures are in scope. Issue #6801. // the closures are in scope. Issue #6801.
// pretty-expanded FIXME #23616
fn a() -> i32 { fn a() -> i32 {
let mut x = 3; let mut x = 3;
x += 1; x += 1;

View file

@ -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.
// pretty-expanded FIXME #23616
#![allow(unknown_features)] #![allow(unknown_features)]
#![feature(box_syntax)] #![feature(box_syntax)]

View file

@ -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.
// pretty-expanded FIXME #23616
pub fn main() { pub fn main() {
let x = [22]; let x = [22];
let y = &x[0]; let y = &x[0];

View file

@ -10,6 +10,8 @@
// Test that a `&mut` inside of an `&` is freezable. // Test that a `&mut` inside of an `&` is freezable.
// pretty-expanded FIXME #23616
struct MutSlice<'a, T:'a> { struct MutSlice<'a, T:'a> {
data: &'a mut [T] data: &'a mut [T]
} }

View file

@ -9,6 +9,8 @@
// except according to those terms. // except according to those terms.
// pretty-expanded FIXME #23616
fn borrow(_v: &int) {} fn borrow(_v: &int) {}
fn borrow_from_arg_imm_ref(v: Box<int>) { fn borrow_from_arg_imm_ref(v: Box<int>) {

View file

@ -11,6 +11,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`
// pretty-expanded FIXME #23616
#![feature(box_patterns)] #![feature(box_patterns)]
#![feature(box_syntax)] #![feature(box_syntax)]

Some files were not shown because too many files have changed in this diff Show more