2022-04-01 22:24:32 -05:00
|
|
|
// check-pass
|
|
|
|
|
|
|
|
struct S;
|
|
|
|
|
|
|
|
enum E {
|
|
|
|
V,
|
|
|
|
}
|
|
|
|
|
|
|
|
type A = E;
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let mut a;
|
|
|
|
|
2023-12-08 13:54:46 -06:00
|
|
|
S = S;
|
2022-04-01 22:24:32 -05:00
|
|
|
(S, a) = (S, ());
|
|
|
|
|
2023-12-08 13:54:46 -06:00
|
|
|
E::V = E::V;
|
2022-04-01 22:24:32 -05:00
|
|
|
(E::V, a) = (E::V, ());
|
|
|
|
|
2023-12-08 13:54:46 -06:00
|
|
|
<E>::V = E::V;
|
2022-04-01 22:24:32 -05:00
|
|
|
(<E>::V, a) = (E::V, ());
|
2023-12-08 13:54:46 -06:00
|
|
|
A::V = A::V;
|
2022-04-01 22:24:32 -05:00
|
|
|
(A::V, a) = (E::V, ());
|
|
|
|
}
|
|
|
|
|
|
|
|
impl S {
|
|
|
|
fn check() {
|
|
|
|
let a;
|
2023-12-08 13:54:46 -06:00
|
|
|
Self = S;
|
2022-04-01 22:24:32 -05:00
|
|
|
(Self, a) = (S, ());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl E {
|
|
|
|
fn check() {
|
|
|
|
let a;
|
2023-12-08 13:54:46 -06:00
|
|
|
Self::V = E::V;
|
2022-04-01 22:24:32 -05:00
|
|
|
(Self::V, a) = (E::V, ());
|
|
|
|
}
|
|
|
|
}
|