Refactored some string handling to prevent ICEs and FNs
This commit is contained in:
parent
d38fddd899
commit
7517ae2fb3
6 changed files with 106 additions and 33 deletions
7
tests/ui/crashes/ice-7869.rs
Normal file
7
tests/ui/crashes/ice-7869.rs
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
enum Tila {
|
||||
TyöAlkoi,
|
||||
TyöKeskeytyi,
|
||||
TyöValmis,
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
15
tests/ui/crashes/ice-7869.stderr
Normal file
15
tests/ui/crashes/ice-7869.stderr
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
error: all variants have the same prefix: `Työ`
|
||||
--> $DIR/ice-7869.rs:1:1
|
||||
|
|
||||
LL | / enum Tila {
|
||||
LL | | TyöAlkoi,
|
||||
LL | | TyöKeskeytyi,
|
||||
LL | | TyöValmis,
|
||||
LL | | }
|
||||
| |_^
|
||||
|
|
||||
= note: `-D clippy::enum-variant-names` implied by `-D warnings`
|
||||
= help: remove the prefixes and use full paths to the variants instead of glob imports
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
@ -60,7 +60,7 @@ LL | | }
|
|||
|
|
||||
= help: remove the prefixes and use full paths to the variants instead of glob imports
|
||||
|
||||
error: all variants have the same prefix: `With`
|
||||
error: all variants have the same prefix: `WithOut`
|
||||
--> $DIR/enum_variants.rs:81:1
|
||||
|
|
||||
LL | / enum Seallll {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#![warn(clippy::match_ref_pats)]
|
||||
#![allow(clippy::equatable_if_let)]
|
||||
#![allow(clippy::equatable_if_let, clippy::enum_variant_names)]
|
||||
|
||||
fn ref_pats() {
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue