2022-09-23 14:22:36 +00:00
|
|
|
error[E0493]: destructor of `Foo<T>` cannot be evaluated at compile-time
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/min_const_fn.rs:37:25
|
2018-08-22 15:56:37 +02:00
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | const fn into_inner(self) -> T { self.0 }
|
2020-06-20 20:38:57 +00:00
|
|
|
| ^^^^ - value is dropped here
|
|
|
|
|
| |
|
2022-09-23 14:22:36 +00:00
|
|
|
| the destructor for this type cannot be evaluated in constant functions
|
2018-08-22 15:56:37 +02:00
|
|
|
|
2022-09-23 14:22:36 +00:00
|
|
|
error[E0493]: destructor of `Foo<T>` cannot be evaluated at compile-time
|
2024-08-17 14:19:34 +02:00
|
|
|
--> $DIR/min_const_fn.rs:43:28
|
2018-08-22 15:56:37 +02:00
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | const fn into_inner_lt(self) -> T { self.0 }
|
2020-06-20 20:38:57 +00:00
|
|
|
| ^^^^ - value is dropped here
|
|
|
|
|
| |
|
2022-09-23 14:22:36 +00:00
|
|
|
| the destructor for this type cannot be evaluated in constant functions
|
2018-08-22 15:56:37 +02:00
|
|
|
|
2022-09-23 14:22:36 +00:00
|
|
|
error[E0493]: destructor of `Foo<T>` cannot be evaluated at compile-time
|
2024-08-17 14:19:34 +02:00
|
|
|
--> $DIR/min_const_fn.rs:49:27
|
2018-08-22 15:56:37 +02:00
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | const fn into_inner_s(self) -> T { self.0 }
|
2020-06-20 20:38:57 +00:00
|
|
|
| ^^^^ - value is dropped here
|
|
|
|
|
| |
|
2022-09-23 14:22:36 +00:00
|
|
|
| the destructor for this type cannot be evaluated in constant functions
|
2018-08-22 15:56:37 +02:00
|
|
|
|
2021-10-03 15:53:02 +09:00
|
|
|
error: pointers cannot be cast to integers during const eval
|
2024-08-17 14:19:34 +02:00
|
|
|
--> $DIR/min_const_fn.rs:79:42
|
2018-08-22 15:56:37 +02:00
|
|
|
|
|
|
|
|
|
LL | const fn foo30(x: *const u32) -> usize { x as usize }
|
|
|
|
|
| ^^^^^^^^^^
|
2019-02-05 21:27:44 +01:00
|
|
|
|
|
2021-07-10 11:33:42 +02:00
|
|
|
= note: at compile-time, pointers do not have an integer value
|
|
|
|
|
= note: avoiding this restriction via `transmute`, `union`, or raw pointers leads to compile-time undefined behavior
|
2018-08-22 15:56:37 +02:00
|
|
|
|
2021-10-03 15:53:02 +09:00
|
|
|
error: pointers cannot be cast to integers during const eval
|
2024-08-17 14:19:34 +02:00
|
|
|
--> $DIR/min_const_fn.rs:81:63
|
2018-12-07 18:26:46 +01:00
|
|
|
|
|
|
|
|
|
LL | const fn foo30_with_unsafe(x: *const u32) -> usize { unsafe { x as usize } }
|
|
|
|
|
| ^^^^^^^^^^
|
2019-02-05 21:27:44 +01:00
|
|
|
|
|
2021-07-10 11:33:42 +02:00
|
|
|
= note: at compile-time, pointers do not have an integer value
|
|
|
|
|
= note: avoiding this restriction via `transmute`, `union`, or raw pointers leads to compile-time undefined behavior
|
2018-12-07 18:26:46 +01:00
|
|
|
|
2021-10-03 15:53:02 +09:00
|
|
|
error: pointers cannot be cast to integers during const eval
|
2024-08-17 14:19:34 +02:00
|
|
|
--> $DIR/min_const_fn.rs:83:42
|
2018-08-22 15:56:37 +02:00
|
|
|
|
|
|
|
|
|
LL | const fn foo30_2(x: *mut u32) -> usize { x as usize }
|
|
|
|
|
| ^^^^^^^^^^
|
2019-02-05 21:27:44 +01:00
|
|
|
|
|
2021-07-10 11:33:42 +02:00
|
|
|
= note: at compile-time, pointers do not have an integer value
|
|
|
|
|
= note: avoiding this restriction via `transmute`, `union`, or raw pointers leads to compile-time undefined behavior
|
2018-08-22 15:56:37 +02:00
|
|
|
|
2021-10-03 15:53:02 +09:00
|
|
|
error: pointers cannot be cast to integers during const eval
|
2024-08-17 14:19:34 +02:00
|
|
|
--> $DIR/min_const_fn.rs:85:63
|
2018-12-07 18:26:46 +01:00
|
|
|
|
|
|
|
|
|
LL | const fn foo30_2_with_unsafe(x: *mut u32) -> usize { unsafe { x as usize } }
|
|
|
|
|
| ^^^^^^^^^^
|
2019-02-05 21:27:44 +01:00
|
|
|
|
|
2021-07-10 11:33:42 +02:00
|
|
|
= note: at compile-time, pointers do not have an integer value
|
|
|
|
|
= note: avoiding this restriction via `transmute`, `union`, or raw pointers leads to compile-time undefined behavior
|
2018-12-07 18:26:46 +01:00
|
|
|
|
2022-09-23 14:22:36 +00:00
|
|
|
error[E0493]: destructor of `AlanTuring<impl std::fmt::Debug>` cannot be evaluated at compile-time
|
2024-08-17 14:19:34 +02:00
|
|
|
--> $DIR/min_const_fn.rs:109:19
|
2020-09-29 18:52:26 -07:00
|
|
|
|
|
|
|
|
|
LL | const fn no_apit2(_x: AlanTuring<impl std::fmt::Debug>) {}
|
|
|
|
|
| ^^ - value is dropped here
|
|
|
|
|
| |
|
2022-09-23 14:22:36 +00:00
|
|
|
| the destructor for this type cannot be evaluated in constant functions
|
2020-09-29 18:52:26 -07:00
|
|
|
|
2022-09-23 14:22:36 +00:00
|
|
|
error[E0493]: destructor of `impl std::fmt::Debug` cannot be evaluated at compile-time
|
2024-08-17 14:19:34 +02:00
|
|
|
--> $DIR/min_const_fn.rs:111:18
|
2020-09-29 18:52:26 -07:00
|
|
|
|
|
|
|
|
|
LL | const fn no_apit(_x: impl std::fmt::Debug) {}
|
|
|
|
|
| ^^ - value is dropped here
|
|
|
|
|
| |
|
2022-09-23 14:22:36 +00:00
|
|
|
| the destructor for this type cannot be evaluated in constant functions
|
2020-09-29 18:52:26 -07:00
|
|
|
|
2024-08-30 04:48:05 +08:00
|
|
|
error: aborting due to 9 previous errors
|
2018-08-22 15:56:37 +02:00
|
|
|
|
2024-08-30 04:48:05 +08:00
|
|
|
For more information about this error, try `rustc --explain E0493`.
|