2017-10-05 07:32:05 -05:00
|
|
|
struct S<X, Y> {
|
|
|
|
x: X,
|
|
|
|
y: Y,
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let x: &&Box<i32>;
|
2022-06-21 13:57:45 -05:00
|
|
|
let _y = &**x; //~ ERROR [E0381]
|
2017-10-05 07:32:05 -05:00
|
|
|
|
|
|
|
let x: &&S<i32, i32>;
|
2022-06-21 13:57:45 -05:00
|
|
|
let _y = &**x; //~ ERROR [E0381]
|
2017-10-05 07:32:05 -05:00
|
|
|
|
|
|
|
let x: &&i32;
|
2022-06-21 13:57:45 -05:00
|
|
|
let _y = &**x; //~ ERROR [E0381]
|
2017-10-05 07:32:05 -05:00
|
|
|
|
|
|
|
|
|
|
|
let mut a: S<i32, i32>;
|
2022-06-21 13:57:45 -05:00
|
|
|
a.x = 0; //~ ERROR [E0381]
|
2019-04-22 02:40:08 -05:00
|
|
|
let _b = &a.x;
|
2017-10-05 07:32:05 -05:00
|
|
|
|
|
|
|
let mut a: S<&&i32, &&i32>;
|
2022-06-21 13:57:45 -05:00
|
|
|
a.x = &&0; //~ ERROR [E0381]
|
2019-04-22 02:40:08 -05:00
|
|
|
let _b = &**a.x;
|
2017-10-05 07:32:05 -05:00
|
|
|
|
|
|
|
|
|
|
|
let mut a: S<i32, i32>;
|
2022-06-21 13:57:45 -05:00
|
|
|
a.x = 0; //~ ERROR [E0381]
|
2019-04-22 02:40:08 -05:00
|
|
|
let _b = &a.y;
|
2017-10-05 07:32:05 -05:00
|
|
|
|
|
|
|
let mut a: S<&&i32, &&i32>;
|
2022-06-21 13:57:45 -05:00
|
|
|
a.x = &&0; //~ ERROR [E0381]
|
2019-04-22 02:40:08 -05:00
|
|
|
let _b = &**a.y;
|
2017-10-05 07:32:05 -05:00
|
|
|
}
|