Refactored some string handling to prevent ICEs and FNs

This commit is contained in:
xFrednet 2021-10-24 22:47:39 +02:00
parent d38fddd899
commit 7517ae2fb3
6 changed files with 106 additions and 33 deletions

View file

@ -0,0 +1,7 @@
enum Tila {
TyöAlkoi,
TyöKeskeytyi,
TyöValmis,
}
fn main() {}

View 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

View file

@ -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 {

View file

@ -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() {
{