2 #![feature(staged_api)]
3 #![stable(feature = "foo", since = "1.0.0")]
5 #[stable(feature = "foo", since = "1.0.0")]
6 #[rustc_const_unstable(feature = "const_foo", issue = "none")]
8 //~^ ERROR attributes `#[rustc_const_unstable]` and `#[rustc_const_stable]` require the function or method to be `const`
10 #[stable(feature = "bar", since = "1.0.0")]
11 #[rustc_const_stable(feature = "const_bar", since = "1.0.0")]
13 //~^ ERROR attributes `#[rustc_const_unstable]` and `#[rustc_const_stable]` require the function or method to be `const`
15 #[stable(feature = "potato", since = "1.0.0")]
19 #[stable(feature = "salad", since = "1.0.0")]
20 #[rustc_const_unstable(feature = "const_salad", issue = "none")]
21 pub fn salad(&self) -> &'static str { "mmmmmm" }
22 //~^ ERROR attributes `#[rustc_const_unstable]` and `#[rustc_const_stable]` require the function or method to be `const`
24 #[stable(feature = "roasted", since = "1.0.0")]
25 #[rustc_const_unstable(feature = "const_roasted", issue = "none")]
26 pub fn roasted(&self) -> &'static str { "mmmmmmmmmm" }
27 //~^ ERROR attributes `#[rustc_const_unstable]` and `#[rustc_const_stable]` require the function or method to be `const`
30 #[stable(feature = "bar", since = "1.0.0")]
31 #[rustc_const_stable(feature = "const_bar", since = "1.0.0")]
32 pub extern "C" fn bar_c() {}
33 //~^ ERROR attributes `#[rustc_const_unstable]` and `#[rustc_const_stable]` require the function or method to be `const`
35 #[stable(feature = "foo", since = "1.0.0")]
36 #[rustc_const_unstable(feature = "const_foo", issue = "none")]
37 pub extern "C" fn foo_c() {}
38 //~^ ERROR attributes `#[rustc_const_unstable]` and `#[rustc_const_stable]` require the function or method to be `const`
41 #[stable(feature = "foobar", since = "1.0.0")]
42 #[rustc_const_unstable(feature = "foobar_const", issue = "none")]
43 pub const fn foobar() {}
45 #[stable(feature = "barfoo", since = "1.0.0")]
46 #[rustc_const_stable(feature = "barfoo_const", since = "1.0.0")]
47 pub const fn barfoo() {}