Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

Declaring lifetimes in Helix class structs? #145

Open
dtpowl opened this issue Feb 19, 2018 · 1 comment
Open

Declaring lifetimes in Helix class structs? #145

dtpowl opened this issue Feb 19, 2018 · 1 comment
Labels

Comments

@dtpowl
Copy link

dtpowl commented Feb 19, 2018

I need to do something along these lines:

ruby! {
    class Foo {
        struct { bar: Bar<'a> }
     }
}

But of course this doesn't work, because the lifetime 'a hasn't been declared. But I can't figure out where/how to declare it. In a normal Rust struct, I could say struct Baz<'a> { bar: Bar<'a> }, of course, but the anonymous-struct Helix syntax doesn't give me a place to put the lifetime declaration. I've tried a handful of different things but they all result in the macro-expansion failing.

Am I missing something? Is this just a missing feature at the moment?

@chancancode
Copy link
Member

chancancode commented Jun 2, 2018

You are correct, this is a missing feature at the moment. There are some pending parser changes that need to be merged first, but I'll work on this next.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants