Skip to content

unstable_features without CFG_RELEASE_CHANNEL #2249

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 10, 2017
Merged

unstable_features without CFG_RELEASE_CHANNEL #2249

merged 1 commit into from
Dec 10, 2017

Conversation

CAD97
Copy link
Contributor

@CAD97 CAD97 commented Dec 6, 2017

Per discussion in #2228

#2228 (comment)
#2228 (comment)

Inline comment should explain the reasoning.

Open to bikeshed.

Copy link
Member

@nrc nrc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

src/config.rs Outdated
() => {
option_env!("CFG_RELEASE_CHANNEL")
.map(|c| c == "nightly")
.map(|c| c != "nightly")
.unwrap_or(false)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be clearer, I think, to change this to unwrap_or(false) and leave the macro name and usage the same - we are still checking for nightly afterall.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume you meant unwrap_or(true). Swapped back to this bool direction and tweaked the comment to still apply.

@CraZySacX
Copy link

CraZySacX commented Dec 9, 2017

I going to toss my 2 cents in here and recommend that unstable features be hidden behind a cargo feature flag, rather than a compile time/runtime check for an environment variable.

If this is something we can get a consensus on, I can work on getting that done.

I just submitted a PR changing the behavior to a runtime check, without knowing this PR was open. If this PR gets merged, you can close #2259.

Per discussion in #2228

#2228 (comment)
#2228 (comment)

Inline comment should explain the reasoning.
@CAD97
Copy link
Contributor Author

CAD97 commented Dec 10, 2017

Rebased onto master to include the travis fix.

@nrc, given activity on #2227, it'd be good to get this merged and a new build pushed to crates.io. Is there anything blocking this from landing?

@nrc nrc merged commit db5d6dd into rust-lang:master Dec 10, 2017
@nrc
Copy link
Member

nrc commented Dec 10, 2017

Thanks @CAD97 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants