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

#[derive(Default)] constraints type parameters despite not being required for a Default bound. #35263

Closed
ticki opened this issue Aug 3, 2016 · 4 comments

Comments

@ticki
Copy link
Contributor

ticki commented Aug 3, 2016

#[derive(Default)]
struct Type<T> {
    vec: Vec<T>,
}

only derives Type<T>: Default if T: Default, which is unnecessary, given a Vec<T>: Default for any unbounded T.

@jonas-schievink
Copy link
Contributor

Sounds like #26925

@ticki
Copy link
Contributor Author

ticki commented Aug 3, 2016

Certainly related, but not exactly a duplicate.

@apasel422
Copy link
Contributor

Since #32673 was a duplicate of #26925, I would argue this is as well.

@eddyb
Copy link
Member

eddyb commented Aug 3, 2016

Closing as duplicate of #26925.

@eddyb eddyb closed this as completed Aug 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants