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

Unsoundness: trait implementations can impose stronger lifetime constraints on generics than the trait they implement #25018

Closed
aturon opened this issue May 1, 2015 · 3 comments
Assignees
Labels
A-trait-system Area: Trait system A-type-system Area: Type system P-high High priority

Comments

@aturon
Copy link
Member

aturon commented May 1, 2015

The following compiles:

trait Foo {
    fn foo<T: Clone>(t: T);
}

struct Bar;

impl Foo for Bar {
    fn foo<T: Clone + 'static>(t: T) { }
}
@aturon aturon added A-type-system Area: Type system A-trait-system Area: Trait system labels May 1, 2015
@alexcrichton
Copy link
Member

triage: I-nominated

@nikomatsakis
Copy link
Contributor

triage: P-high

@rust-highfive rust-highfive added P-high High priority and removed I-nominated labels May 1, 2015
@eddyb
Copy link
Member

eddyb commented May 3, 2015

dup of #18937

@aturon aturon closed this as completed May 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-trait-system Area: Trait system A-type-system Area: Type system P-high High priority
Projects
None yet
Development

No branches or pull requests

5 participants