Add test for issue-64662
This commit is contained in:
parent
e0436d912d
commit
5bf4397abc
2 changed files with 25 additions and 0 deletions
10
src/test/ui/consts/issue-64662.rs
Normal file
10
src/test/ui/consts/issue-64662.rs
Normal 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() {}
|
||||
15
src/test/ui/consts/issue-64662.stderr
Normal file
15
src/test/ui/consts/issue-64662.stderr
Normal 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`.
|
||||
Loading…
Add table
Add a link
Reference in a new issue