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

new-without-default-derive ignores existing derives #1410

Open
llogiq opened this issue Dec 29, 2016 · 1 comment
Open

new-without-default-derive ignores existing derives #1410

llogiq opened this issue Dec 29, 2016 · 1 comment

Comments

@llogiq
Copy link
Contributor

llogiq commented Dec 29, 2016

To make applying the Default derive easier, we could look at existing derives and add Default there.

@wduquette
Copy link

Still seeing this error sometimes; here's an example. This is with Rust 2018 Edition and "stable-x86_64-apple-darwin unchanged - rustc 1.31.1 (b6c32da9b 2018-12-18".

#[derive(Default)]
pub struct Foo<T> {
    bar: Option<Bar<T>>,
}

impl<T> Foo<T> {
    pub fn new() -> Self {
        Self {
            bar: None
        }
    }
}

struct Bar<T> {
    quux: T,
}

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

2 participants