We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e0436d9 commit 5bf4397Copy full SHA for 5bf4397
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