diff --git a/esp-config/src/generate.rs b/esp-config/src/generate.rs index 3088f08616a..81055c468f0 100644 --- a/esp-config/src/generate.rs +++ b/esp-config/src/generate.rs @@ -317,9 +317,6 @@ pub fn generate_config_internal( // other file changed. writeln!(stdout, "cargo:rerun-if-changed=build.rs").ok(); - #[cfg(not(test))] - env_change_work_around(stdout); - let mut doc_table = String::from(DOC_TABLE_HEADER); let mut selected_config = String::from(SELECTED_TABLE_HEADER); @@ -371,43 +368,6 @@ pub fn generate_config_internal( configs } -// A work-around for https://github.com/rust-lang/cargo/issues/10358 -// This can be removed when https://github.com/rust-lang/cargo/pull/14058 is merged. -// Unlikely to work on projects in workspaces -#[cfg(not(test))] -fn env_change_work_around(stdout: &mut W) { - let mut out_dir = PathBuf::from(env::var_os("OUT_DIR").unwrap()); - - // We clean out_dir by removing all trailing directories, until it ends with - // target - while !out_dir.ends_with("target") { - if !out_dir.pop() { - return; // We ran out of directories... - } - } - out_dir.pop(); - - let dotcargo = out_dir.join(".cargo/"); - if dotcargo.exists() { - if dotcargo.join("config.toml").exists() { - writeln!( - stdout, - "cargo:rerun-if-changed={}", - dotcargo.join("config.toml").display() - ) - .ok(); - } - if dotcargo.join("config").exists() { - writeln!( - stdout, - "cargo:rerun-if-changed={}", - dotcargo.join("config").display() - ) - .ok(); - } - } -} - fn create_config( stdout: &mut W, prefix: &str, diff --git a/esp-hal/src/lib.rs b/esp-hal/src/lib.rs index 82b75b8552d..40bbfa8d5cb 100644 --- a/esp-hal/src/lib.rs +++ b/esp-hal/src/lib.rs @@ -100,10 +100,6 @@ #![doc = ""] #![doc = include_str!(concat!(env!("OUT_DIR"), "/esp_hal_config_table.md"))] #![doc = ""] -//! It's important to note that due to a [bug in cargo](https://github.com/rust-lang/cargo/issues/10358), -//! any modifications to the environment, local or otherwise will only get -//! picked up on a full clean build of the project. -//! //! ## `Peripheral` Pattern //! //! Drivers take pins and peripherals as [peripheral::Peripheral] in most diff --git a/esp-wifi/src/lib.rs b/esp-wifi/src/lib.rs index 81a7a66fbfa..e3183d05f79 100644 --- a/esp-wifi/src/lib.rs +++ b/esp-wifi/src/lib.rs @@ -79,11 +79,6 @@ //! for this crate: #![doc = ""] #![doc = include_str!(concat!(env!("OUT_DIR"), "/esp_wifi_config_table.md"))] -#![doc = ""] -//! It's important to note that due to a [bug in cargo](https://github.com/rust-lang/cargo/issues/10358), -//! any modifications to the environment, local or otherwise will only get -//! picked up on a full clean build of the project. - #![doc(html_logo_url = "https://avatars.githubusercontent.com/u/46717278")] #![no_std] #![cfg_attr(xtensa, feature(asm_experimental_arch))]