summaryrefslogtreecommitdiffstats
path: root/tests/ui/borrowck/suggest-assign-rvalue.stderr
blob: 92acba640d756864d426aaeb6c3ee94d68a17db9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
error[E0381]: used binding `chaenomeles` isn't initialized
  --> $DIR/suggest-assign-rvalue.rs:14:11
   |
LL |     let chaenomeles;
   |         ----------- binding declared here but left uninitialized
LL |     apple(chaenomeles);
   |           ^^^^^^^^^^^ `chaenomeles` used here but it isn't initialized
   |
help: consider assigning a value
   |
LL |     let chaenomeles = 0;
   |                     +++

error[E0381]: used binding `my_float` isn't initialized
  --> $DIR/suggest-assign-rvalue.rs:23:30
   |
LL |     let my_float: f32;
   |         -------- binding declared here but left uninitialized
LL |     println!("my_float: {}", my_float);
   |                              ^^^^^^^^ `my_float` used here but it isn't initialized
   |
   = 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)
help: consider assigning a value
   |
LL |     let my_float: f32 = 0.0;
   |                       +++++

error[E0381]: used binding `demo` isn't initialized
  --> $DIR/suggest-assign-rvalue.rs:26:28
   |
LL |     let demo: Demo;
   |         ---- binding declared here but left uninitialized
LL |     println!("demo: {:?}", demo);
   |                            ^^^^ `demo` used here but it isn't initialized
   |
   = 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)
help: consider assigning a value
   |
LL |     let demo: Demo = Default::default();
   |                    ++++++++++++++++++++

error[E0381]: used binding `demo_no` isn't initialized
  --> $DIR/suggest-assign-rvalue.rs:30:31
   |
LL |     let demo_no: DemoNoDef;
   |         ------- binding declared here but left uninitialized
LL |     println!("demo_no: {:?}", demo_no);
   |                               ^^^^^^^ `demo_no` used here but it isn't initialized
   |
   = 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)
help: consider assigning a value
   |
LL |     let demo_no: DemoNoDef = todo!();
   |                            +++++++++

error[E0381]: used binding `arr` isn't initialized
  --> $DIR/suggest-assign-rvalue.rs:34:27
   |
LL |     let arr: [i32; 5];
   |         --- binding declared here but left uninitialized
LL |     println!("arr: {:?}", arr);
   |                           ^^^ `arr` used here but it isn't initialized
   |
   = 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)
help: consider assigning a value
   |
LL |     let arr: [i32; 5] = todo!();
   |                       +++++++++

error[E0381]: used binding `foo` isn't initialized
  --> $DIR/suggest-assign-rvalue.rs:37:27
   |
LL |     let foo: Vec<&str>;
   |         --- binding declared here but left uninitialized
LL |     println!("foo: {:?}", foo);
   |                           ^^^ `foo` used here but it isn't initialized
   |
   = 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)
help: consider assigning a value
   |
LL |     let foo: Vec<&str> = vec![];
   |                        ++++++++

error[E0381]: used binding `my_string` isn't initialized
  --> $DIR/suggest-assign-rvalue.rs:41:31
   |
LL |     let my_string: String;
   |         --------- binding declared here but left uninitialized
LL |     println!("my_string: {}", my_string);
   |                               ^^^^^^^^^ `my_string` used here but it isn't initialized
   |
   = 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)
help: consider assigning a value
   |
LL |     let my_string: String = Default::default();
   |                           ++++++++++++++++++++

error[E0381]: used binding `my_int` isn't initialized
  --> $DIR/suggest-assign-rvalue.rs:45:28
   |
LL |     let my_int: &i32;
   |         ------ binding declared here but left uninitialized
LL |     println!("my_int: {}", *my_int);
   |                            ^^^^^^^ `*my_int` used here but it isn't initialized
   |
   = 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)
help: consider assigning a value
   |
LL |     let my_int: &i32 = todo!();
   |                      +++++++++

error[E0381]: used binding `hello` isn't initialized
  --> $DIR/suggest-assign-rvalue.rs:49:27
   |
LL |     let hello: &str;
   |         ----- binding declared here but left uninitialized
LL |     println!("hello: {}", hello);
   |                           ^^^^^ `hello` used here but it isn't initialized
   |
   = 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)
help: consider assigning a value
   |
LL |     let hello: &str = todo!();
   |                     +++++++++

error[E0381]: used binding `never` isn't initialized
  --> $DIR/suggest-assign-rvalue.rs:53:27
   |
LL |     let never: !;
   |         ----- binding declared here but left uninitialized
LL |     println!("never: {}", never);
   |                           ^^^^^ `never` used here but it isn't initialized
   |
   = 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)

error: aborting due to 10 previous errors

For more information about this error, try `rustc --explain E0381`.