reword pattern migration diagnostic to make sense in all editions
This aligns the main error message a bit more with the phrasing in the Edition Guide and provides a bit more information on the labels to (hopefully!) aid in understanding.
This commit is contained in:
@@ -285,7 +285,16 @@ mir_build_pointer_pattern = function pointers and raw pointers not derived from
|
||||
|
||||
mir_build_privately_uninhabited = pattern `{$witness_1}` is currently uninhabited, but this variant contains private fields which may become inhabited in the future
|
||||
|
||||
mir_build_rust_2024_incompatible_pat = this pattern relies on behavior which may change in edition 2024
|
||||
mir_build_rust_2024_incompatible_pat = {$bad_modifiers ->
|
||||
*[true] binding modifiers{$bad_ref_pats ->
|
||||
*[true] {" "}and reference patterns
|
||||
[false] {""}
|
||||
}
|
||||
[false] reference patterns
|
||||
} may only be written when the default binding mode is `move`{$is_hard_error ->
|
||||
*[true] {""}
|
||||
[false] {" "}in Rust 2024
|
||||
}
|
||||
|
||||
mir_build_static_in_pattern = statics cannot be referenced in patterns
|
||||
.label = can't be used in patterns
|
||||
|
||||
Reference in New Issue
Block a user