Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/detection.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#[cfg(not(is_available))]
use std::panic::{self, PanicInfo};
use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::Once;
Expand All @@ -24,7 +25,7 @@ pub(crate) fn unforce_fallback() {
initialize();
}

#[cfg(feature = "is_available")]
#[cfg(is_available)]
fn initialize() {
let available = proc_macro::is_available();
WORKS.store(available as usize + 1, Ordering::SeqCst);
Expand Down Expand Up @@ -54,7 +55,7 @@ fn initialize() {
// here. For now, if a user needs to guarantee that this failure mode does
// not occur, they need to call e.g. `proc_macro2::Span::call_site()` from
// the main thread before launching any other threads.
#[cfg(not(feature = "is_available"))]
#[cfg(not(is_available))]
fn initialize() {
type PanicHook = dyn Fn(&PanicInfo) + Sync + Send + 'static;

Expand Down