mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Document enum types used as values for E0423
This commit is contained in:
@@ -44,3 +44,16 @@ fn h1() -> i32 {
|
||||
// did you mean `a::I`?
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Enum types used as values
|
||||
|
||||
Enums are types and cannot be used directly as values.
|
||||
|
||||
```compile_fail,E0423
|
||||
fn main() {
|
||||
let x = Option::<i32>;
|
||||
//~^ ERROR expected value, found enum `Option`
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user