Skip to content

Commit

Permalink
Merge pull request #445 from tea/fixes
Browse files Browse the repository at this point in the history
Remove warnings due to new lint on unknown cfgs
  • Loading branch information
Amanieu authored Jul 2, 2024
2 parents a29dd3d + be5489c commit ca920b3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions core/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// scripts gets `cfg` info, even if the cfg is unstable.
fn main() {
println!("cargo:rerun-if-changed=build.rs");
println!("cargo:rustc-check-cfg=cfg(tsan_enabled)");
let santizer_list = std::env::var("CARGO_CFG_SANITIZE").unwrap_or_default();
if santizer_list.contains("thread") {
println!("cargo:rustc-cfg=tsan_enabled");
Expand Down
2 changes: 1 addition & 1 deletion core/src/thread_parker/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,4 @@ cfg_if! {
}
}

pub use self::imp::{thread_yield, ThreadParker, UnparkHandle};
pub use self::imp::{thread_yield, ThreadParker};
2 changes: 2 additions & 0 deletions lock_api/build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
fn main() {
let cfg = autocfg::new();

println!("cargo:rerun-if-changed=build.rs");
println!("cargo:rustc-check-cfg=cfg(has_const_fn_trait_bound)");
if cfg.probe_rustc_version(1, 61) {
println!("cargo:rustc-cfg=has_const_fn_trait_bound");
}
Expand Down
1 change: 1 addition & 0 deletions lock_api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ extern crate alloc;
pub struct GuardSend(());

/// Marker type which indicates that the Guard type for a lock is not `Send`.
#[allow(dead_code)]
pub struct GuardNoSend(*mut ());

unsafe impl Sync for GuardNoSend {}
Expand Down

0 comments on commit ca920b3

Please sign in to comment.