From 9a7f075750786201ae23c734ddcb7c52bef326aa Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Sun, 18 Apr 2021 01:58:28 +0900 Subject: [PATCH] Release 0.4.7 --- CHANGELOG.md | 4 ++++ Cargo.toml | 2 +- README.md | 6 ++++++ build.rs | 8 +++----- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 74ff310..363c99a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,10 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com ## [Unreleased] +## [0.4.7] - 2021-04-17 + +- [Support compiling with `RUSTFLAGS='-Z assume-incomplete-release'` on nightly compiler.](https://github.com/taiki-e/const_fn/pull/35) + ## [0.4.6] - 2021-03-27 - Fix compatibility issues with const generics. diff --git a/Cargo.toml b/Cargo.toml index 02f2e8f..f98104c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "const_fn" -version = "0.4.6" +version = "0.4.7" authors = ["Taiki Endo "] edition = "2018" license = "Apache-2.0 OR MIT" diff --git a/README.md b/README.md index 8c4c3aa..8c54342 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,12 @@ pub fn optional() { } ``` + + ## Alternatives This crate is proc-macro, but is very lightweight, and has no dependencies. diff --git a/build.rs b/build.rs index 8bbd19c..dd3a70c 100644 --- a/build.rs +++ b/build.rs @@ -44,10 +44,8 @@ struct Version { } impl Version { - // Based on https://github.com/cuviper/autocfg/blob/1.0.1/src/version.rs#L25-L59 - // - // TODO: use autocfg if https://github.com/cuviper/autocfg/issues/28 merged - // or https://github.com/taiki-e/const_fn/issues/27 rejected. + // The version detection logic is based on https://github.com/cuviper/autocfg/blob/1.0.1/src/version.rs#L25-L59, + // but provides a better error message. fn from_rustc(rustc: &Path) -> Result { let output = Command::new(rustc).args(&["--version", "--verbose"]).output().map_err(|e| { @@ -105,8 +103,8 @@ impl Version { } } -// https://github.com/rust-lang/rust/pull/81468 // https://github.com/taiki-e/const_fn/issues/27 +// https://github.com/rust-lang/rust/pull/81468 fn assume_incomplete_release() -> bool { // Recognized formats: //