mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
14 lines
207 B
Rust
14 lines
207 B
Rust
//@ run-pass
|
|
#![allow(dead_code)]
|
|
|
|
enum X { A = 42 as isize }
|
|
|
|
enum Y { A = X::A as isize }
|
|
|
|
fn main() {
|
|
let x = X::A;
|
|
let x = x as isize;
|
|
assert_eq!(x, 42);
|
|
assert_eq!(Y::A as isize, 42);
|
|
}
|