rust/tests/ui/feature-gates/unstable-attribute-allow-issue-0.rs

14 lines
592 B
Rust
Raw Normal View History

// Check that an issue value can be explicitly set to "0" instead of "none"
#![crate_type = "lib"]
#![feature(staged_api)]
#![stable(feature = "stable_test_feature", since = "1.0.0")]
#[unstable(feature = "unstable_test_feature", issue = "0")]
2020-02-06 01:19:39 -06:00
fn unstable_issue_0() {} //~^ ERROR `issue` must be a non-zero numeric string or "none"
#[unstable(feature = "unstable_test_feature", issue = "none")]
fn unstable_issue_none() {}
2020-01-22 09:33:46 -06:00
#[unstable(feature = "unstable_test_feature", issue = "something")]
2020-02-06 01:19:39 -06:00
fn unstable_issue_not_allowed() {} //~^ ERROR `issue` must be a non-zero numeric string or "none"