Skip to content

Commit 951e902

Browse files
committed
Normalize trait ref before orphan check & consider ty params in alias types to be uncovered
1 parent c2f2db7 commit 951e902

File tree

33 files changed

+1054
-144
lines changed

33 files changed

+1054
-144
lines changed

compiler/rustc_hir_analysis/messages.ftl

+4-4
Original file line numberDiff line numberDiff line change
@@ -486,13 +486,13 @@ hir_analysis_transparent_non_zero_sized_enum = the variant of a transparent {$de
486486
487487
hir_analysis_ty_of_assoc_const_binding_note = `{$assoc_const}` has type `{$ty}`
488488
489-
hir_analysis_ty_param_first_local = type parameter `{$param_ty}` must be covered by another type when it appears before the first local type (`{$local_type}`)
490-
.label = type parameter `{$param_ty}` must be covered by another type when it appears before the first local type (`{$local_type}`)
489+
hir_analysis_ty_param_first_local = type parameter `{$param}` must be covered by another type when it appears before the first local type (`{$local_type}`)
490+
.label = type parameter `{$param}` must be covered by another type when it appears before the first local type (`{$local_type}`)
491491
.note = implementing a foreign trait is only possible if at least one of the types for which it is implemented is local, and no uncovered type parameters appear before that first local type
492492
.case_note = in this case, 'before' refers to the following order: `impl<..> ForeignTrait<T1, ..., Tn> for T0`, where `T0` is the first and `Tn` is the last
493493
494-
hir_analysis_ty_param_some = type parameter `{$param_ty}` must be used as the type parameter for some local type (e.g., `MyStruct<{$param_ty}>`)
495-
.label = type parameter `{$param_ty}` must be used as the type parameter for some local type
494+
hir_analysis_ty_param_some = type parameter `{$param}` must be used as the type parameter for some local type (e.g., `MyStruct<{$param}>`)
495+
.label = type parameter `{$param}` must be used as the type parameter for some local type
496496
.note = implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
497497
.only_note = only traits defined in the current crate can be implemented for a type parameter
498498

0 commit comments

Comments
 (0)