fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
5.9 KiB138 linesraw
1error[E0381]: used binding `chaenomeles` isn't initialized
2  --> $DIR/suggest-assign-rvalue.rs:14:11
3   |
4LL |     let chaenomeles;
5   |         ----------- binding declared here but left uninitialized
6LL |     apple(chaenomeles);
7   |           ^^^^^^^^^^^ `chaenomeles` used here but it isn't initialized
8   |
9help: consider assigning a value
10   |
11LL |     let chaenomeles = 0;
12   |                     +++
13
14error[E0381]: used binding `my_float` isn't initialized
15  --> $DIR/suggest-assign-rvalue.rs:23:30
16   |
17LL |     let my_float: f32;
18   |         -------- binding declared here but left uninitialized
19LL |     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)
23help: consider assigning a value
24   |
25LL |     let my_float: f32 = 0.0;
26   |                       +++++
27
28error[E0381]: used binding `demo` isn't initialized
29  --> $DIR/suggest-assign-rvalue.rs:26:28
30   |
31LL |     let demo: Demo;
32   |         ---- binding declared here but left uninitialized
33LL |     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)
37help: consider assigning a value
38   |
39LL |     let demo: Demo = Default::default();
40   |                    ++++++++++++++++++++
41
42error[E0381]: used binding `demo_no` isn't initialized
43  --> $DIR/suggest-assign-rvalue.rs:30:31
44   |
45LL |     let demo_no: DemoNoDef;
46   |         ------- binding declared here but left uninitialized
47LL |     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)
51help: consider assigning a value
52   |
53LL |     let demo_no: DemoNoDef = todo!();
54   |                            +++++++++
55
56error[E0381]: used binding `arr` isn't initialized
57  --> $DIR/suggest-assign-rvalue.rs:34:27
58   |
59LL |     let arr: [i32; 5];
60   |         --- binding declared here but left uninitialized
61LL |     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)
65help: consider assigning a value
66   |
67LL |     let arr: [i32; 5] = todo!();
68   |                       +++++++++
69
70error[E0381]: used binding `foo` isn't initialized
71  --> $DIR/suggest-assign-rvalue.rs:37:27
72   |
73LL |     let foo: Vec<&str>;
74   |         --- binding declared here but left uninitialized
75LL |     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)
79help: consider assigning a value
80   |
81LL |     let foo: Vec<&str> = vec![];
82   |                        ++++++++
83
84error[E0381]: used binding `my_string` isn't initialized
85  --> $DIR/suggest-assign-rvalue.rs:41:31
86   |
87LL |     let my_string: String;
88   |         --------- binding declared here but left uninitialized
89LL |     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)
93help: consider assigning a value
94   |
95LL |     let my_string: String = Default::default();
96   |                           ++++++++++++++++++++
97
98error[E0381]: used binding `my_int` isn't initialized
99  --> $DIR/suggest-assign-rvalue.rs:45:28
100   |
101LL |     let my_int: &i32;
102   |         ------ binding declared here but left uninitialized
103LL |     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)
107help: consider assigning a value
108   |
109LL |     let my_int: &i32 = todo!();
110   |                      +++++++++
111
112error[E0381]: used binding `hello` isn't initialized
113  --> $DIR/suggest-assign-rvalue.rs:49:27
114   |
115LL |     let hello: &str;
116   |         ----- binding declared here but left uninitialized
117LL |     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)
121help: consider assigning a value
122   |
123LL |     let hello: &str = todo!();
124   |                     +++++++++
125
126error[E0381]: used binding `never` isn't initialized
127  --> $DIR/suggest-assign-rvalue.rs:53:27
128   |
129LL |     let never: !;
130   |         ----- binding declared here but left uninitialized
131LL |     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
136error: aborting due to 10 previous errors
137
138For more information about this error, try `rustc --explain E0381`.