diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2020-01-08 20:02:10 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2020-01-09 21:23:12 +0300 |
| commit | 642669c74d97b79a9a9f7300dfac3bb86bb75d97 (patch) | |
| tree | 4a1e418219e538592050960fd7bdf806802aa84b /src/test/ui/pattern/usefulness | |
| parent | 41318e9a267024fb36162382e26944d235aa71cd (diff) | |
| download | rust-642669c74d97b79a9a9f7300dfac3bb86bb75d97.tar.gz rust-642669c74d97b79a9a9f7300dfac3bb86bb75d97.zip | |
Update tests
Diffstat (limited to 'src/test/ui/pattern/usefulness')
| -rw-r--r-- | src/test/ui/pattern/usefulness/match-range-fail-dominate.rs | 4 | ||||
| -rw-r--r-- | src/test/ui/pattern/usefulness/match-range-fail-dominate.stderr | 22 |
2 files changed, 24 insertions, 2 deletions
diff --git a/src/test/ui/pattern/usefulness/match-range-fail-dominate.rs b/src/test/ui/pattern/usefulness/match-range-fail-dominate.rs index 7de7b7e79be..37c4ccda0f5 100644 --- a/src/test/ui/pattern/usefulness/match-range-fail-dominate.rs +++ b/src/test/ui/pattern/usefulness/match-range-fail-dominate.rs @@ -34,11 +34,15 @@ fn main() { //~^ WARNING floating-point types cannot be used in patterns //~| WARNING floating-point types cannot be used in patterns //~| WARNING floating-point types cannot be used in patterns + //~| WARNING floating-point types cannot be used in patterns + //~| WARNING this was previously accepted by the compiler //~| WARNING this was previously accepted by the compiler //~| WARNING this was previously accepted by the compiler //~| WARNING this was previously accepted by the compiler 0.02f64 => {} //~ ERROR unreachable pattern //~^ WARNING floating-point types cannot be used in patterns + //~| WARNING floating-point types cannot be used in patterns + //~| WARNING this was previously accepted by the compiler //~| WARNING this was previously accepted by the compiler _ => {} }; diff --git a/src/test/ui/pattern/usefulness/match-range-fail-dominate.stderr b/src/test/ui/pattern/usefulness/match-range-fail-dominate.stderr index c15186d2558..8412a113664 100644 --- a/src/test/ui/pattern/usefulness/match-range-fail-dominate.stderr +++ b/src/test/ui/pattern/usefulness/match-range-fail-dominate.stderr @@ -48,7 +48,7 @@ LL | 0.01f64 ..= 6.5f64 => {} = note: for more information, see issue #41620 <https://github.com/rust-lang/rust/issues/41620> warning: floating-point types cannot be used in patterns - --> $DIR/match-range-fail-dominate.rs:40:7 + --> $DIR/match-range-fail-dominate.rs:42:7 | LL | 0.02f64 => {} | ^^^^^^^ @@ -57,7 +57,7 @@ LL | 0.02f64 => {} = note: for more information, see issue #41620 <https://github.com/rust-lang/rust/issues/41620> error: unreachable pattern - --> $DIR/match-range-fail-dominate.rs:40:7 + --> $DIR/match-range-fail-dominate.rs:42:7 | LL | 0.02f64 => {} | ^^^^^^^ @@ -71,5 +71,23 @@ LL | 0.01f64 ..= 6.5f64 => {} = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #41620 <https://github.com/rust-lang/rust/issues/41620> +warning: floating-point types cannot be used in patterns + --> $DIR/match-range-fail-dominate.rs:33:19 + | +LL | 0.01f64 ..= 6.5f64 => {} + | ^^^^^^ + | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + = note: for more information, see issue #41620 <https://github.com/rust-lang/rust/issues/41620> + +warning: floating-point types cannot be used in patterns + --> $DIR/match-range-fail-dominate.rs:42:7 + | +LL | 0.02f64 => {} + | ^^^^^^^ + | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + = note: for more information, see issue #41620 <https://github.com/rust-lang/rust/issues/41620> + error: aborting due to 5 previous errors |
