Skip to content

Commit

Permalink
Rollup merge of rust-lang#64921 - JohnTitor:add-test-enum, r=varkor
Browse files Browse the repository at this point in the history
Add test for issue-64662

Closes rust-lang#64662
r? @varkor
  • Loading branch information
tmandry authored Sep 30, 2019
2 parents 5560f8c + 5bf4397 commit e9d2879
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/test/ui/consts/issue-64662.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
enum Foo {
A = foo(), //~ ERROR: type annotations needed
B = foo(), //~ ERROR: type annotations needed
}

const fn foo<T>() -> isize {
0
}

fn main() {}
15 changes: 15 additions & 0 deletions src/test/ui/consts/issue-64662.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
error[E0282]: type annotations needed
--> $DIR/issue-64662.rs:2:9
|
LL | A = foo(),
| ^^^ cannot infer type for `T`

error[E0282]: type annotations needed
--> $DIR/issue-64662.rs:3:9
|
LL | B = foo(),
| ^^^ cannot infer type for `T`

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0282`.

0 comments on commit e9d2879

Please sign in to comment.