]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/borrowck-uninit-ref-chain.stderr
Auto merge of #98051 - davidtwco:split-dwarf-stabilization, r=wesleywiser
[rust.git] / src / test / ui / borrowck / borrowck-uninit-ref-chain.stderr
1 error[E0381]: used binding `x` isn't initialized
2   --> $DIR/borrowck-uninit-ref-chain.rs:8:14
3    |
4 LL |     let x: &&Box<i32>;
5    |         - binding declared here but left uninitialized
6 LL |     let _y = &**x;
7    |              ^^^^ `**x` used here but it isn't initialized
8
9 error[E0381]: used binding `x` isn't initialized
10   --> $DIR/borrowck-uninit-ref-chain.rs:11:14
11    |
12 LL |     let x: &&S<i32, i32>;
13    |         - binding declared here but left uninitialized
14 LL |     let _y = &**x;
15    |              ^^^^ `**x` used here but it isn't initialized
16
17 error[E0381]: used binding `x` isn't initialized
18   --> $DIR/borrowck-uninit-ref-chain.rs:14:14
19    |
20 LL |     let x: &&i32;
21    |         - binding declared here but left uninitialized
22 LL |     let _y = &**x;
23    |              ^^^^ `**x` used here but it isn't initialized
24
25 error[E0381]: partially assigned binding `a` isn't fully initialized
26   --> $DIR/borrowck-uninit-ref-chain.rs:18:5
27    |
28 LL |     let mut a: S<i32, i32>;
29    |         ----- binding declared here but left uninitialized
30 LL |     a.x = 0;
31    |     ^^^^^^^ `a` partially assigned here but it isn't fully initialized
32    |
33    = help: partial initialization isn't supported, fully initialize the binding with a default value and mutate it, or use `std::mem::MaybeUninit`
34
35 error[E0381]: partially assigned binding `a` isn't fully initialized
36   --> $DIR/borrowck-uninit-ref-chain.rs:22:5
37    |
38 LL |     let mut a: S<&&i32, &&i32>;
39    |         ----- binding declared here but left uninitialized
40 LL |     a.x = &&0;
41    |     ^^^^^^^^^ `a` partially assigned here but it isn't fully initialized
42    |
43    = help: partial initialization isn't supported, fully initialize the binding with a default value and mutate it, or use `std::mem::MaybeUninit`
44
45 error[E0381]: partially assigned binding `a` isn't fully initialized
46   --> $DIR/borrowck-uninit-ref-chain.rs:27:5
47    |
48 LL |     let mut a: S<i32, i32>;
49    |         ----- binding declared here but left uninitialized
50 LL |     a.x = 0;
51    |     ^^^^^^^ `a` partially assigned here but it isn't fully initialized
52    |
53    = help: partial initialization isn't supported, fully initialize the binding with a default value and mutate it, or use `std::mem::MaybeUninit`
54
55 error[E0381]: partially assigned binding `a` isn't fully initialized
56   --> $DIR/borrowck-uninit-ref-chain.rs:31:5
57    |
58 LL |     let mut a: S<&&i32, &&i32>;
59    |         ----- binding declared here but left uninitialized
60 LL |     a.x = &&0;
61    |     ^^^^^^^^^ `a` partially assigned here but it isn't fully initialized
62    |
63    = help: partial initialization isn't supported, fully initialize the binding with a default value and mutate it, or use `std::mem::MaybeUninit`
64
65 error: aborting due to 7 previous errors
66
67 For more information about this error, try `rustc --explain E0381`.