Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ matrix:
name: WebAssembly
install: rustup target add wasm32-unknown-unknown
script: cargo test --target wasm32-unknown-unknown --no-run
- rust: nightly-2019-12-19
name: docs.rs
script: RUSTDOCFLAGS='--cfg procmacro2_semver_exempt' RUSTFLAGS='--cfg procmacro2_semver_exempt' cargo doc --target x86_64-unknown-linux-gnu

before_script:
- set -o errexit
Expand Down
6 changes: 3 additions & 3 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ fn main() {
process::exit(1);
}

let semver_exempt = cfg!(procmacro2_semver_exempt);
let semver_exempt = env::var("CARGO_CFG_PROCMACRO2_SEMVER_EXEMPT").is_ok();
if semver_exempt {
// https://github.com/alexcrichton/proc-macro2/issues/147
println!("cargo:rustc-cfg=procmacro2_semver_exempt");
}

if semver_exempt || cfg!(feature = "span-locations") {
if semver_exempt || env::var("CARGO_FEATURE_SPAN_LOCATIONS").is_ok() {
println!("cargo:rustc-cfg=span_locations");
}

Expand Down Expand Up @@ -84,7 +84,7 @@ fn enable_use_proc_macro(target: &str) -> bool {
}

// Otherwise, only enable it if our feature is actually enabled.
cfg!(feature = "proc-macro")
env::var("CARGO_FEATURE_PROC_MACRO").is_ok()
}

struct RustcVersion {
Expand Down