Skip to content

Commit

Permalink
refactor: apply rustc-ap 606 updates
Browse files Browse the repository at this point in the history
  • Loading branch information
calebcartwright committed Oct 5, 2019
1 parent 95d255e commit 3ce4197
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false

[*.rs]
indent_size = 4
12 changes: 9 additions & 3 deletions src/formatting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ struct SilentOnIgnoredFilesEmitter {
}

impl Emitter for SilentOnIgnoredFilesEmitter {
fn emit_diagnostic(&mut self, db: &DiagnosticBuilder<'_>) {
fn emit_diagnostic(&mut self, db: &Diagnostic) {
if let Some(primary_span) = &db.span.primary_span() {
let file_name = self.source_map.span_to_filename(*primary_span);
match file_name {
Expand Down Expand Up @@ -763,8 +763,14 @@ fn make_parse_sess(
ColorConfig::Never
};

let emitter_writer =
EmitterWriter::stderr(color_cfg, Some(source_map.clone()), false, false, None);
let emitter_writer = EmitterWriter::stderr(
color_cfg,
Some(source_map.clone()),
false,
false,
None,
false,
);
let emitter = Box::new(SilentOnIgnoredFilesEmitter {
has_non_ignorable_parser_errors: false,
ignore_path_set: ignore_path_set,
Expand Down

0 comments on commit 3ce4197

Please sign in to comment.