diff options
| author | Yuki Okushi <huyuumi.dev@gmail.com> | 2020-04-16 15:50:32 +0900 |
|---|---|---|
| committer | Yuki Okushi <huyuumi.dev@gmail.com> | 2020-05-06 14:02:55 +0900 |
| commit | e69748ba4f48efdc9a1dfcf8c16bc9aba39a86e3 (patch) | |
| tree | 33fc77d7a08037da5deeb878068f5af0284aa732 /src/test/ui/numbers-arithmetic/divide-by-zero.rs | |
| parent | 43271a39adc26d29350d4830b594c6435472815e (diff) | |
| download | rust-e69748ba4f48efdc9a1dfcf8c16bc9aba39a86e3.tar.gz rust-e69748ba4f48efdc9a1dfcf8c16bc9aba39a86e3.zip | |
Move tests from `test/run-fail` to UI
Diffstat (limited to 'src/test/ui/numbers-arithmetic/divide-by-zero.rs')
| -rw-r--r-- | src/test/ui/numbers-arithmetic/divide-by-zero.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/ui/numbers-arithmetic/divide-by-zero.rs b/src/test/ui/numbers-arithmetic/divide-by-zero.rs new file mode 100644 index 00000000000..fcbc23b8367 --- /dev/null +++ b/src/test/ui/numbers-arithmetic/divide-by-zero.rs @@ -0,0 +1,7 @@ +// run-fail +// error-pattern:attempt to divide by zero +#[allow(unconditional_panic)] +fn main() { + let y = 0; + let _z = 1 / y; +} |
