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

static_assert silently passes all consts #23008

Closed
kmcallister opened this issue Mar 3, 2015 · 2 comments · Fixed by #24910
Closed

static_assert silently passes all consts #23008

kmcallister opened this issue Mar 3, 2015 · 2 comments · Fixed by #24910
Labels
A-codegen Area: Code generation

Comments

@kmcallister
Copy link
Contributor

No unused attribute warning, either.

#[static_assert]
pub const BLEH: bool = false;

fn main() { }
@kmcallister kmcallister added the A-codegen Area: Code generation label Mar 3, 2015
@kmcallister
Copy link
Contributor Author

A-codegen because this checking happens in trans.

@nagisa
Copy link
Member

nagisa commented Mar 3, 2015

cc @huonw because you implemented #22960

EDIT: ugh, sorry, I misread “No unused attribute warning, either” as “No feature gate, either”.

steveklabnik added a commit to steveklabnik/rust that referenced this issue Apr 28, 2015
This was always a weird feature, and isn't being used in the compiler.
Static assertions should be done better than this.

Fixes rust-lang#13951
Fixes rust-lang#23008
Fixes rust-lang#6676

This is behind a feature gate, but that's still a

[breaking-change]
steveklabnik added a commit to steveklabnik/rust that referenced this issue Jun 3, 2015
This was always a weird feature, and isn't being used in the compiler.
Static assertions should be done better than this.

This implements RFC rust-lang#1096.

Fixes rust-lang#13951
Fixes rust-lang#23008
Fixes rust-lang#6676

This is behind a feature gate, but that's still a

[breaking-change]
bors added a commit that referenced this issue Jun 3, 2015
This was always a weird feature, and isn't being used in the compiler.
Static assertions should be done better than this.

Fixes #13951
Fixes #23008
Fixes #6676

This is behind a feature gate, but that's still a

[breaking-change]

(It's not entirely clear to me that this should or shouldn't have an RFC, but if it does, I'm fine blocking on such a thing.)
dlrobertson pushed a commit to dlrobertson/rust that referenced this issue Nov 29, 2018
This was always a weird feature, and isn't being used in the compiler.
Static assertions should be done better than this.

This implements RFC rust-lang#1096.

Fixes rust-lang#13951
Fixes rust-lang#23008
Fixes rust-lang#6676

This is behind a feature gate, but that's still a

[breaking-change]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-codegen Area: Code generation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants