Files
rust/tests/ui/consts/min_const_fn/min_const_fn.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

80 lines
3.6 KiB
Plaintext
Raw Normal View History

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
|
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
| |
| the destructor for this type cannot be evaluated in constant functions
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
|
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
| |
| the destructor for this type cannot be evaluated in constant functions
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
|
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
| |
| the destructor for this type cannot be evaluated in constant functions
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
|
LL | const fn foo30(x: *const u32) -> usize { x as usize }
| ^^^^^^^^^^
2019-02-05 21:27:44 +01: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
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
|
LL | const fn foo30_with_unsafe(x: *const u32) -> usize { unsafe { x as usize } }
| ^^^^^^^^^^
2019-02-05 21:27:44 +01: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
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
|
LL | const fn foo30_2(x: *mut u32) -> usize { x as usize }
| ^^^^^^^^^^
2019-02-05 21:27:44 +01: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
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
|
LL | const fn foo30_2_with_unsafe(x: *mut u32) -> usize { unsafe { x as usize } }
| ^^^^^^^^^^
2019-02-05 21:27:44 +01: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
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
| |
| the destructor for this type cannot be evaluated in constant functions
2020-09-29 18:52:26 -07: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
| |
| the destructor for this type cannot be evaluated in constant functions
2020-09-29 18:52:26 -07:00
error: aborting due to 9 previous errors
For more information about this error, try `rustc --explain E0493`.