mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 06:22:00 +00:00
Rollup merge of #64921 - JohnTitor:add-test-enum, r=varkor
Add test for issue-64662 Closes #64662 r? @varkor
This commit is contained in:
commit
e9d28796ec
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…
Reference in New Issue
Block a user