File tree Expand file tree Collapse file tree 3 files changed +20
-1
lines changed Expand file tree Collapse file tree 3 files changed +20
-1
lines changed Original file line number Diff line number Diff line change 5656 with :
5757 components : rust-src
5858 - name : Enable type layout randomization
59- run : echo RUSTFLAGS=${RUSTFLAGS}\ -Zrandomize-layout >> $GITHUB_ENV
59+ run : echo RUSTFLAGS=${RUSTFLAGS}\ -Zrandomize-layout\ --cfg=randomize_layout >> $GITHUB_ENV
6060 - run : cargo check
6161 env :
6262 RUSTFLAGS : --cfg procmacro2_nightly_testing ${{env.RUSTFLAGS}}
7878 env :
7979 RUSTFLAGS : -Z allow-features= --cfg procmacro2_backtrace ${{env.RUSTFLAGS}}
8080
81+ layout :
82+ name : Layout
83+ needs : pre_ci
84+ if : needs.pre_ci.outputs.continue
85+ runs-on : ubuntu-latest
86+ timeout-minutes : 45
87+ steps :
88+ - uses : actions/checkout@v4
89+ - uses : dtolnay/rust-toolchain@nightly
90+ with :
91+ components : rust-src
92+ - run : cargo test --test test_size
93+ - run : cargo test --test test_size --features span-locations
94+ - run : cargo test --test test_size --no-default-features
95+ - run : cargo test --test test_size --no-default-features --features span-locations
96+
8197 msrv :
8298 name : Rust 1.56.0
8399 needs : pre_ci
Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ fn main() {
5757 println ! ( "cargo:rustc-check-cfg=cfg(procmacro2_backtrace)" ) ;
5858 println ! ( "cargo:rustc-check-cfg=cfg(procmacro2_nightly_testing)" ) ;
5959 println ! ( "cargo:rustc-check-cfg=cfg(procmacro2_semver_exempt)" ) ;
60+ println ! ( "cargo:rustc-check-cfg=cfg(randomize_layout)" ) ;
6061 println ! ( "cargo:rustc-check-cfg=cfg(span_locations)" ) ;
6162 println ! ( "cargo:rustc-check-cfg=cfg(super_unstable)" ) ;
6263 println ! ( "cargo:rustc-check-cfg=cfg(wrap_proc_macro)" ) ;
Original file line number Diff line number Diff line change 1+ #![ cfg( not( randomize_layout) ) ]
2+
13extern crate proc_macro;
24
35use std:: mem;
You can’t perform that action at this time.
0 commit comments