Skip to content

Commit 7d7cd17

Browse files
committed
errors: impl IntoDiagnosticArg for TargetTriple
Forward the `Display` implementation for `CrateType` to `IntoDiagnosticArg` so that it can be used in diagnostic structs. Signed-off-by: David Wood <[email protected]>
1 parent ae51741 commit 7d7cd17

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

compiler/rustc_errors/Cargo.toml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,22 @@ edition = "2021"
77
doctest = false
88

99
[dependencies]
10-
tracing = "0.1"
10+
annotate-snippets = "0.9"
11+
atty = "0.2"
12+
rustc_data_structures = { path = "../rustc_data_structures" }
1113
rustc_error_messages = { path = "../rustc_error_messages" }
14+
rustc_hir = { path = "../rustc_hir" }
15+
rustc_lint_defs = { path = "../rustc_lint_defs" }
16+
rustc_macros = { path = "../rustc_macros" }
1217
rustc_serialize = { path = "../rustc_serialize" }
1318
rustc_span = { path = "../rustc_span" }
14-
rustc_macros = { path = "../rustc_macros" }
15-
rustc_data_structures = { path = "../rustc_data_structures" }
1619
rustc_target = { path = "../rustc_target" }
17-
rustc_hir = { path = "../rustc_hir" }
18-
rustc_lint_defs = { path = "../rustc_lint_defs" }
19-
unicode-width = "0.1.4"
20-
atty = "0.2"
21-
termcolor = "1.0"
22-
annotate-snippets = "0.9"
23-
termize = "0.1.1"
2420
serde = { version = "1.0.125", features = [ "derive" ] }
2521
serde_json = "1.0.59"
22+
termcolor = "1.0"
23+
termize = "0.1.1"
24+
tracing = "0.1"
25+
unicode-width = "0.1.4"
2626

2727
[target.'cfg(windows)'.dependencies]
2828
winapi = { version = "0.3", features = [ "handleapi", "synchapi", "winbase" ] }

compiler/rustc_errors/src/diagnostic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ into_diagnostic_arg_using_display!(
100100
MacroRulesNormalizedIdent,
101101
ParseIntError,
102102
StackProtector,
103-
&TargetTriple,
103+
TargetTriple,
104104
SplitDebuginfo
105105
);
106106

0 commit comments

Comments
 (0)