1 #![feature(allow_internal_unstable)]
3 #![feature(const_trait_impl)]
4 #![feature(staged_api)]
8 #[stable(feature = "rust1", since = "1.0.0")]
9 #[rustc_const_stable(feature = "rust1", since = "1.0.0")]
10 impl const std::ops::Sub for Int {
13 fn sub(self, rhs: Self) -> Self {
14 //~^ ERROR trait methods cannot be stable const fn
19 #[rustc_const_unstable(feature = "const_add", issue = "none")]
20 impl const std::ops::Add for Int {
23 fn add(self, rhs: Self) -> Self {
28 #[stable(feature = "rust1", since = "1.0.0")]
29 #[rustc_const_stable(feature = "rust1", since = "1.0.0")]
30 pub const fn foo() -> Int {
32 //~^ ERROR not yet stable as a const fn
36 #[stable(feature = "rust1", since = "1.0.0")]
37 #[rustc_const_unstable(feature = "bar", issue = "none")]
38 pub const fn bar() -> Int {