-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Infer whether nightly features are available using rustc_version. If this fails, assume stable. Closes #214
- Loading branch information
1 parent
d66c2d6
commit 250d93d
Showing
8 changed files
with
25 additions
and
33 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,9 +4,6 @@ version = "0.1.2" | |
authors = ["Chris Wong <[email protected]>"] | ||
edition = "2018" | ||
|
||
[features] | ||
unstable = ["maud/unstable"] | ||
|
||
[dependencies] | ||
maud = { path = "../maud" } | ||
handlebars = "*" | ||
|
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,8 @@ | ||
use rustc_version::{version_meta, Channel}; | ||
|
||
fn main() { | ||
match version_meta().map(|v| v.channel).unwrap_or(Channel::Stable) { | ||
Channel::Dev | Channel::Nightly => println!("cargo:rustc-cfg=unstable"), | ||
Channel::Beta | Channel::Stable => {} | ||
} | ||
} |
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 |
---|---|---|
@@ -1,3 +1,6 @@ | ||
// Diagnostics look slightly different on stable Rust | ||
#![cfg(unstable)] | ||
|
||
use trybuild::TestCases; | ||
|
||
#[test] | ||
|
This file was deleted.
Oops, something went wrong.