-
Notifications
You must be signed in to change notification settings - Fork 16
Remove const-fn feature #25
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
Remove const-fn feature #25
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks good minus the version bump. Is this really the only part of const-fn
left over?
Cargo.toml
Outdated
@@ -7,10 +7,7 @@ keywords = ["bare-metal", "register", "peripheral", "interrupt"] | |||
license = "MIT OR Apache-2.0" | |||
name = "bare-metal" | |||
repository = "https://github.com/rust-embedded/bare-metal" | |||
version = "0.2.5" | |||
version = "0.3.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't bump the version in otherwise unrelated PRs, or we might bump it again when doing the next release
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. I can undo that. Just a habit when making breaking changes.
build.rs
Outdated
|
||
fn main() { | ||
let vers = rustc_version::version().unwrap(); | ||
|
||
if vers.major == 1 && vers.minor < 31 { | ||
println!("cargo:rustc-cfg=unstable_const_fn") | ||
eprintln!("cargo:crate requires rust >= 1.31"); | ||
exit(1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this is the right way to go about this.
As best as I can tell, Cargo has not implemented a way to specify minimum rust version yet.
rust-lang/rust#65262
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't we just remove this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can do. Just seemed nicer than potentially cryptic compiler errors.
I’ll just remove build.rs
entirely then.
@jonas-schievink seems like it, yes. I would appreciate feedback on what I did in |
bors r+ |
Build succeeded |
Per #22, as of Rust v1.31 const-fn was stablized.
Removing the feature in preparation of a 1.0 release.
Related to #11