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

Non-additive feature behavior #13

Closed
dtolnay opened this issue May 23, 2019 · 2 comments
Closed

Non-additive feature behavior #13

dtolnay opened this issue May 23, 2019 · 2 comments
Labels

Comments

@dtolnay
Copy link

dtolnay commented May 23, 2019

This code works:

use static_assertions::const_assert;

fn main() {
    const_assert!(false != true);
}

until any other crate in my dependency graph enables static_assertions' "nightly" feature. Then it breaks my crate's formerly working code. This is not good behavior for a cargo feature. Code that works without a feature must also work with the feature, otherwise you end up with libraries that work in isolation but can't be combined together in one dependency graph.

@nvzqz
Copy link
Owner

nvzqz commented Jun 12, 2019

🤦‍♂️ wow I had never considered this, thank you for letting me know. I suppose the only real solution is to remove the const _ bit until it becomes stabilized in 1.37 (rust-lang/rust#61347).

@nvzqz nvzqz added the bug label Aug 11, 2019
@nvzqz
Copy link
Owner

nvzqz commented Oct 3, 2019

Closed with the release of 1.0. 😄

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

No branches or pull requests

2 participants