forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#64921 - JohnTitor:add-test-enum, r=varkor
Add test for issue-64662 Closes rust-lang#64662 r? @varkor
- Loading branch information
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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`. |