Skip to content

Commit b994c82

Browse files
committed
Apply suggestions
1 parent 6315245 commit b994c82

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

compiler/rustc_session/src/config.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1312,11 +1312,11 @@ impl CrateType {
13121312
format!(
13131313
"`{}`, `{}`, `{}`, `{}`, `{}`, `{}`",
13141314
CrateType::Executable.shorthand(),
1315+
CrateType::Cdylib.shorthand(),
13151316
CrateType::Dylib.shorthand(),
1316-
CrateType::Rlib.shorthand(),
13171317
CrateType::Staticlib.shorthand(),
1318-
CrateType::Cdylib.shorthand(),
13191318
CrateType::ProcMacro.shorthand(),
1319+
CrateType::Rlib.shorthand(),
13201320
)
13211321
}
13221322
}
@@ -2703,7 +2703,7 @@ pub fn parse_crate_types_from_list(list_list: Vec<String>) -> Result<Vec<CrateTy
27032703
"proc-macro" => CrateType::ProcMacro,
27042704
_ => {
27052705
return Err(format!(
2706-
"unknown crate type: `{part}` - expected one of: {display}",
2706+
"unknown crate type `{part}`, expected one of: {display}",
27072707
display = CrateType::shorthands_display()
27082708
));
27092709
}

tests/ui/crate_type_flag.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
//@ compile-flags: --crate-type dynlib
2-
//@ error-pattern: unknown crate type: `dynlib` - expected one of: `bin`, `dylib`, `rlib`, `lib`, `cdylib`, `proc-macro`
2+
//@ error-pattern: unknown crate type `dynlib`, expected one of: `bin`, `cdylib`, `dylib`, `lib`, `proc-macro`, `rlib`
33

44
fn main() {}

tests/ui/crate_type_flag.stderr

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
error: unknown crate type: `dynlib` - expected one of: `bin`, `dylib`, `rlib`, `lib`, `cdylib`, `proc-macro`
2-
1+
error: unknown crate type `dynlib`, expected one of: `bin`, `cdylib`, `dylib`, `lib`, `proc-macro`, `rlib`

0 commit comments

Comments
 (0)