Tweak ptr in pattern error
Conform to error style guide.
This commit is contained in:
parent
cc492edc9d
commit
c0f00086f8
8 changed files with 109 additions and 54 deletions
|
@ -274,7 +274,9 @@ mir_build_non_partial_eq_match =
|
|||
mir_build_pattern_not_covered = refutable pattern in {$origin}
|
||||
.pattern_ty = the matched value is of type `{$pattern_ty}`
|
||||
|
||||
mir_build_pointer_pattern = function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
|
||||
mir_build_pointer_pattern = function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
|
||||
.label = can't be used in patterns
|
||||
.note = see https://github.com/rust-lang/rust/issues/70861 for details
|
||||
|
||||
mir_build_privately_uninhabited = pattern `{$witness_1}` is currently uninhabited, but this variant contains private fields which may become inhabited in the future
|
||||
|
||||
|
|
|
@ -916,8 +916,10 @@ pub(crate) struct NaNPattern {
|
|||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(mir_build_pointer_pattern)]
|
||||
#[note]
|
||||
pub(crate) struct PointerPattern {
|
||||
#[primary_span]
|
||||
#[label]
|
||||
pub(crate) span: Span,
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue