Remove a few unnecessary rustfmt_skip
s
This commit is contained in:
parent
99ffb5af99
commit
a29023a191
3 changed files with 3 additions and 19 deletions
|
@ -128,9 +128,6 @@ impl Rewrite for ast::Expr {
|
||||||
ast::Expr_::ExprAssignOp(ref op, ref lhs, ref rhs) => {
|
ast::Expr_::ExprAssignOp(ref op, ref lhs, ref rhs) => {
|
||||||
rewrite_assignment(context, lhs, rhs, Some(op), width, offset)
|
rewrite_assignment(context, lhs, rhs, Some(op), width, offset)
|
||||||
}
|
}
|
||||||
// FIXME #184 Note that this formatting is broken due to a bad span
|
|
||||||
// from the parser.
|
|
||||||
// `continue`
|
|
||||||
ast::Expr_::ExprAgain(ref opt_ident) => {
|
ast::Expr_::ExprAgain(ref opt_ident) => {
|
||||||
let id_str = match *opt_ident {
|
let id_str = match *opt_ident {
|
||||||
Some(ident) => format!(" {}", ident.node),
|
Some(ident) => format!(" {}", ident.node),
|
||||||
|
|
17
src/lib.rs
17
src/lib.rs
|
@ -237,8 +237,6 @@ fn fmt_ast(krate: &ast::Crate, codemap: &CodeMap, config: &Config) -> FileMap {
|
||||||
// Formatting done on a char by char or line by line basis.
|
// Formatting done on a char by char or line by line basis.
|
||||||
// TODO warn on bad license
|
// TODO warn on bad license
|
||||||
// TODO other stuff for parity with make tidy
|
// TODO other stuff for parity with make tidy
|
||||||
// FIXME skipping due to `continue`, #184.
|
|
||||||
#[rustfmt_skip]
|
|
||||||
fn fmt_lines(file_map: &mut FileMap, config: &Config) -> FormatReport {
|
fn fmt_lines(file_map: &mut FileMap, config: &Config) -> FormatReport {
|
||||||
let mut truncate_todo = Vec::new();
|
let mut truncate_todo = Vec::new();
|
||||||
let mut report = FormatReport { file_error_map: HashMap::new() };
|
let mut report = FormatReport { file_error_map: HashMap::new() };
|
||||||
|
@ -260,10 +258,7 @@ fn fmt_lines(file_map: &mut FileMap, config: &Config) -> FormatReport {
|
||||||
|
|
||||||
// Add warnings for bad todos/ fixmes
|
// Add warnings for bad todos/ fixmes
|
||||||
if let Some(issue) = issue_seeker.inspect(c) {
|
if let Some(issue) = issue_seeker.inspect(c) {
|
||||||
errors.push(FormattingError {
|
errors.push(FormattingError { line: cur_line, kind: ErrorKind::BadIssue(issue) });
|
||||||
line: cur_line,
|
|
||||||
kind: ErrorKind::BadIssue(issue)
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if c == '\n' {
|
if c == '\n' {
|
||||||
|
@ -274,10 +269,7 @@ fn fmt_lines(file_map: &mut FileMap, config: &Config) -> FormatReport {
|
||||||
}
|
}
|
||||||
// Check for any line width errors we couldn't correct.
|
// Check for any line width errors we couldn't correct.
|
||||||
if line_len > config.max_width {
|
if line_len > config.max_width {
|
||||||
errors.push(FormattingError {
|
errors.push(FormattingError { line: cur_line, kind: ErrorKind::LineOverflow });
|
||||||
line: cur_line,
|
|
||||||
kind: ErrorKind::LineOverflow
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
line_len = 0;
|
line_len = 0;
|
||||||
cur_line += 1;
|
cur_line += 1;
|
||||||
|
@ -302,10 +294,7 @@ fn fmt_lines(file_map: &mut FileMap, config: &Config) -> FormatReport {
|
||||||
}
|
}
|
||||||
|
|
||||||
for &(l, _, _) in &trims {
|
for &(l, _, _) in &trims {
|
||||||
errors.push(FormattingError {
|
errors.push(FormattingError { line: l, kind: ErrorKind::TrailingWhitespace });
|
||||||
line: l,
|
|
||||||
kind: ErrorKind::TrailingWhitespace
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
report.file_error_map.insert(f.to_owned(), errors);
|
report.file_error_map.insert(f.to_owned(), errors);
|
||||||
|
|
|
@ -149,8 +149,6 @@ impl<'a> Rewrite for SegmentParam<'a> {
|
||||||
// We'd really rather not do this, but there doesn't seem to be an alternative
|
// We'd really rather not do this, but there doesn't seem to be an alternative
|
||||||
// at this point.
|
// at this point.
|
||||||
// FIXME: fails with spans containing comments with the characters < or :
|
// FIXME: fails with spans containing comments with the characters < or :
|
||||||
// FIXME #184 skip due to continue.
|
|
||||||
#[rustfmt_skip]
|
|
||||||
fn get_path_separator(codemap: &CodeMap,
|
fn get_path_separator(codemap: &CodeMap,
|
||||||
path_start: BytePos,
|
path_start: BytePos,
|
||||||
segment_start: BytePos)
|
segment_start: BytePos)
|
||||||
|
|
Loading…
Reference in a new issue