Skip to content

Commit 1722b8e

Browse files
Convert to inline diagnostics in rustc_infer
1 parent 46c86ae commit 1722b8e

7 files changed

Lines changed: 4 additions & 16 deletions

File tree

Cargo.lock

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3795,7 +3795,6 @@ dependencies = [
37953795
"rustc_hir_typeck",
37963796
"rustc_incremental",
37973797
"rustc_index",
3798-
"rustc_infer",
37993798
"rustc_interface",
38003799
"rustc_lexer",
38013800
"rustc_lint",
@@ -4093,7 +4092,6 @@ version = "0.0.0"
40934092
dependencies = [
40944093
"rustc_data_structures",
40954094
"rustc_errors",
4096-
"rustc_fluent_macro",
40974095
"rustc_hir",
40984096
"rustc_index",
40994097
"rustc_macros",

compiler/rustc_driver_impl/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ rustc_hir_pretty = { path = "../rustc_hir_pretty" }
2727
rustc_hir_typeck = { path = "../rustc_hir_typeck" }
2828
rustc_incremental = { path = "../rustc_incremental" }
2929
rustc_index = { path = "../rustc_index" }
30-
rustc_infer = { path = "../rustc_infer" }
3130
rustc_interface = { path = "../rustc_interface" }
3231
rustc_lexer = { path = "../rustc_lexer" }
3332
rustc_lint = { path = "../rustc_lint" }

compiler/rustc_driver_impl/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ pub static DEFAULT_LOCALE_RESOURCES: &[&str] = &[
129129
rustc_hir_analysis::DEFAULT_LOCALE_RESOURCE,
130130
rustc_hir_typeck::DEFAULT_LOCALE_RESOURCE,
131131
rustc_incremental::DEFAULT_LOCALE_RESOURCE,
132-
rustc_infer::DEFAULT_LOCALE_RESOURCE,
133132
rustc_interface::DEFAULT_LOCALE_RESOURCE,
134133
rustc_lint::DEFAULT_LOCALE_RESOURCE,
135134
rustc_metadata::DEFAULT_LOCALE_RESOURCE,

compiler/rustc_infer/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ doctest = false
1010
# tidy-alphabetical-start
1111
rustc_data_structures = { path = "../rustc_data_structures" }
1212
rustc_errors = { path = "../rustc_errors" }
13-
rustc_fluent_macro = { path = "../rustc_fluent_macro" }
1413
rustc_hir = { path = "../rustc_hir" }
1514
rustc_index = { path = "../rustc_index" }
1615
rustc_macros = { path = "../rustc_macros" }

compiler/rustc_infer/messages.ftl

Lines changed: 0 additions & 5 deletions
This file was deleted.

compiler/rustc_infer/src/errors.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ use rustc_macros::Diagnostic;
22
use rustc_span::Span;
33

44
#[derive(Diagnostic)]
5-
#[diag(infer_opaque_hidden_type)]
5+
#[diag("opaque type's hidden type cannot be another opaque type from the same scope")]
66
pub(crate) struct OpaqueHiddenTypeDiag {
77
#[primary_span]
8-
#[label]
8+
#[label("one of the two opaque types used here has to be outside its defining scope")]
99
pub span: Span,
10-
#[note(infer_opaque_type)]
10+
#[note("opaque type whose hidden type is being assigned")]
1111
pub opaque_type: Span,
12-
#[note(infer_hidden_type)]
12+
#[note("opaque type being used as hidden type")]
1313
pub hidden_type: Span,
1414
}

compiler/rustc_infer/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,3 @@
2222
mod errors;
2323
pub mod infer;
2424
pub mod traits;
25-
26-
rustc_fluent_macro::fluent_messages! { "../messages.ftl" }

0 commit comments

Comments
 (0)