Skip to content

Commit

Permalink
Label the compiler versions in build.rs with a comment and link
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Dec 21, 2023
1 parent a205cc9 commit afb298e
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 @@ -59,10 +59,14 @@ fn main() {
};

if rustc < 51 {
// core::ptr::addr_of
// https://blog.rust-lang.org/2021/03/25/Rust-1.51.0.html#stabilized-apis
println!("cargo:rustc-cfg=anyhow_no_ptr_addr_of");
}

if rustc < 52 {
// core::fmt::Arguments::as_str
// https://blog.rust-lang.org/2021/05/06/Rust-1.52.0.html#stabilized-apis
println!("cargo:rustc-cfg=anyhow_no_fmt_arguments_as_str");
}
}
Expand Down

0 comments on commit afb298e

Please sign in to comment.