Skip to content

Commit 6202eac

Browse files
committed
move NoFieldOnType error
1 parent f6ecb16 commit 6202eac

File tree

4 files changed

+10
-11
lines changed

4 files changed

+10
-11
lines changed

compiler/rustc_hir_analysis/messages.ftl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,3 +615,4 @@ hir_analysis_wrong_number_of_generic_arguments_to_intrinsic =
615615
[one] parameter
616616
*[other] parameters
617617
}
618+
hir_analysis_no_field_on_type = no field `{$field}` on type `{$ty}`

compiler/rustc_hir_analysis/src/errors.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1714,3 +1714,12 @@ pub(crate) struct AsyncDropWithoutSyncDrop {
17141714
#[primary_span]
17151715
pub span: Span,
17161716
}
1717+
1718+
#[derive(Diagnostic)]
1719+
#[diag(hir_analysis_no_field_on_type, code = E0609)]
1720+
pub struct NoFieldOnType<'tcx> {
1721+
#[primary_span]
1722+
pub span: Span,
1723+
pub ty: Ty<'tcx>,
1724+
pub field: Ident,
1725+
}

compiler/rustc_hir_typeck/messages.ftl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,6 @@ hir_typeck_no_associated_item = no {$item_kind} named `{$item_ident}` found for
189189
*[other] {" "}in the current scope
190190
}
191191
192-
hir_typeck_no_field_on_type = no field `{$field}` on type `{$ty}`
193-
194192
hir_typeck_no_field_on_variant = no field named `{$field}` on enum variant `{$container}::{$ident}`
195193
hir_typeck_no_field_on_variant_enum = this enum variant...
196194
hir_typeck_no_field_on_variant_field = ...does not have this field

compiler/rustc_hir_typeck/src/errors.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -449,15 +449,6 @@ impl HelpUseLatestEdition {
449449
}
450450
}
451451

452-
#[derive(Diagnostic)]
453-
#[diag(hir_typeck_no_field_on_type, code = E0609)]
454-
pub(crate) struct NoFieldOnType<'tcx> {
455-
#[primary_span]
456-
pub(crate) span: Span,
457-
pub(crate) ty: Ty<'tcx>,
458-
pub(crate) field: Ident,
459-
}
460-
461452
#[derive(Diagnostic)]
462453
#[diag(hir_typeck_no_field_on_variant, code = E0609)]
463454
pub(crate) struct NoFieldOnVariant<'tcx> {

0 commit comments

Comments
 (0)