2019-04-22 02:40:08 -05:00
|
|
|
error[E0716]: temporary value dropped while borrowed
|
2021-10-05 03:55:57 -05:00
|
|
|
--> $DIR/promoted_raw_ptr_ops.rs:2:29
|
2018-08-03 06:27:35 -05:00
|
|
|
|
|
|
|
|
LL | let x: &'static bool = &(42 as *const i32 == 43 as *const i32);
|
2022-10-20 10:43:27 -05:00
|
|
|
| ------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary value which is freed while still in use
|
2019-04-22 02:40:08 -05:00
|
|
|
| |
|
|
|
|
| type annotation requires that borrow lasts for `'static`
|
2018-08-03 06:27:35 -05:00
|
|
|
...
|
|
|
|
LL | }
|
2019-04-22 02:40:08 -05:00
|
|
|
| - temporary value is freed at the end of this statement
|
2018-08-03 06:27:35 -05:00
|
|
|
|
2019-04-22 02:40:08 -05:00
|
|
|
error[E0716]: temporary value dropped while borrowed
|
2021-10-05 03:55:57 -05:00
|
|
|
--> $DIR/promoted_raw_ptr_ops.rs:4:30
|
2018-08-03 06:27:35 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | let y: &'static usize = &(&1 as *const i32 as usize + 1);
|
2022-10-20 10:43:27 -05:00
|
|
|
| -------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary value which is freed while still in use
|
2019-04-22 02:40:08 -05:00
|
|
|
| |
|
|
|
|
| type annotation requires that borrow lasts for `'static`
|
2018-09-30 13:25:19 -05:00
|
|
|
...
|
2018-08-03 06:27:35 -05:00
|
|
|
LL | }
|
2019-04-22 02:40:08 -05:00
|
|
|
| - temporary value is freed at the end of this statement
|
2018-08-03 06:27:35 -05:00
|
|
|
|
2019-04-22 02:40:08 -05:00
|
|
|
error[E0716]: temporary value dropped while borrowed
|
2021-10-05 03:55:57 -05:00
|
|
|
--> $DIR/promoted_raw_ptr_ops.rs:6:28
|
2018-08-03 06:27:35 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | let z: &'static i32 = &(unsafe { *(42 as *const i32) });
|
2022-10-20 10:43:27 -05:00
|
|
|
| ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary value which is freed while still in use
|
2019-04-22 02:40:08 -05:00
|
|
|
| |
|
|
|
|
| type annotation requires that borrow lasts for `'static`
|
|
|
|
...
|
2018-09-30 13:25:19 -05:00
|
|
|
LL | }
|
2019-04-22 02:40:08 -05:00
|
|
|
| - temporary value is freed at the end of this statement
|
2018-09-30 13:25:19 -05:00
|
|
|
|
2019-04-22 02:40:08 -05:00
|
|
|
error[E0716]: temporary value dropped while borrowed
|
2021-10-05 03:55:57 -05:00
|
|
|
--> $DIR/promoted_raw_ptr_ops.rs:8:29
|
2018-09-30 13:25:19 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | let a: &'static bool = &(main as fn() == main as fn());
|
2022-10-20 10:43:27 -05:00
|
|
|
| ------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary value which is freed while still in use
|
2019-04-22 02:40:08 -05:00
|
|
|
| |
|
|
|
|
| type annotation requires that borrow lasts for `'static`
|
|
|
|
LL |
|
2018-08-03 06:27:35 -05:00
|
|
|
LL | }
|
2019-04-22 02:40:08 -05:00
|
|
|
| - temporary value is freed at the end of this statement
|
2018-08-03 06:27:35 -05:00
|
|
|
|
2018-09-30 13:25:19 -05:00
|
|
|
error: aborting due to 4 previous errors
|
2018-08-03 06:27:35 -05:00
|
|
|
|
2019-04-22 02:40:08 -05:00
|
|
|
For more information about this error, try `rustc --explain E0716`.
|