Skip to content

Support HRTB #91

@emil-e

Description

@emil-e

Given the following declaration:

pin_project! {
    pub struct ReactiveControl<State, F, ViewControl>
    where
    F: for<'a> ReactiveFn<'a, State>,
    {
        f: F,

        #[pin]
        inner: OnceCell<ViewControl>,
        state_cell: RefCell<StateCell<State>>,
        _phantom: PhantomData<ViewControl>
    }
}

There is this error:

rustc: error: expected identifier, found keyword `for`
    --> retroact/src/reactive.rs:84:8
     |
  84 |     F: for<'a> ReactiveFn<'a, State>,
     |        ^^^ expected identifier, found keyword
     |
    ::: /Users/shadewind/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pin-project-lite-0.2.16/src/lib.rs:1642:21
     |
1642 |                 $(: $where_clause_bound:path)?
     |                     ------------------------ while parsing argument for this `path` macro fragment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-parsingArea: Parsing. Due to nature/limitation of declarative macro not all syntax can be easily supported.C-enhancementCategory: A new feature or an improvement for an existing onehelp wantedCall for participation: Help is requested to fix this issue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions