Skip to content

Commit 97c8444

Browse files
committed
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.
1 parent 0fa43e9 commit 97c8444

File tree

1,544 files changed

+3093
-12
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,544 files changed

+3093
-12
lines changed

src/compiletest/header.rs

+10-9
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ pub struct TestProps {
4040
pub check_stdout: bool,
4141
// Don't force a --crate-type=dylib flag on the command line
4242
pub no_prefer_dynamic: bool,
43-
// Don't run --pretty expanded when running pretty printing tests
44-
pub no_pretty_expanded: bool,
43+
// Run --pretty expanded when running pretty printing tests
44+
pub pretty_expanded: bool,
4545
// Which pretty mode are we testing with, default to 'normal'
4646
pub pretty_mode: String,
4747
// Only compare pretty output and don't try compiling
@@ -62,7 +62,7 @@ pub fn load_props(testfile: &Path) -> TestProps {
6262
let mut force_host = false;
6363
let mut check_stdout = false;
6464
let mut no_prefer_dynamic = false;
65-
let mut no_pretty_expanded = false;
65+
let mut pretty_expanded = false;
6666
let mut pretty_mode = None;
6767
let mut pretty_compare_only = false;
6868
let mut forbid_output = Vec::new();
@@ -96,8 +96,8 @@ pub fn load_props(testfile: &Path) -> TestProps {
9696
no_prefer_dynamic = parse_no_prefer_dynamic(ln);
9797
}
9898

99-
if !no_pretty_expanded {
100-
no_pretty_expanded = parse_no_pretty_expanded(ln);
99+
if !pretty_expanded {
100+
pretty_expanded = parse_pretty_expanded(ln);
101101
}
102102

103103
if pretty_mode.is_none() {
@@ -152,7 +152,7 @@ pub fn load_props(testfile: &Path) -> TestProps {
152152
force_host: force_host,
153153
check_stdout: check_stdout,
154154
no_prefer_dynamic: no_prefer_dynamic,
155-
no_pretty_expanded: no_pretty_expanded,
155+
pretty_expanded: pretty_expanded,
156156
pretty_mode: pretty_mode.unwrap_or("normal".to_string()),
157157
pretty_compare_only: pretty_compare_only,
158158
forbid_output: forbid_output,
@@ -295,8 +295,8 @@ fn parse_no_prefer_dynamic(line: &str) -> bool {
295295
parse_name_directive(line, "no-prefer-dynamic")
296296
}
297297

298-
fn parse_no_pretty_expanded(line: &str) -> bool {
299-
parse_name_directive(line, "no-pretty-expanded")
298+
fn parse_pretty_expanded(line: &str) -> bool {
299+
parse_name_directive(line, "pretty-expanded")
300300
}
301301

302302
fn parse_pretty_mode(line: &str) -> Option<String> {
@@ -340,7 +340,8 @@ fn parse_pp_exact(line: &str, testfile: &Path) -> Option<PathBuf> {
340340
}
341341

342342
fn parse_name_directive(line: &str, directive: &str) -> bool {
343-
line.contains(directive)
343+
// This 'no-' rule is a quick hack to allow pretty-expanded and no-pretty-expanded to coexist
344+
line.contains(directive) && !line.contains(&("no-".to_string() + directive))
344345
}
345346

346347
pub fn parse_name_value_directive(line: &str, directive: &str)

src/compiletest/runtest.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ fn run_pretty_test(config: &Config, props: &TestProps, testfile: &Path) {
245245
if !proc_res.status.success() {
246246
fatal_proc_rec("pretty-printed source does not typecheck", &proc_res);
247247
}
248-
if props.no_pretty_expanded { return }
248+
if !props.pretty_expanded { return }
249249

250250
// additionally, run `--pretty expanded` and try to build it.
251251
let proc_res = print_source(config, props, testfile, srcs[round].clone(), "expanded");

src/test/run-pass/alias-uninit-value.rs

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
// Regression test for issue #374
1414

15+
// pretty-expanded FIXME #23616
16+
1517
enum sty { ty_nil, }
1618

1719
struct RawT {struct_: sty, cname: Option<String>, hash: uint}

src/test/run-pass/alloca-from-derived-tydesc.rs

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
// except according to those terms.
1010

1111

12+
// pretty-expanded FIXME #23616
13+
1214
enum option<T> { some(T), none, }
1315

1416
struct R<T> {v: Vec<option<T>> }

src/test/run-pass/anon-extern-mod-cross-crate-2.rs

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
// except according to those terms.
1010

1111
// aux-build:anon-extern-mod-cross-crate-1.rs
12+
// pretty-expanded FIXME #23616
13+
1214
extern crate anonexternmod;
1315

1416
use anonexternmod::rust_get_test_int;

src/test/run-pass/anon-extern-mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// pretty-expanded FIXME #23616
12+
1113
#![feature(libc)]
1214

1315
extern crate libc;

src/test/run-pass/argument-passing.rs

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
// except according to those terms.
1010

1111

12+
// pretty-expanded FIXME #23616
13+
1214
struct X {
1315
x: int
1416
}

src/test/run-pass/arith-2.rs

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111

1212

13+
// pretty-expanded FIXME #23616
14+
1315
pub fn main() {
1416
let i32_c: int = 0x10101010;
1517
assert!(i32_c + i32_c * 2 / 3 * 2 + (i32_c - 7 % 3) ==

src/test/run-pass/arith-unsigned.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// pretty-expanded FIXME #23616
12+
1113
#![allow(type_limits)]
1214

1315
// Unsigned integer operations

src/test/run-pass/artificial-block.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// pretty-expanded FIXME #23616
12+
1113
fn f() -> int { { return 3; } }
1214

1315
pub fn main() { assert!((f() == 3)); }

src/test/run-pass/as-precedence.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// pretty-expanded FIXME #23616
12+
1113
fn main() {
1214
assert_eq!(3 as uint * 3, 9);
1315
assert_eq!(3 as (uint) * 3, 9);

src/test/run-pass/asm-concat-src.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// pretty-expanded FIXME #23616
12+
1113
#![feature(asm)]
1214

1315
pub fn main() {

src/test/run-pass/asm-in-out-operand.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// pretty-expanded FIXME #23616
12+
1113
#![feature(asm)]
1214

1315
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]

src/test/run-pass/asm-out-assign.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// pretty-expanded FIXME #23616
12+
1113
#![feature(asm)]
1214

1315
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]

src/test/run-pass/assign-assign.rs

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
// except according to those terms.
1010

1111
// Issue 483 - Assignment expressions result in nil
12+
// pretty-expanded FIXME #23616
13+
1214
fn test_assign() {
1315
let mut x: int;
1416
let y: () = x = 10;

src/test/run-pass/assignability-trait.rs

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
// making method calls, but only if there aren't any matches without
1313
// it.
1414

15+
// pretty-expanded FIXME #23616
16+
1517
#![feature(unboxed_closures)]
1618

1719
trait iterable<A> {

src/test/run-pass/associated-types-basic.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// pretty-expanded FIXME #23616
12+
1113
#![feature(core)]
1214

1315
use std::marker::MarkerTrait;

src/test/run-pass/associated-types-binding-in-trait.rs

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
// Test a case where the associated type binding (to `bool`, in this
1212
// case) is derived from the trait definition. Issue #21636.
1313

14+
// pretty-expanded FIXME #23616
15+
1416
use std::vec;
1517

1618
pub trait BitIter {

src/test/run-pass/associated-types-binding-in-where-clause.rs

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
// Test equality constraints on associated types in a where clause.
1212

13+
// pretty-expanded FIXME #23616
14+
1315
pub trait Foo {
1416
type A;
1517
fn boo(&self) -> <Self as Foo>::A;

src/test/run-pass/associated-types-bound.rs

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
// Test equality constrai32s on associated types in a where clause.
1212

13+
// pretty-expanded FIXME #23616
14+
1315
pub trait ToI32 {
1416
fn to_i32(&self) -> i32;
1517
}

src/test/run-pass/associated-types-conditional-dispatch.rs

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
// `Target=[A]`, then the impl marked with `(*)` is seen to conflict
1515
// with all the others.
1616

17+
// pretty-expanded FIXME #23616
18+
1719
use std::marker::PhantomData;
1820
use std::ops::Deref;
1921

src/test/run-pass/associated-types-constant-type.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// pretty-expanded FIXME #23616
12+
1113
trait SignedUnsigned {
1214
type Opposite;
1315
fn convert(self) -> Self::Opposite;

src/test/run-pass/associated-types-doubleendediterator-object.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// pretty-expanded FIXME #23616
12+
1113
#![allow(unknown_features)]
1214
#![feature(box_syntax)]
1315

src/test/run-pass/associated-types-duplicate-binding-in-env-hrtb.rs

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
// (modulo bound lifetime names) appears in the environment
1313
// twice. Issue #21965.
1414

15+
// pretty-expanded FIXME #23616
16+
1517
fn foo<T>(t: T) -> i32
1618
where T : for<'a> Fn(&'a u8) -> i32,
1719
T : for<'b> Fn(&'b u8) -> i32,

src/test/run-pass/associated-types-duplicate-binding-in-env.rs

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
// Check that we do not report ambiguities when the same predicate
1212
// appears in the environment twice. Issue #21965.
1313

14+
// pretty-expanded FIXME #23616
15+
1416
trait Foo {
1517
type B;
1618

src/test/run-pass/associated-types-enum-field-named.rs

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
// Test associated types appearing in struct-like enum variants.
1212

13+
// pretty-expanded FIXME #23616
14+
1315
use self::VarValue::*;
1416

1517
pub trait UnifyKey {

src/test/run-pass/associated-types-enum-field-numbered.rs

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
// Test associated types appearing in tuple-like enum variants.
1212

13+
// pretty-expanded FIXME #23616
14+
1315
use self::VarValue::*;
1416

1517
pub trait UnifyKey {

src/test/run-pass/associated-types-eq-obj.rs

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
// Test equality constraints on associated types inside of an object type
1212

13+
// pretty-expanded FIXME #23616
14+
1315
pub trait Foo {
1416
type A;
1517
fn boo(&self) -> <Self as Foo>::A;

src/test/run-pass/associated-types-in-default-method.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// pretty-expanded FIXME #23616
12+
1113
trait Get {
1214
type Value;
1315
fn get(&self) -> &<Self as Get>::Value;

src/test/run-pass/associated-types-in-fn.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// pretty-expanded FIXME #23616
12+
1113
trait Get {
1214
type Value;
1315
fn get(&self) -> &<Self as Get>::Value;

src/test/run-pass/associated-types-in-impl-generics.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// pretty-expanded FIXME #23616
12+
1113
trait Get {
1214
type Value;
1315
fn get(&self) -> &<Self as Get>::Value;

src/test/run-pass/associated-types-in-inherent-method.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// pretty-expanded FIXME #23616
12+
1113
trait Get {
1214
type Value;
1315
fn get(&self) -> &<Self as Get>::Value;

src/test/run-pass/associated-types-issue-20220.rs

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
// Test references to `Self::Item` in the trait. Issue #20220.
1212

13+
// pretty-expanded FIXME #23616
14+
1315
use std::vec;
1416

1517
trait IntoIteratorX {

src/test/run-pass/associated-types-issue-20371.rs

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
// Test that we are able to have an impl that defines an associated type
1212
// before the actual trait.
1313

14+
// pretty-expanded FIXME #23616
15+
1416
#![feature(core)]
1517

1618
use std::marker::MarkerTrait;

src/test/run-pass/associated-types-issue-21212.rs

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
// where clauses in the environment which in turn required normalizing
1414
// `Self::Input`.
1515

16+
// pretty-expanded FIXME #23616
17+
1618
pub trait Parser {
1719
type Input;
1820

src/test/run-pass/associated-types-iterator-binding.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// pretty-expanded FIXME #23616
12+
1113
fn pairwise_sub<T:DoubleEndedIterator<Item=int>>(mut t: T) -> int {
1214
let mut result = 0;
1315
loop {

src/test/run-pass/associated-types-nested-projections.rs

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
// Test that we can resolve nested projection types. Issue #20666.
1212

13+
// pretty-expanded FIXME #23616
14+
1315
#![feature(core)]
1416

1517
use std::marker::MarkerTrait;

src/test/run-pass/associated-types-normalize-in-bounds-binding.rs

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
// Test that we normalize associated types that appear in a bound that
1212
// contains a binding. Issue #21664.
1313

14+
// pretty-expanded FIXME #23616
15+
1416
#![feature(core)]
1517
#![allow(dead_code)]
1618

0 commit comments

Comments
 (0)