blob: ea3d0d3ef51cb4bf9c69b6172f61d80fd2d6ec51 [file] [log] [blame]
Chariseeb1d32802022-09-22 15:38:41 +00001error[E0381]: used binding `x` isn't initialized
Chih-Hung Hsiehfd666f22019-12-19 14:34:18 -08002 --> $DIR/borrowck-use-uninitialized-in-cast.rs:7:13
3 |
Chariseeb1d32802022-09-22 15:38:41 +00004LL | let x: &i32;
5 | - binding declared here but left uninitialized
Chih-Hung Hsiehfd666f22019-12-19 14:34:18 -08006LL | let y = x as *const i32;
Chariseeb1d32802022-09-22 15:38:41 +00007 | ^ `*x` used here but it isn't initialized
Chariseef7ad1c42023-01-30 22:46:42 +00008 |
9help: consider assigning a value
10 |
11LL | let x: &i32 = todo!();
12 | +++++++++
Chih-Hung Hsiehfd666f22019-12-19 14:34:18 -080013
14error: aborting due to previous error
15
16For more information about this error, try `rustc --explain E0381`.