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:
commit
45683187ea
@ -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)
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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`
|
||||
|
@ -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
|
||||
|
@ -13,8 +13,6 @@
|
||||
|
||||
// aux-build:coherence_lib.rs
|
||||
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
extern crate coherence_lib as lib;
|
||||
use lib::Remote;
|
||||
|
||||
|
@ -13,8 +13,6 @@
|
||||
|
||||
// aux-build:coherence_lib.rs
|
||||
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
extern crate coherence_lib as lib;
|
||||
use lib::Remote;
|
||||
|
||||
|
@ -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() {
|
||||
|
@ -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;
|
||||
|
||||
|
@ -9,7 +9,6 @@
|
||||
// except according to those terms.
|
||||
|
||||
// revisions: a
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
// Counterpart to `meta-expected-error-wrong-rev.rs`
|
||||
|
||||
|
@ -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
|
||||
|
@ -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 {
|
||||
|
@ -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)]
|
||||
|
||||
|
@ -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
|
||||
|
@ -17,6 +17,5 @@ fn f(v: &[isize]) -> isize {
|
||||
for e in v {
|
||||
n = *e; // This comment once triggered pretty printer bug
|
||||
}
|
||||
|
||||
n
|
||||
}
|
||||
|
@ -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() {
|
||||
|
@ -10,10 +10,6 @@
|
||||
|
||||
// Issue #7580
|
||||
|
||||
// ignore-pretty
|
||||
//
|
||||
// Expanded pretty printing causes resolve conflicts.
|
||||
|
||||
// error-pattern:panic works
|
||||
|
||||
use std::*;
|
||||
|
@ -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() {
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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() {}
|
||||
|
@ -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]
|
||||
|
@ -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]
|
||||
|
@ -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]
|
||||
|
@ -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)]
|
||||
|
@ -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)]
|
||||
|
@ -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;
|
||||
|
@ -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)]
|
||||
|
@ -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)]
|
||||
|
@ -10,8 +10,6 @@
|
||||
|
||||
// aux-build:lint_plugin_test.rs
|
||||
// ignore-stage1
|
||||
// ignore-pretty
|
||||
|
||||
#![feature(plugin)]
|
||||
#![plugin(lint_plugin_test)]
|
||||
#![allow(dead_code)]
|
||||
|
@ -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;
|
||||
|
@ -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)]
|
||||
|
||||
|
@ -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)]
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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 {
|
||||
|
@ -9,8 +9,6 @@
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: --cfg bar -D warnings
|
||||
// ignore-pretty
|
||||
|
||||
#![cfg(bar)]
|
||||
|
||||
fn main() {}
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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 {
|
||||
}
|
||||
|
@ -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,
|
||||
|
@ -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.
|
||||
|
@ -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)]
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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)]
|
||||
|
@ -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)]
|
||||
|
||||
|
@ -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
|
||||
|
@ -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]})
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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::*;
|
||||
|
@ -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> {
|
||||
|
@ -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';
|
||||
|
@ -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;
|
||||
|
@ -9,7 +9,6 @@
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: --test
|
||||
// no-pretty-expanded
|
||||
|
||||
#![deny(unstable)]
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -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.
|
||||
|
@ -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() {}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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)]
|
||||
|
@ -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() {}
|
||||
|
@ -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;
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
|
@ -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 {
|
||||
|
@ -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() {}
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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"]
|
||||
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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"]
|
||||
|
@ -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
Loading…
x
Reference in New Issue
Block a user