diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2018-06-25 13:44:57 -0700 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2018-06-25 13:49:34 -0700 |
| commit | 7aab3bf863383aa77fd293cf7d26a1b28597d49e (patch) | |
| tree | 5970b0f54f4a942e12d605be4468aa32eed4f3a4 /src/test | |
| parent | 8acec1f9d0b40dde142e6c26d7358b9ab232d2b4 (diff) | |
| download | rust-7aab3bf863383aa77fd293cf7d26a1b28597d49e.tar.gz rust-7aab3bf863383aa77fd293cf7d26a1b28597d49e.zip | |
Don't ICE when performing `lower_pattern_unadjusted` on a `TyError`
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui/issue-50577.rs | 15 | ||||
| -rw-r--r-- | src/test/ui/issue-50577.stderr | 13 |
2 files changed, 28 insertions, 0 deletions
diff --git a/src/test/ui/issue-50577.rs b/src/test/ui/issue-50577.rs new file mode 100644 index 00000000000..a3bb6872424 --- /dev/null +++ b/src/test/ui/issue-50577.rs @@ -0,0 +1,15 @@ +// Copyright 2018 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +fn main() { + enum Foo { + Drop = assert_eq!(1, 1) + } +} diff --git a/src/test/ui/issue-50577.stderr b/src/test/ui/issue-50577.stderr new file mode 100644 index 00000000000..8751303a0db --- /dev/null +++ b/src/test/ui/issue-50577.stderr @@ -0,0 +1,13 @@ +error[E0317]: if may be missing an else clause + --> $DIR/issue-50577.rs:13:16 + | +LL | Drop = assert_eq!(1, 1) + | ^^^^^^^^^^^^^^^^ expected (), found isize + | + = note: expected type `()` + found type `isize` + = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0317`. |
