Convert to inline diagnostics in rustc_infer
This commit is contained in:
parent
46c86aef65
commit
1722b8e06b
7 changed files with 4 additions and 16 deletions
|
|
@ -10,7 +10,6 @@ doctest = false
|
|||
# tidy-alphabetical-start
|
||||
rustc_data_structures = { path = "../rustc_data_structures" }
|
||||
rustc_errors = { path = "../rustc_errors" }
|
||||
rustc_fluent_macro = { path = "../rustc_fluent_macro" }
|
||||
rustc_hir = { path = "../rustc_hir" }
|
||||
rustc_index = { path = "../rustc_index" }
|
||||
rustc_macros = { path = "../rustc_macros" }
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
infer_opaque_hidden_type =
|
||||
opaque type's hidden type cannot be another opaque type from the same scope
|
||||
.label = one of the two opaque types used here has to be outside its defining scope
|
||||
.opaque_type = opaque type whose hidden type is being assigned
|
||||
.hidden_type = opaque type being used as hidden type
|
||||
|
|
@ -2,13 +2,13 @@ use rustc_macros::Diagnostic;
|
|||
use rustc_span::Span;
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(infer_opaque_hidden_type)]
|
||||
#[diag("opaque type's hidden type cannot be another opaque type from the same scope")]
|
||||
pub(crate) struct OpaqueHiddenTypeDiag {
|
||||
#[primary_span]
|
||||
#[label]
|
||||
#[label("one of the two opaque types used here has to be outside its defining scope")]
|
||||
pub span: Span,
|
||||
#[note(infer_opaque_type)]
|
||||
#[note("opaque type whose hidden type is being assigned")]
|
||||
pub opaque_type: Span,
|
||||
#[note(infer_hidden_type)]
|
||||
#[note("opaque type being used as hidden type")]
|
||||
pub hidden_type: Span,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,5 +22,3 @@
|
|||
mod errors;
|
||||
pub mod infer;
|
||||
pub mod traits;
|
||||
|
||||
rustc_fluent_macro::fluent_messages! { "../messages.ftl" }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue