-
-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Labels
A-pin-projectionArea: #[pin_project]Area: #[pin_project]C-enhancementCategory: A new feature or an improvement for an existing oneCategory: A new feature or an improvement for an existing one
Description
When I try to use a project_ref method in a const function I get an error:
error[E0015]: cannot call non-const method `union::_::<impl union::Running<F>>::project_ref` in constant functions
--> storage/m5/async/task.rs:558:71
|
558 | let future: Pin<&PinnedUnsafeCell<F>> = running_state.project_ref().future;
| ^^^^^^^^^^^^^
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
Is it possible to support this? It doesn't seem like there would be anything in the projection logic that can't itself be const.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-pin-projectionArea: #[pin_project]Area: #[pin_project]C-enhancementCategory: A new feature or an improvement for an existing oneCategory: A new feature or an improvement for an existing one