use std::path::PathBuf;
use std::process::Command;
-
fn main() {
let out_dir = PathBuf::from(env::var_os("OUT_DIR").unwrap());
use rustfmt::{run, Input};
use rustfmt::config;
-
fn prune_files(files: Vec<&str>) -> Vec<&str> {
let prefixes: Vec<_> = files
.iter()
#![cfg(not(test))]
-
extern crate env_logger;
extern crate getopts;
extern crate rustfmt_nightly as rustfmt;
}
}
-
-
-
/// 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.
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,
}
}
-
fn remove_comment_header(comment: &str) -> &str {
if comment.starts_with("///") || comment.starts_with("//!") {
&comment[3..]
use lists::{ListTactic, SeparatorPlace, SeparatorTactic};
use Summary;
-
macro_rules! is_nightly_channel {
() => {
env::var("CFG_RELEASE_CHANNEL")
Wide,
}
-
impl Density {
pub fn to_list_tactic(self) -> ListTactic {
match self {
Ok(None)
}
-
-
create_config! {
// Fundamental stuff
max_width: usize, 100, true, "Maximum width of each line";
use syntax::ast;
use syntax::codemap::{BytePos, Span};
-
use spanned::Spanned;
use codemap::SpanUtils;
use comment::combine_strs_with_missing_comments;
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);
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>(
();
}
-
'label: loop
// loop comment
{
();
}
-
cond = true;
while cond
{
();
}
-
'while_label: while cond
{
// while comment
();
}
-
for obj in iter
{
for sub_obj in obj
();
}
-
'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 {
();
}
-
let a = if 0 > 1 { unreachable!() } else { 0x0 };
-
if true
{
();
();
}
-
let a = if 0 > 1 { unreachable!() } else { 0x0 };
-
if true {
();
} else if false {
();
}
-
let a = if 0 > 1 { unreachable!() } else { 0x0 };
-
if true {
();
}
Arm2,
}
-
fn foo() {
let test = TestEnum::Arm1;
match test {
Right { list: I, root: T }, // Post Comment
}
-
enum EmtpyWithComment {
// Some comment
}
"cool"
}
-
fn weird_comment(
// /*/ double level */ comment
x: Hello, // /*/* triple, even */*/
}
-
fn foo<U, T>(
a: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,
b: BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB,
}
}
-
mod b {
mod a {
impl Foo {
println!("{}", i);
}
-
while true {
hello();
}
T,
> = ();
-
pub type WithWhereClause<LONGPARAMETERNAME, T>
where
T: Clone,