8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5560f8c + 5bf4397 commit e9d2879Copy full SHA for e9d2879
src/test/ui/consts/issue-64662.rs
@@ -0,0 +1,10 @@
1
+enum Foo {
2
+ A = foo(), //~ ERROR: type annotations needed
3
+ B = foo(), //~ ERROR: type annotations needed
4
+}
5
+
6
+const fn foo<T>() -> isize {
7
+ 0
8
9
10
+fn main() {}
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`
+ --> $DIR/issue-64662.rs:3:9
+LL | B = foo(),
11
12
13
+error: aborting due to 2 previous errors
14
15
+For more information about this error, try `rustc --explain E0282`.
0 commit comments