From 6da05282347c8b3f1da31dbc91dfa4359d5f9bcd Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Mon, 3 Jan 2022 18:02:44 +0900 Subject: [PATCH] Fix detection of `-Z assume-incomplete-release` --- CHANGELOG.md | 4 +++- build.rs | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c03b59..e822c93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com ## [Unreleased] +- Fix detection of `-Z assume-incomplete-release` in recent nightly compilers. + ## [0.4.8] - 2021-05-19 - [Fix parsing of macro metavariable in attribute arguments.](https://github.com/taiki-e/const_fn/pull/37) @@ -120,7 +122,7 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com ## [0.1.4] - 2019-02-15 -**Note: This release has been yanked.** +**NOTE:** This release has been yanked. - Reduce compilation time diff --git a/build.rs b/build.rs index 2e99623..ae890ae 100644 --- a/build.rs +++ b/build.rs @@ -111,8 +111,9 @@ fn assume_incomplete_release() -> bool { // // -Zassume-incomplete-release - if let Some(rustflags) = env::var_os("RUSTFLAGS") { - for mut flag in rustflags.to_string_lossy().split(' ') { + // https://github.com/rust-lang/cargo/issues/10111 + if let Some(rustflags) = env::var_os("CARGO_ENCODED_RUSTFLAGS") { + for mut flag in rustflags.to_string_lossy().split('\x1f') { if flag.starts_with("-Z") { flag = &flag["-Z".len()..]; }