Rollup merge of #37202 - petrochenkov:pretty, r=nrc

Fix some pretty printing tests

Many pretty-printing tests are un-ignored.
Some issues in classification of comments (trailing/isolated) and blank line counting are fixed.
Some comments are printed more carefully.
Some minor refactoring in pprust.rs
`no-pretty-expanded` annotations are removed because this is the default now.
`pretty-expanded` annotations are removed from compile-fail tests, they are not tested with pretty-printer.

Closes https://github.com/rust-lang/rust/issues/23623 in favor of more specific https://github.com/rust-lang/rust/issues/37201 and https://github.com/rust-lang/rust/issues/37199
r? @nrc
This commit is contained in:
Eduard-Mihai Burtescu 2016-10-19 08:00:01 +03:00 committed by GitHub
commit 45683187ea
111 changed files with 72 additions and 225 deletions

View File

@ -24,7 +24,7 @@ use str::char_at;
use std::io::Read;
use std::usize;
#[derive(Clone, Copy, PartialEq)]
#[derive(Clone, Copy, PartialEq, Debug)]
pub enum CommentStyle {
/// No code on either side of each line of the comment
Isolated,
@ -155,14 +155,13 @@ fn push_blank_line_comment(rdr: &StringReader, comments: &mut Vec<Comment>) {
fn consume_whitespace_counting_blank_lines(rdr: &mut StringReader, comments: &mut Vec<Comment>) {
while is_pattern_whitespace(rdr.ch) && !rdr.is_eof() {
if rdr.col == CharPos(0) && rdr.ch_is('\n') {
if rdr.ch_is('\n') {
push_blank_line_comment(rdr, &mut *comments);
}
rdr.bump();
}
}
fn read_shebang_comment(rdr: &mut StringReader,
code_to_the_left: bool,
comments: &mut Vec<Comment>) {
@ -317,14 +316,22 @@ fn read_block_comment(rdr: &mut StringReader,
}
fn consume_comment(rdr: &mut StringReader, code_to_the_left: bool, comments: &mut Vec<Comment>) {
fn consume_comment(rdr: &mut StringReader,
comments: &mut Vec<Comment>,
code_to_the_left: &mut bool,
anything_to_the_left: &mut bool) {
debug!(">>> consume comment");
if rdr.ch_is('/') && rdr.nextch_is('/') {
read_line_comments(rdr, code_to_the_left, comments);
read_line_comments(rdr, *code_to_the_left, comments);
*code_to_the_left = false;
*anything_to_the_left = false;
} else if rdr.ch_is('/') && rdr.nextch_is('*') {
read_block_comment(rdr, code_to_the_left, comments);
read_block_comment(rdr, *code_to_the_left, comments);
*anything_to_the_left = true;
} else if rdr.ch_is('#') && rdr.nextch_is('!') {
read_shebang_comment(rdr, code_to_the_left, comments);
read_shebang_comment(rdr, *code_to_the_left, comments);
*code_to_the_left = false;
*anything_to_the_left = false;
} else {
panic!();
}
@ -352,23 +359,29 @@ pub fn gather_comments_and_literals(span_diagnostic: &errors::Handler,
let mut comments: Vec<Comment> = Vec::new();
let mut literals: Vec<Literal> = Vec::new();
let mut first_read: bool = true;
let mut code_to_the_left = false; // Only code
let mut anything_to_the_left = false; // Code or comments
while !rdr.is_eof() {
loop {
let mut code_to_the_left = !first_read;
// Eat all the whitespace and count blank lines.
rdr.consume_non_eol_whitespace();
if rdr.ch_is('\n') {
if anything_to_the_left {
rdr.bump(); // The line is not blank, do not count.
}
consume_whitespace_counting_blank_lines(&mut rdr, &mut comments);
code_to_the_left = false;
consume_whitespace_counting_blank_lines(&mut rdr, &mut comments);
anything_to_the_left = false;
}
while rdr.peeking_at_comment() {
consume_comment(&mut rdr, code_to_the_left, &mut comments);
consume_whitespace_counting_blank_lines(&mut rdr, &mut comments);
// Eat one comment group
if rdr.peeking_at_comment() {
consume_comment(&mut rdr, &mut comments,
&mut code_to_the_left, &mut anything_to_the_left);
} else {
break
}
break;
}
let bstart = rdr.pos;
rdr.next_token();
// discard, and look ahead; we're working with internal state
@ -384,7 +397,8 @@ pub fn gather_comments_and_literals(span_diagnostic: &errors::Handler,
} else {
debug!("tok: {}", pprust::token_to_string(&tok));
}
first_read = false;
code_to_the_left = true;
anything_to_the_left = true;
}
(comments, literals)

View File

@ -545,15 +545,12 @@ pub trait PrintState<'a> {
}
fn maybe_print_comment(&mut self, pos: BytePos) -> io::Result<()> {
loop {
match self.next_comment() {
Some(ref cmnt) => {
if (*cmnt).pos < pos {
try!(self.print_comment(cmnt));
self.cur_cmnt_and_lit().cur_cmnt += 1;
} else { break; }
}
_ => break
while let Some(ref cmnt) = self.next_comment() {
if cmnt.pos < pos {
try!(self.print_comment(cmnt));
self.cur_cmnt_and_lit().cur_cmnt += 1;
} else {
break
}
}
Ok(())
@ -581,7 +578,9 @@ pub trait PrintState<'a> {
Ok(())
}
comments::Trailing => {
try!(word(self.writer(), " "));
if !self.is_bol() {
try!(word(self.writer(), " "));
}
if cmnt.lines.len() == 1 {
try!(word(self.writer(), &cmnt.lines[0]));
hardbreak(self.writer())
@ -1716,6 +1715,7 @@ impl<'a> State<'a> {
for (i, st) in blk.stmts.iter().enumerate() {
match st.node {
ast::StmtKind::Expr(ref expr) if i == blk.stmts.len() - 1 => {
try!(self.maybe_print_comment(st.span.lo));
try!(self.space_if_not_bol());
try!(self.print_expr_outer_attr_style(&expr, false));
try!(self.maybe_print_trailing_comment(expr.span, Some(blk.span.hi)));
@ -2605,6 +2605,7 @@ impl<'a> State<'a> {
}
try!(self.cbox(INDENT_UNIT));
try!(self.ibox(0));
try!(self.maybe_print_comment(arm.pats[0].span.lo));
try!(self.print_outer_attributes(&arm.attrs));
let mut first = true;
for p in &arm.pats {
@ -3010,15 +3011,11 @@ impl<'a> State<'a> {
_ => return Ok(())
};
if let Some(ref cmnt) = self.next_comment() {
if (*cmnt).style != comments::Trailing { return Ok(()) }
if cmnt.style != comments::Trailing { return Ok(()) }
let span_line = cm.lookup_char_pos(span.hi);
let comment_line = cm.lookup_char_pos((*cmnt).pos);
let mut next = (*cmnt).pos + BytePos(1);
if let Some(p) = next_pos {
next = p;
}
if span.hi < (*cmnt).pos && (*cmnt).pos < next &&
span_line.line == comment_line.line {
let comment_line = cm.lookup_char_pos(cmnt.pos);
let next = next_pos.unwrap_or(cmnt.pos + BytePos(1));
if span.hi < cmnt.pos && cmnt.pos < next && span_line.line == comment_line.line {
self.print_comment(cmnt)?;
self.cur_cmnt_and_lit.cur_cmnt += 1;
}

View File

@ -12,8 +12,6 @@
// The problem was specified to casting to `*`, as creating unsafe
// pointers was not being fully checked. Issue #20791.
// pretty-expanded FIXME #23616
fn main() {
let x: &i32;
let y = x as *const i32; //~ ERROR use of possibly uninitialized variable: `*x`

View File

@ -12,8 +12,6 @@
// aux-build:coherence_lib.rs
// pretty-expanded FIXME #23616
// Test that the `Pair` type reports an error if it contains type
// parameters, even when they are covered by local types. This test
// was originally intended to test the opposite, but the rules changed

View File

@ -13,8 +13,6 @@
// aux-build:coherence_lib.rs
// pretty-expanded FIXME #23616
extern crate coherence_lib as lib;
use lib::Remote;

View File

@ -13,8 +13,6 @@
// aux-build:coherence_lib.rs
// pretty-expanded FIXME #23616
extern crate coherence_lib as lib;
use lib::Remote;

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
fn foo(_: Box<FnMut()>) {}
fn main() {

View File

@ -11,8 +11,6 @@
// Test that a partially specified trait object with unspecified associated
// type does not type-check.
// pretty-expanded FIXME #23616
trait Foo {
type A;

View File

@ -9,7 +9,6 @@
// except according to those terms.
// revisions: a
// pretty-expanded FIXME #23616
// Counterpart to `meta-expected-error-wrong-rev.rs`

View File

@ -10,7 +10,6 @@
// revisions: a
// should-fail
// pretty-expanded FIXME #23616
// This is a "meta-test" of the compilertest framework itself. In
// particular, it includes the right error message, but the message

View File

@ -11,8 +11,6 @@
// Test that the lifetime from the enclosing `&` is "inherited"
// through the `Box` struct.
// pretty-expanded FIXME #23616
#![allow(dead_code)]
trait Test {

View File

@ -11,8 +11,6 @@
// Test that the lifetime from the enclosing `&` is "inherited"
// through the `MyBox` struct.
// pretty-expanded FIXME #23616
#![allow(dead_code)]
#![feature(rustc_error)]

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
#![allow(dead_code)]
// Get<T> is covariant in T

View File

@ -17,6 +17,5 @@ fn f(v: &[isize]) -> isize {
for e in v {
n = *e; // This comment once triggered pretty printer bug
}
n
}

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty : (#23623) problems when ending with // comments
// error-pattern:attempt to divide by zero
fn main() {

View File

@ -10,10 +10,6 @@
// Issue #7580
// ignore-pretty
//
// Expanded pretty printing causes resolve conflicts.
// error-pattern:panic works
use std::*;

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty : (#23623) problems when ending with // comments
// error-pattern:attempt to calculate the remainder with a divisor of zero
fn main() {

View File

@ -8,12 +8,9 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty : (#23623) problems when ending with // comments
// error-pattern:thread 'main' panicked at 'attempt to add with overflow'
// compile-flags: -C debug-assertions
fn main() {
let _x = 200u8 + 200u8 + 200u8;
}

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty : (#23623) problems when ending with // comments
// error-pattern:thread 'main' panicked at 'attempt to shift left with overflow'
// compile-flags: -C debug-assertions

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty : (#23623) problems when ending with // comments
// error-pattern:thread 'main' panicked at 'attempt to shift left with overflow'
// compile-flags: -C debug-assertions

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty : (#23623) problems when ending with // comments
// error-pattern:thread 'main' panicked at 'attempt to shift left with overflow'
// compile-flags: -C debug-assertions

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty : (#23623) problems when ending with // comments
// error-pattern:thread 'main' panicked at 'attempt to shift left with overflow'
// compile-flags: -C debug-assertions

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty : (#23623) problems when ending with // comments
// error-pattern:thread 'main' panicked at 'attempt to multiply with overflow'
// compile-flags: -C debug-assertions

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty : (#23623) problems when ending with // comments
// error-pattern:thread 'main' panicked at 'attempt to negate with overflow'
// compile-flags: -C debug-assertions

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty : (#23623) problems when ending with // comments
// error-pattern:thread 'main' panicked at 'attempt to shift right with overflow'
// compile-flags: -C debug-assertions

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty : (#23623) problems when ending with // comments
// error-pattern:thread 'main' panicked at 'attempt to shift right with overflow'
// compile-flags: -C debug-assertions

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty : (#23623) problems when ending with // comments
// error-pattern:thread 'main' panicked at 'attempt to shift right with overflow'
// compile-flags: -C debug-assertions

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty : (#23623) problems when ending with // comments
// error-pattern:thread 'main' panicked at 'attempt to shift right with overflow'
// compile-flags: -C debug-assertions

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty : (#23623) problems when ending with // comments
// error-pattern:thread 'main' panicked at 'attempt to shift right with overflow'
// compile-flags: -C debug-assertions

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty : (#23623) problems when ending with // comments
// error-pattern:thread 'main' panicked at 'attempt to shift right with overflow'
// compile-flags: -C debug-assertions

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty : (#23623) problems when ending with // comments
// error-pattern:thread 'main' panicked at 'attempt to subtract with overflow'
// compile-flags: -C debug-assertions

View File

@ -11,7 +11,6 @@
// error-pattern:runned an unexported test
// compile-flags:--test
// check-stdout
// ignore-pretty: does not work well with `--test`
mod m {
pub fn exported() {}

View File

@ -11,7 +11,6 @@
// check-stdout
// error-pattern:thread 'test_foo' panicked at
// compile-flags: --test
// ignore-pretty: does not work well with `--test`
// ignore-emscripten
#[test]

View File

@ -11,7 +11,6 @@
// check-stdout
// error-pattern:thread 'test_foo' panicked at
// compile-flags: --test
// ignore-pretty: does not work well with `--test`
// ignore-emscripten
#[test]

View File

@ -14,7 +14,6 @@
// error-pattern:should be a positive integer
// compile-flags: --test
// exec-env:RUST_TEST_THREADS=foo
// ignore-pretty: does not work well with `--test`
// ignore-emscripten
#[test]

View File

@ -10,8 +10,6 @@
// aux-build:custom_derive_partial_eq.rs
// ignore-stage1
// ignore-pretty : (#23623) problems when ending with // comments
#![feature(plugin, custom_derive)]
#![plugin(custom_derive_partial_eq)]
#![allow(unused)]

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty
// ignore-cross-compile
#![feature(quote, rustc_private)]

View File

@ -9,8 +9,6 @@
// except according to those terms.
// ignore-cross-compile
// ignore-pretty: does not work well with `--test`
#![feature(quote, rustc_private)]
extern crate syntax;

View File

@ -10,8 +10,6 @@
// aux-build:lint_group_plugin_test.rs
// ignore-stage1
// ignore-pretty
#![feature(plugin)]
#![plugin(lint_group_plugin_test)]
#![allow(dead_code)]

View File

@ -10,7 +10,6 @@
// aux-build:lint_plugin_test.rs
// ignore-stage1
// ignore-pretty: Random space appears with the pretty test
// compile-flags: -Z extra-plugins=lint_plugin_test
#![allow(dead_code)]

View File

@ -10,8 +10,6 @@
// aux-build:lint_plugin_test.rs
// ignore-stage1
// ignore-pretty
#![feature(plugin)]
#![plugin(lint_plugin_test)]
#![allow(dead_code)]

View File

@ -9,8 +9,6 @@
// except according to those terms.
// ignore-cross-compile
// ignore-pretty: does not work well with `--test`
#![feature(quote, rustc_private)]
extern crate syntax;

View File

@ -9,8 +9,6 @@
// except according to those terms.
// ignore-cross-compile
// ignore-pretty: does not work well with `--test`
#![feature(quote, rustc_private)]
#![deny(unused_variables)]

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty : (#23623) problems when ending with // comments
// no-prefer-dynamic
#![allow(dead_code)]

View File

@ -16,7 +16,7 @@
// "enable" to 0 instead.
// compile-flags:-g -Cllvm-args=-enable-tail-merge=0
// ignore-pretty as this critically relies on line numbers
// ignore-pretty issue #37195
// ignore-emscripten spawning processes is not supported
use std::io;

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// no-pretty-expanded FIXME #15189
// ignore-android FIXME #17520
// ignore-emscripten spawning processes is not supported
// compile-flags:-g

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty
// ignore-pretty issue #37199
fn match_ref(v: Option<isize>) -> isize {
match v {

View File

@ -9,8 +9,6 @@
// except according to those terms.
// compile-flags: --cfg bar -D warnings
// ignore-pretty
#![cfg(bar)]
fn main() {}

View File

@ -9,9 +9,8 @@
// except according to those terms.
// ignore-windows - this is a unix-specific test
// ignore-pretty issue #37199
// ignore-emscripten
// ignore-pretty
#![feature(process_exec)]
use std::env;

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty
// compile-flags:--test
// ignore-emscripten

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty
mod foo {
#![macro_escape] //~ WARNING macro_escape is a deprecated synonym for macro_use
//~^ HELP consider an outer attribute

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty
#[macro_escape] //~ WARNING macro_escape is a deprecated synonym for macro_use
mod foo {
}

View File

@ -8,9 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// no-pretty-expanded FIXME #15189
#[derive(PartialEq, Eq, PartialOrd, Ord)]
enum E<T> {
E0,

View File

@ -1,5 +1,3 @@
// ignore-pretty
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
//
// ignore-pretty
#![warn(variant_size_differences)]
#![allow(dead_code)]

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty: pprust doesn't print hygiene output
// Test that labels injected by macros do not break hygiene. This
// checks cases where the macros invocations are under the rhs of a
// let statement.

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// no-pretty-expanded unnecessary unsafe block generated
#![deny(warnings)]
#![allow(unused_must_use)]
#![allow(unused_features)]

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty : (#23623) problems when ending with // comments
#![feature(item_like_imports)]
#![allow(unused)]

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty
// ignore-pretty issue #37199
// Don't panic on blocks without results
// There are several tests in this run-pass that raised

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty
macro_rules! third {
($e:expr) => ({let x = 2; $e[x]})
}

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty
use std::rc::Rc;
use std::cell::Cell;

View File

@ -9,7 +9,6 @@
// except according to those terms.
// compile-flags:--test
// no-pretty-expanded
// This verifies that the test generation doesn't crash when we have
// no tests - for more information, see PR #16892.

View File

@ -9,7 +9,6 @@
// except according to those terms.
// compile-flags:--test
// ignore-pretty turns out the pretty-printer doesn't handle gensym'd things...
mod tests {
use super::*;

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty
#![allow(unknown_features)]
struct Parser<'a, I, O> {

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty
#![deny(dead_code)]
const LOW_RANGE: char = '0';

View File

@ -9,7 +9,7 @@
// except according to those terms.
// aux-build:i8.rs
// ignore-pretty (#23623)
// ignore-pretty issue #37201
extern crate i8;
use std::string as i16;

View File

@ -9,7 +9,6 @@
// except according to those terms.
// compile-flags: --test
// no-pretty-expanded
#![deny(unstable)]

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty
// ignore-pretty issue #37201
struct X { val: i32 }
impl std::ops::Deref for X {

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty : (#23623) problems when ending with // comments
// ignore-pretty issue #37201
// This test is ensuring that parameters are indeed dropped after
// temporaries in a fn body.

View File

@ -7,10 +7,9 @@
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
//
// ignore-pretty
// ignore-pretty issue #37195
mod issue_26873_multifile;
fn main() {}

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty #27582
// ignore-pretty issue #37201
// Check that when a `let`-binding occurs in a loop, its associated
// drop-flag is reinitialized (to indicate "needs-drop" at the end of

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty
fn main() {
const iter: i32 = 0;

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty : (#23623) problems with newlines before // comments
// ignore-pretty issue #37199
pub struct Foo;

View File

@ -11,8 +11,6 @@
// Regression test for #29740. Inefficient MIR matching algorithms
// generated way too much code for this sort of case, leading to OOM.
// ignore-pretty
pub mod KeyboardEventConstants {
pub const DOM_KEY_LOCATION_STANDARD: u32 = 0;
pub const DOM_KEY_LOCATION_LEFT: u32 = 1;

View File

@ -10,8 +10,6 @@
// compile-flags:--test
// rustc-env:RUSTC_BOOTSTRAP_KEY=
// ignore-pretty : (#23623) problems when ending with // comments
#![cfg(any())] // This test should be configured away
#![feature(rustc_attrs)] // Test that this is allowed on stable/beta
#![feature(iter_arith_traits)] // Test that this is not unused

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty
// (Closes #7911) Test that we can use the same self expression
// with different mutability in macro in two methods

View File

@ -9,8 +9,6 @@
// except according to those terms.
// ignore-emscripten no threads support
// ignore-pretty : (#23623) problems when ending with // comments
#![feature(rustc_attrs, zero_one)]
use std::num::Zero;

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty
// ignore-pretty unreported
#![allow(unknown_features)]
#![feature(box_syntax)]

View File

@ -15,7 +15,7 @@
// NB: this file needs CRLF line endings. The .gitattributes file in
// this directory should enforce it.
// ignore-pretty
// ignore-pretty issue #37195
/// Doc comment that ends in CRLF
pub fn foo() {}

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// no-pretty-expanded FIXME #15189
pub fn main() {
let x = vec!(1, 2, 3);
let mut y = 0;

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty - token trees can't pretty print
pub fn main() {
macro_rules! mylambda_tt {

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty - token trees can't pretty print
macro_rules! descriptions {
($name:ident is $desc:expr) => {
// Check that we will correctly expand attributes

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty - token trees can't pretty print
#![feature(custom_attribute)]
macro_rules! compiles_fine {

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty
// ignore-pretty issue #37195
fn bar() {}

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty - token trees can't pretty print
// compile-flags: --cfg foo
macro_rules! compiles_fine {

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty - token trees can't pretty print
macro_rules! make_foo {
() => (
struct Foo;

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty - token trees can't pretty print
macro_rules! myfn {
( $f:ident, ( $( $x:ident ),* ), $body:block ) => (
fn $f( $( $x : isize),* ) -> isize $body

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty : (#23623) problems when ending with // comments
// check raw fat pointer ops in mir
// FIXME: please improve this when we get monomorphization support

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty
// ignore-pretty issue #37195
mod mod_dir_implicit_aux;

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty
// ignore-pretty issue #37195
mod mod_dir_simple {
#[path = "test.rs"]

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty
// ignore-pretty issue #37195
#[path = "mod_dir_simple"]
mod pancakes {

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty
// ignore-pretty issue #37195
#[path = "mod_dir_simple"]
mod pancakes {

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty
// ignore-pretty issue #37195
#[path = "mod_dir_simple"]
mod biscuits {

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty
// ignore-pretty issue #37195
// Testing that the parser for each file tracks its modules
// and paths independently. The load_another_mod module should

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty
// ignore-pretty issue #37195
mod mod_dir_simple {
pub mod test;

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty
// ignore-pretty issue #37195
// Testing that a plain .rs file can load modules from other source files

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty
// ignore-pretty issue #37195
// Testing that a plain .rs file can load modules from other source files

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// no-pretty-expanded
// This file is intended to test only that methods are automatically
// reachable for each numeric type, for each exported impl, with no imports
// necessary. Testing the methods of the impls is done within the source

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty
// compile-flags:--test
#![reexport_test_harness_main = "test_main"]

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-pretty
#![feature(issue_5723_bootstrap)]
trait Foo {

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