Skip to content

Commit c73348a

Browse files
refactor: consume errors/diag. from rustc_errors
1 parent 050b0e1 commit c73348a

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

rustfmt-core/rustfmt-lib/src/syntux/parser.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@ use std::borrow::Cow;
22
use std::panic::{catch_unwind, AssertUnwindSafe};
33
use std::path::{Path, PathBuf};
44

5+
use rustc_errors::{Diagnostic, PResult};
56
use rustc_parse::{new_sub_parser_from_file, parser::Parser as RawParser};
67
use rustc_span::{DUMMY_SP, Span, symbol::kw};
78
use syntax::ast;
8-
use syntax::errors::Diagnostic;
99
use syntax::token::{DelimToken, TokenKind};
10-
use syntax::parse::PResult;
1110

1211
use crate::syntux::session::ParseSess;
1312
use crate::{Config, Input};

rustfmt-core/rustfmt-lib/src/syntux/session.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ use std::path::Path;
33
use std::rc::Rc;
44

55
use rustc_data_structures::sync::Send;
6+
use rustc_errors::emitter::{Emitter, EmitterWriter};
7+
use rustc_errors::{ColorConfig, Diagnostic, Handler, Level as DiagnosticLevel};
68
use rustc_span::{BytePos, source_map::{FilePathMapping, SourceMap}, Span};
79
use syntax::ast;
8-
use syntax::errors::emitter::{ColorConfig, Emitter, EmitterWriter};
9-
use syntax::errors::{Diagnostic, Handler, Level as DiagnosticLevel};
1010
use syntax::sess::ParseSess as RawParseSess;
1111

1212
use crate::config::file_lines::LineRange;

0 commit comments

Comments
 (0)