Skip to content

Commit

Permalink
Add test for issue-64662
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor committed Sep 30, 2019
1 parent e0436d9 commit 5bf4397
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
@@ -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
@@ -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 5bf4397

Please sign in to comment.