Detect object safety errors when assoc type is missing
When an associated type with GATs isn't specified in a `dyn Trait`, emit an object safety error instead of only complaining about the missing associated type, as it will lead the user down a path of three different errors before letting them know that what they were trying to do is impossible to begin with. Fix #103155.
This commit is contained in:
parent
6d1fc53cf4
commit
17a6ae2df3
36 changed files with 223 additions and 194 deletions
|
@ -404,7 +404,7 @@ hir_analysis_unused_associated_type_bounds =
|
|||
.suggestion = remove this bound
|
||||
|
||||
hir_analysis_value_of_associated_struct_already_specified =
|
||||
the value of the associated type `{$item_name}` (from trait `{$def_path}`) is already specified
|
||||
the value of the associated type `{$item_name}` in trait `{$def_path}` is already specified
|
||||
.label = re-bound here
|
||||
.previous_bound_label = `{$item_name}` bound here first
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue