Skip to content

Commit 976272c

Browse files
committed
move NoFieldOnType error
1 parent c9d04aa commit 976272c

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
@@ -612,3 +612,4 @@ hir_analysis_wrong_number_of_generic_arguments_to_intrinsic =
612612
[one] parameter
613613
*[other] parameters
614614
}
615+
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
@@ -1707,3 +1707,12 @@ pub(crate) struct AsyncDropWithoutSyncDrop {
17071707
#[primary_span]
17081708
pub span: Span,
17091709
}
1710+
1711+
#[derive(Diagnostic)]
1712+
#[diag(hir_analysis_no_field_on_type, code = E0609)]
1713+
pub struct NoFieldOnType<'tcx> {
1714+
#[primary_span]
1715+
pub span: Span,
1716+
pub ty: Ty<'tcx>,
1717+
pub field: Ident,
1718+
}

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)