Add test for issue-64662

This commit is contained in:
Yuki Okushi 2019-10-01 00:38:08 +09:00
parent e0436d912d
commit 5bf4397abc
2 changed files with 25 additions and 0 deletions

View file

@ -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() {}

View file

@ -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`.