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

include! does not expand derive behind #[cfg_attr] #32957

Closed
alexcrichton opened this issue Apr 14, 2016 · 2 comments
Closed

include! does not expand derive behind #[cfg_attr] #32957

alexcrichton opened this issue Apr 14, 2016 · 2 comments

Comments

@alexcrichton
Copy link
Member

For example.this does not compile:

// bar.rs
#[cfg_attr(foo, derive(Clone))]
struct A(u32);

// foo.rs
include!("bar.rs");
fn main() {
    A(1).clone();
}

Compiled with rustc --cfg foo foo.rs this will fail with A not implementing Clone.

@durka
Copy link
Contributor

durka commented Apr 14, 2016

dupe #22250?

@alexcrichton
Copy link
Member Author

Probably, yeah.

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