mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
35 lines
362 B
Rust
35 lines
362 B
Rust
// check-pass
|
|
|
|
struct S;
|
|
|
|
enum E {
|
|
V,
|
|
}
|
|
|
|
type A = E;
|
|
|
|
fn main() {
|
|
let mut a;
|
|
|
|
(S, a) = (S, ());
|
|
|
|
(E::V, a) = (E::V, ());
|
|
|
|
(<E>::V, a) = (E::V, ());
|
|
(A::V, a) = (E::V, ());
|
|
}
|
|
|
|
impl S {
|
|
fn check() {
|
|
let a;
|
|
(Self, a) = (S, ());
|
|
}
|
|
}
|
|
|
|
impl E {
|
|
fn check() {
|
|
let a;
|
|
(Self::V, a) = (E::V, ());
|
|
}
|
|
}
|