Skip to content

Commit 75897cf

Browse files
committed
Make CI verify that proc_macro_span works in latest nightly
1 parent 643cb89 commit 75897cf

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ jobs:
5757
components: rust-src
5858
- name: Enable type layout randomization
5959
run: echo RUSTFLAGS=${RUSTFLAGS}\ -Zrandomize-layout >> $GITHUB_ENV
60+
- run: cargo check
61+
env:
62+
RUSTFLAGS: --cfg procmacro2_nightly_testing ${{env.RUSTFLAGS}}
6063
- run: cargo test
6164
- run: cargo test --no-default-features
6265
- run: cargo test --no-default-features --test features -- --ignored make_sure_no_proc_macro # run the ignored test to make sure the `proc-macro` feature is disabled

src/lib.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,15 @@ compile_error! {"\
122122
build script as well.
123123
"}
124124

125+
#[cfg(all(
126+
procmacro2_nightly_testing,
127+
feature = "proc-macro",
128+
not(proc_macro_span)
129+
))]
130+
compile_error! {"\
131+
Build script probe failed to compile.
132+
"}
133+
125134
extern crate alloc;
126135

127136
#[cfg(feature = "proc-macro")]

0 commit comments

Comments
 (0)