Skip to content

Commit

Permalink
Merge pull request #256 from Shnatsel/is-proc-macro
Browse files Browse the repository at this point in the history
Add `Target.is_proc_macro()` function
  • Loading branch information
oli-obk committed Nov 19, 2023
2 parents 5b794f8 + 64128dd commit e190f4f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib.rs
Expand Up @@ -577,6 +577,11 @@ impl Target {
pub fn is_custom_build(&self) -> bool {
self.is_kind("custom-build")
}

/// Return true if this target is of kind "proc-macro".
pub fn is_proc_macro(&self) -> bool {
self.is_kind("proc-macro")
}
}

/// The Rust edition
Expand Down

0 comments on commit e190f4f

Please sign in to comment.