Skip to content

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

Merged
merged 1 commit into from
Jan 29, 2020
Merged

Remove const-fn feature #25

merged 1 commit into from
Jan 29, 2020

Conversation

rubberduck203
Copy link
Contributor

Per #22, as of Rust v1.31 const-fn was stablized.
Removing the feature in preparation of a 1.0 release.

Related to #11

Copy link
Contributor

@jonas-schievink jonas-schievink left a 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"
Copy link
Contributor

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

Copy link
Contributor Author

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);
Copy link
Contributor Author

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

Copy link
Contributor

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?

Copy link
Contributor Author

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.

@rubberduck203
Copy link
Contributor Author

@jonas-schievink seems like it, yes. I would appreciate feedback on what I did in build.rs. I noticed it after I initially submitted the PR.

Per #22, as of Rust v1.31 const-fn was stablized.
Removing the feature in preparation of a 1.0 release.

Related to #11
@jonas-schievink
Copy link
Contributor

bors r+

bors bot added a commit that referenced this pull request Jan 29, 2020
25: Remove const-fn feature r=jonas-schievink a=rubberduck203

Per #22, as of Rust v1.31 const-fn was stablized.
Removing the feature in preparation of a 1.0 release.

Related to #11

Co-authored-by: Christopher J. McClellan <[email protected]>
@bors
Copy link
Contributor

bors bot commented Jan 29, 2020

Build succeeded

@bors bors bot merged commit f35c406 into rust-embedded:master Jan 29, 2020
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

Successfully merging this pull request may close these issues.

2 participants