Skip to content

Commit 96b3261

Browse files
committed
Apply rustfmt :(
1 parent 515446c commit 96b3261

File tree

2 files changed

+8
-18
lines changed

2 files changed

+8
-18
lines changed

src/librustc_parse/parser/diagnostics.rs

+5-14
Original file line numberDiff line numberDiff line change
@@ -41,25 +41,15 @@ pub(super) fn dummy_arg(ident: Ident) -> Param {
4141
}
4242

4343
pub enum Error {
44-
FileNotFoundForModule {
45-
mod_name: String,
46-
default_path: PathBuf,
47-
},
48-
DuplicatePaths {
49-
mod_name: String,
50-
default_path: String,
51-
secondary_path: String,
52-
},
44+
FileNotFoundForModule { mod_name: String, default_path: PathBuf },
45+
DuplicatePaths { mod_name: String, default_path: String, secondary_path: String },
5346
UselessDocComment,
5447
}
5548

5649
impl Error {
5750
fn span_err(self, sp: impl Into<MultiSpan>, handler: &Handler) -> DiagnosticBuilder<'_> {
5851
match self {
59-
Error::FileNotFoundForModule {
60-
ref mod_name,
61-
ref default_path,
62-
} => {
52+
Error::FileNotFoundForModule { ref mod_name, ref default_path } => {
6353
let mut err = struct_span_err!(
6454
handler,
6555
sp,
@@ -69,7 +59,8 @@ impl Error {
6959
);
7060
err.help(&format!(
7161
"to create the module `{}`, create file \"{}\"",
72-
mod_name, default_path.display(),
62+
mod_name,
63+
default_path.display(),
7364
));
7465
err
7566
}

src/librustc_parse/parser/module.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -234,10 +234,9 @@ impl<'a> Parser<'a> {
234234
path: secondary_path,
235235
directory_ownership: DirectoryOwnership::Owned { relative: None },
236236
}),
237-
(false, false) => Err(Error::FileNotFoundForModule {
238-
mod_name: mod_name.clone(),
239-
default_path,
240-
}),
237+
(false, false) => {
238+
Err(Error::FileNotFoundForModule { mod_name: mod_name.clone(), default_path })
239+
}
241240
(true, true) => Err(Error::DuplicatePaths {
242241
mod_name: mod_name.clone(),
243242
default_path: default_path_str,

0 commit comments

Comments
 (0)