-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use autocfg instead of a feature for try_exists
Per comments on #48 this moves from gating `try_exists` behind a feature to using `autocfg`. This is a build time library that inspects the current runtime and adds flags to the build so if a user is building with Rust 1.63 or higher then this feature will be enabled.
- Loading branch information
Richard Schneeman
committed
Nov 12, 2023
1 parent
93a270e
commit 4afa6f8
Showing
5 changed files
with
15 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
extern crate autocfg; | ||
|
||
fn main() { | ||
let ac = autocfg::new(); | ||
// Allows `#[cfg(rustc_1_63)]` to be used in code | ||
ac.emit_rustc_version(1, 63); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters