1
Fork 0

Cargo fmt and update tests

This commit is contained in:
Seiichi Uchida 2017-12-02 17:45:39 +09:00
parent c4c9bf028a
commit 89f27764ed
20 changed files with 0 additions and 36 deletions

View file

@ -14,7 +14,6 @@ use std::io::Write;
use std::path::PathBuf;
use std::process::Command;
fn main() {
let out_dir = PathBuf::from(env::var_os("OUT_DIR").unwrap());

View file

@ -14,7 +14,6 @@ use getopts::{Matches, Options};
use rustfmt::{run, Input};
use rustfmt::config;
fn prune_files(files: Vec<&str>) -> Vec<&str> {
let prefixes: Vec<_> = files
.iter()

View file

@ -10,7 +10,6 @@
#![cfg(not(test))]
extern crate env_logger;
extern crate getopts;
extern crate rustfmt_nightly as rustfmt;

View file

@ -824,9 +824,6 @@ impl<'a> Iterator for UngroupedCommentCodeSlices<'a> {
}
}
/// Iterator over an alternating sequence of functional and commented parts of
/// a string. The first item is always a, possibly zero length, subslice of
/// functional text. Line style comments contain their ending newlines.
@ -948,7 +945,6 @@ fn changed_comment_content(orig: &str, new: &str) -> bool {
res
}
/// Iterator over the 'payload' characters of a comment.
/// It skips whitespace, comment start/end marks, and '*' at the beginning of lines.
/// The comment must be one comment, ie not more than one start mark (no multiple line comments,
@ -994,7 +990,6 @@ impl<'a> Iterator for CommentReducer<'a> {
}
}
fn remove_comment_header(comment: &str) -> &str {
if comment.starts_with("///") || comment.starts_with("//!") {
&comment[3..]

View file

@ -21,7 +21,6 @@ use file_lines::FileLines;
use lists::{ListTactic, SeparatorPlace, SeparatorTactic};
use Summary;
macro_rules! is_nightly_channel {
() => {
env::var("CFG_RELEASE_CHANNEL")
@ -88,7 +87,6 @@ configuration_option_enum! { TypeDensity:
Wide,
}
impl Density {
pub fn to_list_tactic(self) -> ListTactic {
match self {
@ -579,8 +577,6 @@ pub fn get_toml_path(dir: &Path) -> Result<Option<PathBuf>, Error> {
Ok(None)
}
create_config! {
// Fundamental stuff
max_width: usize, 100, true, "Maximum width of each line";

View file

@ -13,7 +13,6 @@ use std::cmp::Ordering;
use syntax::ast;
use syntax::codemap::{BytePos, Span};
use spanned::Spanned;
use codemap::SpanUtils;
use comment::combine_strs_with_missing_comments;

View file

@ -285,7 +285,6 @@ impl<'a> FmtVisitor<'a> {
self.format_item(item);
}
fn format_foreign_item(&mut self, item: &ast::ForeignItem) {
let rewrite = item.rewrite(&self.get_context(), self.shape());
self.push_rewrite(item.span(), rewrite);

View file

@ -18,7 +18,6 @@ use syntax::parse::parser;
use utils::contains_skip;
/// List all the files containing modules of a crate.
/// If a file is used twice in a crate, it appears only once.
pub fn list_files<'a>(

View file

@ -7,28 +7,24 @@ fn main() {
();
}
'label: loop
// loop comment
{
();
}
cond = true;
while cond
{
();
}
'while_label: while cond
{
// while comment
();
}
for obj in iter
{
for sub_obj in obj

View file

@ -6,26 +6,22 @@ fn main() {
();
}
'label: loop
// loop comment
{
();
}
cond = true;
while cond {
();
}
'while_label: while cond {
// while comment
();
}
for obj in iter {
for sub_obj in obj {
'nested_while_label: while cond {

View file

@ -14,10 +14,8 @@ fn main() {
();
}
let a = if 0 > 1 { unreachable!() } else { 0x0 };
if true
{
();

View file

@ -13,10 +13,8 @@ fn main() {
();
}
let a = if 0 > 1 { unreachable!() } else { 0x0 };
if true {
();
} else if false {

View file

@ -13,10 +13,8 @@ fn main() {
();
}
let a = if 0 > 1 { unreachable!() } else { 0x0 };
if true {
();
}

View file

@ -3,7 +3,6 @@ enum TestEnum {
Arm2,
}
fn foo() {
let test = TestEnum::Arm1;
match test {

View file

@ -95,7 +95,6 @@ where
Right { list: I, root: T }, // Post Comment
}
enum EmtpyWithComment {
// Some comment
}

View file

@ -18,7 +18,6 @@ fn simple(
"cool"
}
fn weird_comment(
// /*/ double level */ comment
x: Hello, // /*/* triple, even */*/

View file

@ -24,7 +24,6 @@ where
}
fn foo<U, T>(
a: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,
b: BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB,

View file

@ -78,7 +78,6 @@ mod a {
}
}
mod b {
mod a {
impl Foo {

View file

@ -129,7 +129,6 @@ fn main() {
println!("{}", i);
}
while true {
hello();
}

View file

@ -52,7 +52,6 @@ pub type CommentTest<
T,
> = ();
pub type WithWhereClause<LONGPARAMETERNAME, T>
where
T: Clone,