File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 11fn main ( ) {
22 println ! ( "cargo:rerun-if-changed=build.rs" ) ;
3- println ! ( "cargo:rerun-if-env-changed=CFG_VERSION" ) ;
3+ println ! ( "cargo:rerun-if-env-changed=CFG_RELEASE" ) ;
4+ println ! ( "cargo:rerun-if-env-changed=CFG_RELEASE_CHANNEL" ) ;
45}
Original file line number Diff line number Diff line change @@ -652,9 +652,12 @@ pub fn eval_condition(
652652 return false ;
653653 }
654654 } ;
655- let version = Version :: parse ( env ! ( "CFG_VERSION" ) ) . unwrap ( ) ;
655+ let channel = env ! ( "CFG_RELEASE_CHANNEL" ) ;
656+ let nightly = channel == "nightly" || channel == "dev" ;
657+ let rustc_version = Version :: parse ( env ! ( "CFG_RELEASE" ) ) . unwrap ( ) ;
656658
657- version >= min_version
659+ // See https://github.com/rust-lang/rust/issues/64796#issuecomment-625474439 for details
660+ if nightly { rustc_version > min_version } else { rustc_version >= min_version }
658661 }
659662 ast:: MetaItemKind :: List ( ref mis) => {
660663 for mi in mis. iter ( ) {
You can’t perform that action at this time.
0 commit comments