-error[E0381]: use of possibly uninitialized variable: `x`
- --> $DIR/assign_mutable_fields.rs:29:10
+error[E0381]: assign to part of possibly uninitialized variable: `x`
+ --> $DIR/assign_mutable_fields.rs:19:5
|
-LL | drop(x); //~ ERROR
- | ^ use of possibly uninitialized `x`
+LL | x.0 = 1;
+ | ^^^^^^^ use of possibly uninitialized `x`
-error: aborting due to previous error
+error[E0381]: assign to part of possibly uninitialized variable: `x`
+ --> $DIR/assign_mutable_fields.rs:27:5
+ |
+LL | x.0 = 1;
+ | ^^^^^^^ use of possibly uninitialized `x`
+
+error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0381`.
-error[E0382]: use of moved value: `*x.b`
+error[E0382]: use of moved value: `x.b`
--> $DIR/borrowck-field-sensitivity.rs:18:10
|
LL | drop(x.b);
LL | drop(*x.b); //~ ERROR use of moved value: `*x.b`
| ^^^^ value used here after move
-error[E0382]: use of moved value: `*x.b`
+error[E0382]: use of moved value: `x.b`
--> $DIR/borrowck-field-sensitivity.rs:24:10
|
LL | let y = A { a: 3, .. x };
|
= note: move occurs because `x.b` has type `std::boxed::Box<isize>`, which does not implement the `Copy` trait
-error: aborting due to 11 previous errors
+error[E0381]: assign to part of possibly uninitialized variable: `x`
+ --> $DIR/borrowck-field-sensitivity.rs:91:5
+ |
+LL | x.a = 1;
+ | ^^^^^^^ use of possibly uninitialized `x`
+
+error[E0381]: assign to part of possibly uninitialized variable: `x`
+ --> $DIR/borrowck-field-sensitivity.rs:97:5
+ |
+LL | x.a = 1;
+ | ^^^^^^^ use of possibly uninitialized `x`
+
+error[E0381]: assign to part of possibly uninitialized variable: `x`
+ --> $DIR/borrowck-field-sensitivity.rs:104:5
+ |
+LL | x.b = box 1;
+ | ^^^ use of possibly uninitialized `x`
+
+error: aborting due to 14 previous errors
-Some errors occurred: E0382, E0499, E0505.
-For more information about an error, try `rustc --explain E0382`.
+Some errors occurred: E0381, E0382, E0499, E0505.
+For more information about an error, try `rustc --explain E0381`.
-error[E0381]: use of possibly uninitialized variable: `origin.y`
+error[E0381]: use of possibly uninitialized variable: `origin`
--> $DIR/borrowck-init-in-fru.rs:22:5
|
LL | origin = point {x: 10,.. origin};
-error[E0381]: use of possibly uninitialized variable: `origin.y`
+error[E0381]: use of possibly uninitialized variable: `origin`
--> $DIR/borrowck-init-in-fru.rs:22:5
|
LL | origin = point {x: 10,.. origin};
-error[E0381]: use of possibly uninitialized variable: `a.x`
+error[E0381]: use of possibly uninitialized variable: `a`
--> $DIR/borrowck-uninit-field-access.rs:34:13
|
LL | let _ = a.x + 1; //[ast]~ ERROR use of possibly uninitialized variable: `a.x`
| ^^^ use of possibly uninitialized `a.x`
-error[E0382]: use of moved value: `line1.origin.x`
+error[E0382]: use of moved value: `line1.origin`
--> $DIR/borrowck-uninit-field-access.rs:39:13
|
LL | let _moved = line1.origin;
-error[E0381]: use of possibly uninitialized variable: `a.x`
+error[E0381]: use of possibly uninitialized variable: `a`
--> $DIR/borrowck-uninit-field-access.rs:34:13
|
LL | let _ = a.x + 1; //[ast]~ ERROR use of possibly uninitialized variable: `a.x`
| ^^^ use of possibly uninitialized `a.x`
-error[E0382]: use of moved value: `line1.origin.x`
+error[E0382]: use of moved value: `line1.origin`
--> $DIR/borrowck-uninit-field-access.rs:39:13
|
LL | let _moved = line1.origin;
-error[E0381]: borrow of possibly uninitialized variable: `**x`
+error[E0381]: borrow of possibly uninitialized variable: `x`
--> $DIR/borrowck-uninit-ref-chain.rs:21:14
|
LL | let _y = &**x; //[ast]~ ERROR use of possibly uninitialized variable: `**x` [E0381]
| ^^^^ use of possibly uninitialized `**x`
-error[E0381]: borrow of possibly uninitialized variable: `**x`
+error[E0381]: borrow of possibly uninitialized variable: `x`
--> $DIR/borrowck-uninit-ref-chain.rs:25:14
|
LL | let _y = &**x; //[ast]~ ERROR use of possibly uninitialized variable: `**x` [E0381]
| ^^^^ use of possibly uninitialized `**x`
-error[E0381]: borrow of possibly uninitialized variable: `**x`
+error[E0381]: borrow of possibly uninitialized variable: `x`
--> $DIR/borrowck-uninit-ref-chain.rs:29:14
|
LL | let _y = &**x; //[ast]~ ERROR use of possibly uninitialized variable: `**x` [E0381]
| ^^^^ use of possibly uninitialized `**x`
-error[E0381]: borrow of possibly uninitialized variable: `a.y`
- --> $DIR/borrowck-uninit-ref-chain.rs:46:14
+error[E0381]: assign to part of possibly uninitialized variable: `a`
+ --> $DIR/borrowck-uninit-ref-chain.rs:34:5
|
-LL | let _b = &a.y; //[ast]~ ERROR use of possibly uninitialized variable: `a.y` [E0381]
- | ^^^^ use of possibly uninitialized `a.y`
+LL | a.x = 0; //[mir]~ ERROR assign to part of possibly uninitialized variable: `a` [E0381]
+ | ^^^^^^^ use of possibly uninitialized `a`
-error[E0381]: borrow of possibly uninitialized variable: `**a.y`
- --> $DIR/borrowck-uninit-ref-chain.rs:51:14
+error[E0381]: assign to part of possibly uninitialized variable: `a`
+ --> $DIR/borrowck-uninit-ref-chain.rs:39:5
|
-LL | let _b = &**a.y; //[ast]~ ERROR use of possibly uninitialized variable: `**a.y` [E0381]
- | ^^^^^^ use of possibly uninitialized `**a.y`
+LL | a.x = &&0; //[mir]~ ERROR assign to part of possibly uninitialized variable: `a` [E0381]
+ | ^^^^^^^^^ use of possibly uninitialized `a`
-error: aborting due to 5 previous errors
+error[E0381]: assign to part of possibly uninitialized variable: `a`
+ --> $DIR/borrowck-uninit-ref-chain.rs:45:5
+ |
+LL | a.x = 0; //[mir]~ ERROR assign to part of possibly uninitialized variable: `a` [E0381]
+ | ^^^^^^^ use of possibly uninitialized `a`
+
+error[E0381]: assign to part of possibly uninitialized variable: `a`
+ --> $DIR/borrowck-uninit-ref-chain.rs:50:5
+ |
+LL | a.x = &&0; //[mir]~ assign to part of possibly uninitialized variable: `a` [E0381]
+ | ^^^^^^^^^ use of possibly uninitialized `a`
+
+error: aborting due to 7 previous errors
For more information about this error, try `rustc --explain E0381`.
-error[E0381]: borrow of possibly uninitialized variable: `**x`
+error[E0381]: borrow of possibly uninitialized variable: `x`
--> $DIR/borrowck-uninit-ref-chain.rs:21:14
|
LL | let _y = &**x; //[ast]~ ERROR use of possibly uninitialized variable: `**x` [E0381]
| ^^^^ use of possibly uninitialized `**x`
-error[E0381]: borrow of possibly uninitialized variable: `**x`
+error[E0381]: borrow of possibly uninitialized variable: `x`
--> $DIR/borrowck-uninit-ref-chain.rs:25:14
|
LL | let _y = &**x; //[ast]~ ERROR use of possibly uninitialized variable: `**x` [E0381]
| ^^^^ use of possibly uninitialized `**x`
-error[E0381]: borrow of possibly uninitialized variable: `**x`
+error[E0381]: borrow of possibly uninitialized variable: `x`
--> $DIR/borrowck-uninit-ref-chain.rs:29:14
|
LL | let _y = &**x; //[ast]~ ERROR use of possibly uninitialized variable: `**x` [E0381]
| ^^^^ use of possibly uninitialized `**x`
-error[E0381]: borrow of possibly uninitialized variable: `a.y`
- --> $DIR/borrowck-uninit-ref-chain.rs:46:14
+error[E0381]: assign to part of possibly uninitialized variable: `a`
+ --> $DIR/borrowck-uninit-ref-chain.rs:34:5
|
-LL | let _b = &a.y; //[ast]~ ERROR use of possibly uninitialized variable: `a.y` [E0381]
- | ^^^^ use of possibly uninitialized `a.y`
+LL | a.x = 0; //[mir]~ ERROR assign to part of possibly uninitialized variable: `a` [E0381]
+ | ^^^^^^^ use of possibly uninitialized `a`
-error[E0381]: borrow of possibly uninitialized variable: `**a.y`
- --> $DIR/borrowck-uninit-ref-chain.rs:51:14
+error[E0381]: assign to part of possibly uninitialized variable: `a`
+ --> $DIR/borrowck-uninit-ref-chain.rs:39:5
|
-LL | let _b = &**a.y; //[ast]~ ERROR use of possibly uninitialized variable: `**a.y` [E0381]
- | ^^^^^^ use of possibly uninitialized `**a.y`
+LL | a.x = &&0; //[mir]~ ERROR assign to part of possibly uninitialized variable: `a` [E0381]
+ | ^^^^^^^^^ use of possibly uninitialized `a`
-error: aborting due to 5 previous errors
+error[E0381]: assign to part of possibly uninitialized variable: `a`
+ --> $DIR/borrowck-uninit-ref-chain.rs:45:5
+ |
+LL | a.x = 0; //[mir]~ ERROR assign to part of possibly uninitialized variable: `a` [E0381]
+ | ^^^^^^^ use of possibly uninitialized `a`
+
+error[E0381]: assign to part of possibly uninitialized variable: `a`
+ --> $DIR/borrowck-uninit-ref-chain.rs:50:5
+ |
+LL | a.x = &&0; //[mir]~ assign to part of possibly uninitialized variable: `a` [E0381]
+ | ^^^^^^^^^ use of possibly uninitialized `a`
+
+error: aborting due to 7 previous errors
For more information about this error, try `rustc --explain E0381`.
let mut a: S<i32, i32>;
- a.x = 0;
+ a.x = 0; //[mir]~ ERROR assign to part of possibly uninitialized variable: `a` [E0381]
let _b = &a.x; //[ast]~ ERROR use of possibly uninitialized variable: `a.x` [E0381]
- // (deliberately *not* an error under MIR-borrowck)
+
let mut a: S<&&i32, &&i32>;
- a.x = &&0;
+ a.x = &&0; //[mir]~ ERROR assign to part of possibly uninitialized variable: `a` [E0381]
let _b = &**a.x; //[ast]~ ERROR use of possibly uninitialized variable: `**a.x` [E0381]
- // (deliberately *not* an error under MIR-borrowck)
+
let mut a: S<i32, i32>;
- a.x = 0;
+ a.x = 0; //[mir]~ ERROR assign to part of possibly uninitialized variable: `a` [E0381]
let _b = &a.y; //[ast]~ ERROR use of possibly uninitialized variable: `a.y` [E0381]
- //[mir]~^ ERROR [E0381]
+
let mut a: S<&&i32, &&i32>;
- a.x = &&0;
+ a.x = &&0; //[mir]~ assign to part of possibly uninitialized variable: `a` [E0381]
let _b = &**a.y; //[ast]~ ERROR use of possibly uninitialized variable: `**a.y` [E0381]
- //[mir]~^ ERROR [E0381]
+
}
-error[E0382]: use of moved value: `u.a`
+error[E0382]: use of moved value: `u`
--> $DIR/borrowck-union-move-assign.rs:27:21
|
LL | let a = u.a;
|
= note: move occurs because `u` has type `U`, which does not implement the `Copy` trait
-error[E0382]: use of moved value: `u.a`
+error[E0382]: use of moved value: `u`
--> $DIR/borrowck-union-move-assign.rs:33:21
|
LL | let a = u.a;
|
= note: move occurs because `u` has type `U`, which does not implement the `Copy` trait
-error[E0382]: use of moved value: `u.a`
+error[E0382]: use of moved value: `u`
--> $DIR/borrowck-union-move-assign.rs:39:21
|
LL | let a = u.a;
-error[E0382]: use of moved value: `u.n1`
+error[E0382]: use of moved value: `u`
--> $DIR/borrowck-union-move.rs:36:21
|
LL | let a = u.n1;
|
= note: move occurs because `u` has type `Unn`, which does not implement the `Copy` trait
-error[E0382]: use of moved value: `u.n2`
+error[E0382]: use of moved value: `u`
--> $DIR/borrowck-union-move.rs:46:21
|
LL | let a = u.n1;
|
= note: move occurs because `u` has type `Unn`, which does not implement the `Copy` trait
-error[E0382]: use of moved value: `u.n`
+error[E0382]: use of moved value: `u`
--> $DIR/borrowck-union-move.rs:73:21
|
LL | let a = u.n;
|
= note: move occurs because `u` has type `Ucn`, which does not implement the `Copy` trait
-error[E0382]: use of moved value: `u.c`
+error[E0382]: use of moved value: `u`
--> $DIR/borrowck-union-move.rs:78:21
|
LL | let a = u.n;
-error[E0381]: use of possibly uninitialized variable: `u.a`
- --> $DIR/borrowck-union-uninitialized.rs:26:18
+error[E0381]: assign to part of possibly uninitialized variable: `s`
+ --> $DIR/borrowck-union-uninitialized.rs:23:9
|
-LL | let ua = u.a; //~ ERROR use of possibly uninitialized variable: `u.a`
- | ^^^ use of possibly uninitialized `u.a`
+LL | s.a = 0;
+ | ^^^^^^^ use of possibly uninitialized `s`
-error: aborting due to previous error
+error[E0381]: assign to part of possibly uninitialized variable: `u`
+ --> $DIR/borrowck-union-uninitialized.rs:24:9
+ |
+LL | u.a = 0;
+ | ^^^^^^^ use of possibly uninitialized `u`
+
+error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0381`.
-error[E0381]: use of possibly uninitialized variable: `*w`
+error[E0381]: use of possibly uninitialized variable: `w`
--> $DIR/borrowck-use-in-index-lvalue.rs:16:5
|
LL | w[5] = 0; //[ast]~ ERROR use of possibly uninitialized variable: `*w` [E0381]
| ^^^^ use of possibly uninitialized `*w`
-error[E0381]: use of possibly uninitialized variable: `*w`
+error[E0381]: use of possibly uninitialized variable: `w`
--> $DIR/borrowck-use-in-index-lvalue.rs:20:5
|
LL | w[5] = 0; //[ast]~ ERROR use of possibly uninitialized variable: `*w` [E0381]
-error[E0381]: use of possibly uninitialized variable: `*w`
+error[E0381]: use of possibly uninitialized variable: `w`
--> $DIR/borrowck-use-in-index-lvalue.rs:16:5
|
LL | w[5] = 0; //[ast]~ ERROR use of possibly uninitialized variable: `*w` [E0381]
| ^^^^ use of possibly uninitialized `*w`
-error[E0381]: use of possibly uninitialized variable: `*w`
+error[E0381]: use of possibly uninitialized variable: `w`
--> $DIR/borrowck-use-in-index-lvalue.rs:20:5
|
LL | w[5] = 0; //[ast]~ ERROR use of possibly uninitialized variable: `*w` [E0381]
-error[E0381]: borrow of possibly uninitialized variable: `*x`
+error[E0381]: borrow of possibly uninitialized variable: `x`
--> $DIR/borrowck-use-uninitialized-in-cast-trait.rs:22:13
|
LL | let y = x as *const Foo; //[ast]~ ERROR use of possibly uninitialized variable: `*x`
-error[E0381]: borrow of possibly uninitialized variable: `*x`
+error[E0381]: borrow of possibly uninitialized variable: `x`
--> $DIR/borrowck-use-uninitialized-in-cast-trait.rs:22:13
|
LL | let y = x as *const Foo; //[ast]~ ERROR use of possibly uninitialized variable: `*x`
-error[E0381]: borrow of possibly uninitialized variable: `*x`
+error[E0381]: borrow of possibly uninitialized variable: `x`
--> $DIR/borrowck-use-uninitialized-in-cast.rs:20:13
|
LL | let y = x as *const i32; //[ast]~ ERROR use of possibly uninitialized variable: `*x` [E0381]
-error[E0381]: borrow of possibly uninitialized variable: `*x`
+error[E0381]: borrow of possibly uninitialized variable: `x`
--> $DIR/borrowck-use-uninitialized-in-cast.rs:20:13
|
LL | let y = x as *const i32; //[ast]~ ERROR use of possibly uninitialized variable: `*x` [E0381]
-error[E0594]: cannot assign to `x.0`, as `x` is not declared as mutable
+error[E0381]: assign to part of possibly uninitialized variable: `x`
--> $DIR/reassignment_immutable_fields.rs:17:5
|
-LL | let x: (u32, u32);
- | - help: consider changing this to be mutable: `mut x`
LL | x.0 = 1; //~ ERROR
- | ^^^^^^^ cannot assign
+ | ^^^^^^^ use of possibly uninitialized `x`
-error[E0594]: cannot assign to `x.1`, as `x` is not declared as mutable
- --> $DIR/reassignment_immutable_fields.rs:18:5
- |
-LL | let x: (u32, u32);
- | - help: consider changing this to be mutable: `mut x`
-LL | x.0 = 1; //~ ERROR
-LL | x.1 = 22; //~ ERROR
- | ^^^^^^^^ cannot assign
-
-error[E0594]: cannot assign to `x.0`, as `x` is not declared as mutable
+error[E0381]: assign to part of possibly uninitialized variable: `x`
--> $DIR/reassignment_immutable_fields.rs:25:5
|
-LL | let x: (u32, u32);
- | - help: consider changing this to be mutable: `mut x`
-LL | x.0 = 1; //~ ERROR
- | ^^^^^^^ cannot assign
-
-error[E0594]: cannot assign to `x.1`, as `x` is not declared as mutable
- --> $DIR/reassignment_immutable_fields.rs:26:5
- |
-LL | let x: (u32, u32);
- | - help: consider changing this to be mutable: `mut x`
LL | x.0 = 1; //~ ERROR
-LL | x.1 = 22; //~ ERROR
- | ^^^^^^^^ cannot assign
-
-error[E0381]: use of possibly uninitialized variable: `x`
- --> $DIR/reassignment_immutable_fields.rs:27:10
- |
-LL | drop(x); //~ ERROR
- | ^ use of possibly uninitialized `x`
+ | ^^^^^^^ use of possibly uninitialized `x`
-error: aborting due to 5 previous errors
+error: aborting due to 2 previous errors
-Some errors occurred: E0381, E0594.
-For more information about an error, try `rustc --explain E0381`.
+For more information about this error, try `rustc --explain E0381`.
-error[E0594]: cannot assign to `x.a`, as `x` is not declared as mutable
+error[E0381]: assign to part of possibly uninitialized variable: `x`
--> $DIR/reassignment_immutable_fields_overlapping.rs:22:5
|
-LL | let x: Foo;
- | - help: consider changing this to be mutable: `mut x`
LL | x.a = 1; //~ ERROR
- | ^^^^^^^ cannot assign
+ | ^^^^^^^ use of possibly uninitialized `x`
-error[E0594]: cannot assign to `x.b`, as `x` is not declared as mutable
- --> $DIR/reassignment_immutable_fields_overlapping.rs:23:5
- |
-LL | let x: Foo;
- | - help: consider changing this to be mutable: `mut x`
-LL | x.a = 1; //~ ERROR
-LL | x.b = 22; //~ ERROR
- | ^^^^^^^^ cannot assign
-
-error: aborting due to 2 previous errors
+error: aborting due to previous error
-For more information about this error, try `rustc --explain E0594`.
+For more information about this error, try `rustc --explain E0381`.
LL | x.0 = 1; //~ ERROR
| ^^^^^^^ cannot assign
-error[E0594]: cannot assign to `x.0`, as `x` is not declared as mutable
+error[E0381]: assign to part of possibly uninitialized variable: `x`
--> $DIR/reassignment_immutable_fields_twice.rs:22:5
|
-LL | let x: (u32, u32);
- | - help: consider changing this to be mutable: `mut x`
-LL | x.0 = 1; //~ ERROR
- | ^^^^^^^ cannot assign
-
-error[E0594]: cannot assign to `x.0`, as `x` is not declared as mutable
- --> $DIR/reassignment_immutable_fields_twice.rs:23:5
- |
-LL | let x: (u32, u32);
- | - help: consider changing this to be mutable: `mut x`
LL | x.0 = 1; //~ ERROR
-LL | x.0 = 22; //~ ERROR
- | ^^^^^^^^ cannot assign
-
-error[E0594]: cannot assign to `x.1`, as `x` is not declared as mutable
- --> $DIR/reassignment_immutable_fields_twice.rs:24:5
- |
-LL | let x: (u32, u32);
- | - help: consider changing this to be mutable: `mut x`
-...
-LL | x.1 = 44; //~ ERROR
- | ^^^^^^^^ cannot assign
+ | ^^^^^^^ use of possibly uninitialized `x`
-error: aborting due to 4 previous errors
+error: aborting due to 2 previous errors
-For more information about this error, try `rustc --explain E0594`.
+Some errors occurred: E0381, E0594.
+For more information about an error, try `rustc --explain E0381`.