2018-08-11 10:15:58 +00:00
|
|
|
// Currently, we permit you to assign to individual fields of a mut
|
|
|
|
// var, but we do not permit you to use the complete var afterwards.
|
|
|
|
// We hope to fix this at some point.
|
|
|
|
//
|
2018-12-17 16:38:42 +00:00
|
|
|
// FIXME(#54987)
|
2018-08-11 10:15:58 +00:00
|
|
|
|
|
|
|
fn assign_both_fields_and_use() {
|
|
|
|
let mut x: (u32, u32);
|
|
|
|
x.0 = 1;
|
|
|
|
x.1 = 22;
|
2018-08-14 12:24:44 +00:00
|
|
|
drop(x.0); //~ ERROR
|
|
|
|
drop(x.1); //~ ERROR
|
2018-08-11 10:15:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
fn assign_both_fields_the_use_var() {
|
|
|
|
let mut x: (u32, u32);
|
|
|
|
x.0 = 1;
|
|
|
|
x.1 = 22;
|
|
|
|
drop(x); //~ ERROR
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() { }
|