This website requires JavaScript.
Explore
Help
Register
Sign In
rust-lang
/
rust
Watch
1
Star
0
Fork
0
You've already forked rust
Code
Issues
Pull Requests
Actions
1
Packages
Projects
Releases
Wiki
Activity
Files
51b51b51d7931da85280382a81c4dd80c73ca754
rust
/
tests
/
ui
/
uninhabited
/
uninhabited-enum-cast.rs
10 lines
102 B
Rust
Raw
Normal View
History
Unescape
Escape
[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives
2024-02-16 20:02:50 +00:00
//@ check-pass
Permit uninhabited enums to cast into ints This essentially reverts part of #6204.
2020-09-01 09:49:40 -04:00
librustc: Make uninhabited enums not castable to int
2013-05-02 18:41:57 -07:00
enum
E
{
}
fn
f
(
e
:
E
)
{
Permit uninhabited enums to cast into ints This essentially reverts part of #6204.
2020-09-01 09:49:40 -04:00
println!
(
"
{}
"
,
(
e
as
isize
)
.
to_string
(
)
)
;
librustc: Make uninhabited enums not castable to int
2013-05-02 18:41:57 -07:00
}
fn
main
(
)
{
}
Reference in New Issue
Copy Permalink