Skip to content

Commit

Permalink
Detect whether ptr::addr_of is supported by current compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Mar 25, 2021
1 parent ac64560 commit be89adf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ fn main() {
if rustc < 38 {
println!("cargo:rustc-cfg=anyhow_no_macro_reexport");
}

if rustc < 51 {
println!("cargo:rustc-cfg=anyhow_no_ptr_addr_of");
}
}

fn compile_probe() -> Option<ExitStatus> {
Expand Down

0 comments on commit be89adf

Please sign in to comment.