]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/suggest-assign-rvalue.stderr
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / ui / borrowck / suggest-assign-rvalue.stderr
1 error[E0381]: used binding `chaenomeles` isn't initialized
2   --> $DIR/suggest-assign-rvalue.rs:14:11
3    |
4 LL |     let chaenomeles;
5    |         ----------- binding declared here but left uninitialized
6 LL |     apple(chaenomeles);
7    |           ^^^^^^^^^^^ `chaenomeles` used here but it isn't initialized
8    |
9 help: consider assigning a value
10    |
11 LL |     let chaenomeles = 0;
12    |                     +++
13
14 error[E0381]: used binding `my_float` isn't initialized
15   --> $DIR/suggest-assign-rvalue.rs:23:30
16    |
17 LL |     let my_float: f32;
18    |         -------- binding declared here but left uninitialized
19 LL |     println!("my_float: {}", my_float);
20    |                              ^^^^^^^^ `my_float` used here but it isn't initialized
21    |
22    = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
23 help: consider assigning a value
24    |
25 LL |     let my_float: f32 = 0.0;
26    |                       +++++
27
28 error[E0381]: used binding `demo` isn't initialized
29   --> $DIR/suggest-assign-rvalue.rs:26:28
30    |
31 LL |     let demo: Demo;
32    |         ---- binding declared here but left uninitialized
33 LL |     println!("demo: {:?}", demo);
34    |                            ^^^^ `demo` used here but it isn't initialized
35    |
36    = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
37 help: consider assigning a value
38    |
39 LL |     let demo: Demo = Default::default();
40    |                    ++++++++++++++++++++
41
42 error[E0381]: used binding `demo_no` isn't initialized
43   --> $DIR/suggest-assign-rvalue.rs:30:31
44    |
45 LL |     let demo_no: DemoNoDef;
46    |         ------- binding declared here but left uninitialized
47 LL |     println!("demo_no: {:?}", demo_no);
48    |                               ^^^^^^^ `demo_no` used here but it isn't initialized
49    |
50    = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
51 help: consider assigning a value
52    |
53 LL |     let demo_no: DemoNoDef = todo!();
54    |                            +++++++++
55
56 error[E0381]: used binding `arr` isn't initialized
57   --> $DIR/suggest-assign-rvalue.rs:34:27
58    |
59 LL |     let arr: [i32; 5];
60    |         --- binding declared here but left uninitialized
61 LL |     println!("arr: {:?}", arr);
62    |                           ^^^ `arr` used here but it isn't initialized
63    |
64    = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
65 help: consider assigning a value
66    |
67 LL |     let arr: [i32; 5] = todo!();
68    |                       +++++++++
69
70 error[E0381]: used binding `foo` isn't initialized
71   --> $DIR/suggest-assign-rvalue.rs:37:27
72    |
73 LL |     let foo: Vec<&str>;
74    |         --- binding declared here but left uninitialized
75 LL |     println!("foo: {:?}", foo);
76    |                           ^^^ `foo` used here but it isn't initialized
77    |
78    = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
79 help: consider assigning a value
80    |
81 LL |     let foo: Vec<&str> = vec![];
82    |                        ++++++++
83
84 error[E0381]: used binding `my_string` isn't initialized
85   --> $DIR/suggest-assign-rvalue.rs:41:31
86    |
87 LL |     let my_string: String;
88    |         --------- binding declared here but left uninitialized
89 LL |     println!("my_string: {}", my_string);
90    |                               ^^^^^^^^^ `my_string` used here but it isn't initialized
91    |
92    = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
93 help: consider assigning a value
94    |
95 LL |     let my_string: String = Default::default();
96    |                           ++++++++++++++++++++
97
98 error[E0381]: used binding `my_int` isn't initialized
99   --> $DIR/suggest-assign-rvalue.rs:45:28
100    |
101 LL |     let my_int: &i32;
102    |         ------ binding declared here but left uninitialized
103 LL |     println!("my_int: {}", *my_int);
104    |                            ^^^^^^^ `*my_int` used here but it isn't initialized
105    |
106    = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
107 help: consider assigning a value
108    |
109 LL |     let my_int: &i32 = todo!();
110    |                      +++++++++
111
112 error[E0381]: used binding `hello` isn't initialized
113   --> $DIR/suggest-assign-rvalue.rs:49:27
114    |
115 LL |     let hello: &str;
116    |         ----- binding declared here but left uninitialized
117 LL |     println!("hello: {}", hello);
118    |                           ^^^^^ `hello` used here but it isn't initialized
119    |
120    = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
121 help: consider assigning a value
122    |
123 LL |     let hello: &str = todo!();
124    |                     +++++++++
125
126 error[E0381]: used binding `never` isn't initialized
127   --> $DIR/suggest-assign-rvalue.rs:53:27
128    |
129 LL |     let never: !;
130    |         ----- binding declared here but left uninitialized
131 LL |     println!("never: {}", never);
132    |                           ^^^^^ `never` used here but it isn't initialized
133    |
134    = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
135
136 error: aborting due to 10 previous errors
137
138 For more information about this error, try `rustc --explain E0381`.