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
-1
View File
@@ -14,7 +14,6 @@
use std::path::PathBuf;
use std::process::Command;
fn main() {
let out_dir = PathBuf::from(env::var_os("OUT_DIR").unwrap());
-1
View File
@@ -14,7 +14,6 @@
use rustfmt::{run, Input};
use rustfmt::config;
fn prune_files(files: Vec<&str>) -> Vec<&str> {
let prefixes: Vec<_> = files
.iter()
-1
View File
@@ -10,7 +10,6 @@
#![cfg(not(test))]
extern crate env_logger;
extern crate getopts;
extern crate rustfmt_nightly as rustfmt;
-5
View File
@@ -824,9 +824,6 @@ fn next(&mut self) -> Option<Self::Item> {
}
}
/// 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 @@ fn next(&mut self) -> Option<Self::Item> {
}
}
fn remove_comment_header(comment: &str) -> &str {
if comment.starts_with("///") || comment.starts_with("//!") {
&comment[3..]
-4
View File
@@ -21,7 +21,6 @@
use lists::{ListTactic, SeparatorPlace, SeparatorTactic};
use Summary;
macro_rules! is_nightly_channel {
() => {
env::var("CFG_RELEASE_CHANNEL")
@@ -88,7 +87,6 @@ pub enum $e {
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";
-1
View File
@@ -13,7 +13,6 @@
use syntax::ast;
use syntax::codemap::{BytePos, Span};
use spanned::Spanned;
use codemap::SpanUtils;
use comment::combine_strs_with_missing_comments;
-1
View File
@@ -285,7 +285,6 @@ pub fn format_foreign_mod(&mut self, fm: &ast::ForeignMod, span: Span) {
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);
-1
View File
@@ -18,7 +18,6 @@
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>(
@@ -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
@@ -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 {
@@ -14,10 +14,8 @@ fn main() {
();
}
let a = if 0 > 1 { unreachable!() } else { 0x0 };
if true
{
();
@@ -13,10 +13,8 @@ fn main() {
();
}
let a = if 0 > 1 { unreachable!() } else { 0x0 };
if true {
();
} else if false {
@@ -13,10 +13,8 @@ fn main() {
();
}
let a = if 0 > 1 { unreachable!() } else { 0x0 };
if true {
();
}
@@ -3,7 +3,6 @@ enum TestEnum {
Arm2,
}
fn foo() {
let test = TestEnum::Arm1;
match test {
-1
View File
@@ -95,7 +95,6 @@ pub enum GenericEnum<I, T>
Right { list: I, root: T }, // Post Comment
}
enum EmtpyWithComment {
// Some comment
}
-1
View File
@@ -18,7 +18,6 @@ fn op(
"cool"
}
fn weird_comment(
// /*/ double level */ comment
x: Hello, // /*/* triple, even */*/
-1
View File
@@ -24,7 +24,6 @@ fn foo(
}
fn foo<U, T>(
a: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,
b: BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB,
-1
View File
@@ -78,7 +78,6 @@ fn foo() {}
}
}
mod b {
mod a {
impl Foo {
-1
View File
@@ -129,7 +129,6 @@ fn main() {
println!("{}", i);
}
while true {
hello();
}
-1
View File
@@ -52,7 +52,6 @@
T,
> = ();
pub type WithWhereClause<LONGPARAMETERNAME, T>
where
T: Clone,