Merge pull request #310 from dtolnay/docsrs

Work around doc build failure due to docs.rs flags change
This commit is contained in:
David Tolnay 2021-12-14 10:07:37 -08:00 committed by GitHub
commit d8c0371a8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,7 +58,8 @@ fn main() {
process::exit(1);
}
let semver_exempt = cfg!(procmacro2_semver_exempt);
let docs_rs = env::var_os("DOCS_RS").is_some();
let semver_exempt = cfg!(procmacro2_semver_exempt) || docs_rs;
if semver_exempt {
// https://github.com/dtolnay/proc-macro2/issues/147
println!("cargo:rustc-cfg=procmacro2_semver_exempt");