Charisee | b1d3280 | 2022-09-22 15:38:41 +0000 | [diff] [blame] | 1 | error[E0381]: used binding `x` isn't initialized |
Chih-Hung Hsieh | fd666f2 | 2019-12-19 14:34:18 -0800 | [diff] [blame] | 2 | --> $DIR/borrowck-use-uninitialized-in-cast.rs:7:13 |
| 3 | | |
Charisee | b1d3280 | 2022-09-22 15:38:41 +0000 | [diff] [blame] | 4 | LL | let x: &i32; |
| 5 | | - binding declared here but left uninitialized |
Chih-Hung Hsieh | fd666f2 | 2019-12-19 14:34:18 -0800 | [diff] [blame] | 6 | LL | let y = x as *const i32; |
Charisee | b1d3280 | 2022-09-22 15:38:41 +0000 | [diff] [blame] | 7 | | ^ `*x` used here but it isn't initialized |
Charisee | f7ad1c4 | 2023-01-30 22:46:42 +0000 | [diff] [blame] | 8 | | |
| 9 | help: consider assigning a value |
| 10 | | |
| 11 | LL | let x: &i32 = todo!(); |
| 12 | | +++++++++ |
Chih-Hung Hsieh | fd666f2 | 2019-12-19 14:34:18 -0800 | [diff] [blame] | 13 | |
| 14 | error: aborting due to previous error |
| 15 | |
| 16 | For more information about this error, try `rustc --explain E0381`. |