Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an explicit test for issue #50582 #58921

Merged
merged 1 commit into from
Mar 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/test/ui/issues/issue-50582.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
fn main() {
Vec::<[(); 1 + for x in 0..1 {}]>::new();
//~^ ERROR cannot add
}
11 changes: 11 additions & 0 deletions src/test/ui/issues/issue-50582.stderr
Original file line number Diff line number Diff line change
@@ -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`.