diff options
| author | Josh Stone <jistone@redhat.com> | 2019-03-04 13:28:31 -0800 |
|---|---|---|
| committer | Josh Stone <jistone@redhat.com> | 2019-03-04 13:28:31 -0800 |
| commit | 842014d8fc128b6ffc8de2f4387e1fb926a8ea9b (patch) | |
| tree | aac8df8a894082d87f12671655f74024c8a2d984 /src/test/ui | |
| parent | a9da8fc9c267c08cfdb8cf5b39da14f154d12939 (diff) | |
| download | rust-842014d8fc128b6ffc8de2f4387e1fb926a8ea9b.tar.gz rust-842014d8fc128b6ffc8de2f4387e1fb926a8ea9b.zip | |
Add an explicit test for issue #50582
This code no longer ICEs, and @yodaldevoid found that it was fixed by commit fe5710a. While that added a similar test, we can explicitly test this reproducer too. Closes #50582.
Diffstat (limited to 'src/test/ui')
| -rw-r--r-- | src/test/ui/issues/issue-50582.rs | 4 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-50582.stderr | 11 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-50582.rs b/src/test/ui/issues/issue-50582.rs new file mode 100644 index 00000000000..1358e0bde4c --- /dev/null +++ b/src/test/ui/issues/issue-50582.rs @@ -0,0 +1,4 @@ +fn main() { + Vec::<[(); 1 + for x in 0..1 {}]>::new(); + //~^ ERROR cannot add +} diff --git a/src/test/ui/issues/issue-50582.stderr b/src/test/ui/issues/issue-50582.stderr new file mode 100644 index 00000000000..226f5a3f0fe --- /dev/null +++ b/src/test/ui/issues/issue-50582.stderr @@ -0,0 +1,11 @@ +error[E0277]: cannot add `()` to `{integer}` + --> $DIR/issue-50582.rs:2:18 + | +LL | Vec::<[(); 1 + for x in 0..1 {}]>::new(); + | ^ no implementation for `{integer} + ()` + | + = help: the trait `std::ops::Add<()>` is not implemented for `{integer}` + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0277`. |
