Skip to content

regression: parameter type may not live long enough #123280

Closed
@Mark-Simulacrum

Description

@Mark-Simulacrum
[INFO] [stdout] error[E0310]: the parameter type `EWA` may not live long enough
[INFO] [stdout]    --> src/worker_pool.rs:109:1
[INFO] [stdout]     |
[INFO] [stdout] 109 | / {
[INFO] [stdout] 110 | |     let mut handle_vec = Vec::with_capacity(default_worker);
[INFO] [stdout] 111 | |
[INFO] [stdout] 112 | |     let mut worker_sender_vec = Vec::with_capacity(default_worker);
[INFO] [stdout] ...   |
[INFO] [stdout] 128 | |     }
[INFO] [stdout] 129 | | }
[INFO] [stdout]     | | ^
[INFO] [stdout]     | | |
[INFO] [stdout]     | |_the parameter type `EWA` must be valid for the static lifetime...
[INFO] [stdout]     |   ...so that the type `EWA` will meet its required lifetime bounds
[INFO] [stdout]     |
[INFO] [stdout] help: consider adding an explicit lifetime bound
[INFO] [stdout]     |
[INFO] [stdout] 108 |     EWA: Clone + 'static,
[INFO] [stdout]     |                +++++++++

Smells similar to #123279, but maybe not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions