]> git.proxmox.com Git - rustc.git/blob - tests/ui/borrowck/borrowck-uninit-ref-chain.stderr
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / 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 help: consider assigning a value
10 |
11 LL | let x: &&Box<i32> = todo!();
12 | +++++++++
13
14 error[E0381]: used binding `x` isn't initialized
15 --> $DIR/borrowck-uninit-ref-chain.rs:11:14
16 |
17 LL | let x: &&S<i32, i32>;
18 | - binding declared here but left uninitialized
19 LL | let _y = &**x;
20 | ^^^^ `**x` used here but it isn't initialized
21 |
22 help: consider assigning a value
23 |
24 LL | let x: &&S<i32, i32> = todo!();
25 | +++++++++
26
27 error[E0381]: used binding `x` isn't initialized
28 --> $DIR/borrowck-uninit-ref-chain.rs:14:14
29 |
30 LL | let x: &&i32;
31 | - binding declared here but left uninitialized
32 LL | let _y = &**x;
33 | ^^^^ `**x` used here but it isn't initialized
34 |
35 help: consider assigning a value
36 |
37 LL | let x: &&i32 = todo!();
38 | +++++++++
39
40 error[E0381]: partially assigned binding `a` isn't fully initialized
41 --> $DIR/borrowck-uninit-ref-chain.rs:18:5
42 |
43 LL | let mut a: S<i32, i32>;
44 | ----- binding declared here but left uninitialized
45 LL | a.x = 0;
46 | ^^^^^^^ `a` partially assigned here but it isn't fully initialized
47 |
48 = help: partial initialization isn't supported, fully initialize the binding with a default value and mutate it, or use `std::mem::MaybeUninit`
49
50 error[E0381]: partially assigned binding `a` isn't fully initialized
51 --> $DIR/borrowck-uninit-ref-chain.rs:22:5
52 |
53 LL | let mut a: S<&&i32, &&i32>;
54 | ----- binding declared here but left uninitialized
55 LL | a.x = &&0;
56 | ^^^^^^^^^ `a` partially assigned here but it isn't fully initialized
57 |
58 = help: partial initialization isn't supported, fully initialize the binding with a default value and mutate it, or use `std::mem::MaybeUninit`
59
60 error[E0381]: partially assigned binding `a` isn't fully initialized
61 --> $DIR/borrowck-uninit-ref-chain.rs:27:5
62 |
63 LL | let mut a: S<i32, i32>;
64 | ----- binding declared here but left uninitialized
65 LL | a.x = 0;
66 | ^^^^^^^ `a` partially assigned here but it isn't fully initialized
67 |
68 = help: partial initialization isn't supported, fully initialize the binding with a default value and mutate it, or use `std::mem::MaybeUninit`
69
70 error[E0381]: partially assigned binding `a` isn't fully initialized
71 --> $DIR/borrowck-uninit-ref-chain.rs:31:5
72 |
73 LL | let mut a: S<&&i32, &&i32>;
74 | ----- binding declared here but left uninitialized
75 LL | a.x = &&0;
76 | ^^^^^^^^^ `a` partially assigned here but it isn't fully initialized
77 |
78 = help: partial initialization isn't supported, fully initialize the binding with a default value and mutate it, or use `std::mem::MaybeUninit`
79
80 error: aborting due to 7 previous errors
81
82 For more information about this error, try `rustc --explain E0381`.