Skip to content

Commit

Permalink
Release 0.4.7
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Apr 17, 2021
1 parent 538bc48 commit 9a7f075
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "const_fn"
version = "0.4.6"
version = "0.4.7"
authors = ["Taiki Endo <[email protected]>"]
edition = "2018"
license = "Apache-2.0 OR MIT"
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ pub fn optional() {
}
```

<!--
TODO: document the behavior on the version on the nightly channel.
https://github.com/taiki-e/const_fn/issues/27
https://github.com/rust-lang/rust/pull/81468
-->

## Alternatives

This crate is proc-macro, but is very lightweight, and has no dependencies.
Expand Down
8 changes: 3 additions & 5 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Self, String> {
let output =
Command::new(rustc).args(&["--version", "--verbose"]).output().map_err(|e| {
Expand Down Expand Up @@ -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:
//
Expand Down

0 comments on commit 9a7f075

Please sign in to comment.