Skip to content

Commit

Permalink
update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
darrell-roberts committed Aug 7, 2024
1 parent 3d72d65 commit 201ed86
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions core/src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,11 @@ fn is_redacted(attrs: &[syn::Attribute]) -> bool {
}

/// Check if this attribute rejects our optional `target_os` arguments.
///
/// Examples:
/// - `#[cfg(not(target_os = "windows"))]`
/// - `#[cfg(not(any(target_os = "windows", feature = "my-feature")))]`
/// - `#[cfg(not(all(target_os = "windows", feature = "my-feature")))]`
#[inline]
pub(crate) fn target_os_reject(attr: &Attribute, target_os: &str) -> bool {
if log_enabled!(log::Level::Debug) {
Expand All @@ -660,6 +665,11 @@ pub(crate) fn target_os_reject(attr: &Attribute, target_os: &str) -> bool {
}

/// Check if this attribute can accept our optional `target_os` arguments.
///
/// Examples:
/// - `#[cfg(target_os = "windows")]`
/// - `#[cfg(any(target_os = "windows", target_os = "macos", target_os = "linux"))]`
/// - `#[cfg(all(target_os = "windows", feature = "my-feature"))]`
#[inline]
pub(crate) fn target_os_accept(attr: &Attribute, target_os: &str) -> bool {
if log_enabled!(log::Level::Debug) {
Expand Down

0 comments on commit 201ed86

Please sign in to comment.