Specify type kind of constant that can't be used in patterns
``` error: trait object `dyn Send` cannot be used in patterns --> $DIR/issue-70972-dyn-trait.rs:6:9 | LL | const F: &'static dyn Send = &7u32; | -------------------------- constant defined here ... LL | F => panic!(), | ^ trait object can't be used in patterns ```
This commit is contained in:
parent
253eb95d45
commit
a6040bc230
9 changed files with 28 additions and 20 deletions
|
@ -152,7 +152,8 @@ mir_build_inline_assembly_requires_unsafe_unsafe_op_in_unsafe_fn_allowed =
|
|||
|
||||
mir_build_interpreted_as_const = introduce a variable instead
|
||||
|
||||
mir_build_invalid_pattern = `{$non_sm_ty}` cannot be used in patterns
|
||||
mir_build_invalid_pattern = {$prefix} `{$non_sm_ty}` cannot be used in patterns
|
||||
.label = {$prefix} can't be used in patterns
|
||||
|
||||
mir_build_irrefutable_let_patterns_if_let = irrefutable `if let` {$count ->
|
||||
[one] pattern
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue