Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unboxed trait object can be stored in struct without lifetime #23410

Closed
huonw opened this Issue Mar 16, 2015 · 3 comments

Comments

Projects
None yet
4 participants
@huonw
Copy link
Member

huonw commented Mar 16, 2015

trait Foo { fn method(&self); }

struct Wrapper(Foo);

fn main() {}

It seems to me that this should be requiring a lifetime, e.g. struct Wrapper<'a>(Foo + 'a); or struct Wrapper(Foo + 'static);. However, it may be the intended behaviour too, nominating for clarification.

@ben0x539

This comment has been minimized.

Copy link
Contributor

ben0x539 commented Mar 18, 2015

Isn't this RFC 599?

@nikomatsakis

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Mar 19, 2015

I agree this is RFC 599.

@pnkfelix

This comment has been minimized.

Copy link
Member

pnkfelix commented Mar 19, 2015

not-a-bug, (as designed), closing.

@pnkfelix pnkfelix closed this Mar 19, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.