Skip to content

Error help suggests invalid syntax #56745

Closed
@bjorn3

Description

@bjorn3

impl Backend: 'static

error[E0310]: the parameter type `impl Backend` may not live long enough
   --> src/lib.rs:373:9
    |
362 | fn codegen_allocator_shim(sess: &Session, module: &mut Module<impl Backend>) {
    |                                                               ------------- help: consider adding an explicit lifetime bound `impl Backend: 'static`...
...
373 |         allocator::codegen(module, kind);
    |         ^^^^^^^^^^^^^^^^^^
    |
note: ...so that the type `impl Backend` will meet its required lifetime bounds
   --> src/lib.rs:373:9
    |
373 |         allocator::codegen(module, kind);
    |         ^^^^^^^^^^^^^^^^^^

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions