Skip to content

Commit 42d3019

Browse files
committed
Allow to use procmacro2_semver_exempt on stable rust
procmacro2_semver_exempt is working on rust < 1.29, but since 1.29, proc_macro2 forward to proc_macro even when procmacro2_semver_exempt is set, which require a nightly compiler
1 parent 857acc5 commit 42d3019

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ before_script:
2727

2828
script:
2929
- cargo test
30+
- RUSTFLAGS='--cfg procmacro2_semver_exempt' cargo test
3031

3132
notifications:
3233
email:

build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ fn main() {
2222
println!("cargo:rustc-cfg=use_proc_macro");
2323

2424
// Rust 1.29 stabilized the necessary APIs in the `proc_macro` crate
25-
if minor >= 29 || cfg!(feature = "nightly") {
25+
if (minor >= 29 && !cfg!(procmacro2_semver_exempt)) || cfg!(feature = "nightly") {
2626
println!("cargo:rustc-cfg=wrap_proc_macro");
2727

2828
if cfg!(procmacro2_semver_exempt) {

0 commit comments

Comments
 (0)