diff --git a/src/test/ui/type-alias-enum-variants/enum-variant-generic-args-pass.rs b/src/test/ui/type-alias-enum-variants/enum-variant-generic-args-pass.rs index af05dd1b715..0c212096f92 100644 --- a/src/test/ui/type-alias-enum-variants/enum-variant-generic-args-pass.rs +++ b/src/test/ui/type-alias-enum-variants/enum-variant-generic-args-pass.rs @@ -9,7 +9,6 @@ #![allow(irrefutable_let_patterns)] -#[allow(dead_code)] enum Enum { TSVariant(T), SVariant { v: T }, UVariant } type Alias = Enum; type AliasFixed = Enum<()>; diff --git a/src/test/ui/type-alias-enum-variants/incorrect-variant-form-through-alias-caught.rs b/src/test/ui/type-alias-enum-variants/incorrect-variant-form-through-alias-caught.rs index f474c078ba4..ce45d59198a 100644 --- a/src/test/ui/type-alias-enum-variants/incorrect-variant-form-through-alias-caught.rs +++ b/src/test/ui/type-alias-enum-variants/incorrect-variant-form-through-alias-caught.rs @@ -3,8 +3,6 @@ // Check that creating/matching on an enum variant through an alias with // the wrong braced/unit form is caught as an error. -#![allow(unreachable_code)] - enum Enum { Braced {}, Unit, Tuple() } type Alias = Enum; diff --git a/src/test/ui/type-alias-enum-variants/incorrect-variant-form-through-alias-caught.stderr b/src/test/ui/type-alias-enum-variants/incorrect-variant-form-through-alias-caught.stderr index 1ee00a0d22d..c1ea816b7fa 100644 --- a/src/test/ui/type-alias-enum-variants/incorrect-variant-form-through-alias-caught.stderr +++ b/src/test/ui/type-alias-enum-variants/incorrect-variant-form-through-alias-caught.stderr @@ -1,23 +1,23 @@ error[E0533]: expected unit struct/variant or constant, found struct variant `::Braced` - --> $DIR/incorrect-variant-form-through-alias-caught.rs:12:5 + --> $DIR/incorrect-variant-form-through-alias-caught.rs:10:5 | LL | Alias::Braced; | ^^^^^^^^^^^^^ error[E0533]: expected unit struct/variant or constant, found struct variant `::Braced` - --> $DIR/incorrect-variant-form-through-alias-caught.rs:14:9 + --> $DIR/incorrect-variant-form-through-alias-caught.rs:12:9 | LL | let Alias::Braced = panic!(); | ^^^^^^^^^^^^^ error[E0164]: expected tuple struct/variant, found struct variant `::Braced` - --> $DIR/incorrect-variant-form-through-alias-caught.rs:16:9 + --> $DIR/incorrect-variant-form-through-alias-caught.rs:14:9 | LL | let Alias::Braced(..) = panic!(); | ^^^^^^^^^^^^^^^^^ not a tuple variant or struct error[E0618]: expected function, found enum variant `::Unit` - --> $DIR/incorrect-variant-form-through-alias-caught.rs:19:5 + --> $DIR/incorrect-variant-form-through-alias-caught.rs:17:5 | LL | enum Enum { Braced {}, Unit, Tuple() } | ---- `::Unit` defined here @@ -32,7 +32,7 @@ LL | ::Unit; | ^^^^^^^^^^^^^ error[E0164]: expected tuple struct/variant, found unit variant `::Unit` - --> $DIR/incorrect-variant-form-through-alias-caught.rs:21:9 + --> $DIR/incorrect-variant-form-through-alias-caught.rs:19:9 | LL | let Alias::Unit() = panic!(); | ^^^^^^^^^^^^^ not a tuple variant or struct