@@ -70,17 +70,33 @@ help: make the function or method const
70
70
LL | pub extern "C" fn foo_c() {}
71
71
| ^^^^^^^^^^^^^^^^^^^^^^^^^
72
72
73
+ error: attribute `#[rustc_const_stable]` can only be applied to functions that are declared `#[stable]`
74
+ --> $DIR/rustc-const-stability-require-const.rs:52:1
75
+ |
76
+ LL | #[rustc_const_stable(feature = "barfoo_const", since = "1.0.0")]
77
+ | ---------------------------------------------------------------- attribute specified here
78
+ LL | const fn barfoo_unmarked() {}
79
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
80
+
81
+ error: attribute `#[rustc_const_stable]` can only be applied to functions that are declared `#[stable]`
82
+ --> $DIR/rustc-const-stability-require-const.rs:57:1
83
+ |
84
+ LL | #[rustc_const_stable(feature = "barfoo_const", since = "1.0.0")]
85
+ | ---------------------------------------------------------------- attribute specified here
86
+ LL | pub const fn barfoo_unstable() {}
87
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
88
+
73
89
error: attributes `#[rustc_const_unstable]`, `#[rustc_const_stable]` and `#[rustc_const_stable_indirect]` require the function or method to be `const`
74
- --> $DIR/rustc-const-stability-require-const.rs:64 :1
90
+ --> $DIR/rustc-const-stability-require-const.rs:63 :1
75
91
|
76
92
LL | pub fn not_a_const_fn() {}
77
93
| ^^^^^^^^^^^^^^^^^^^^^^^
78
94
|
79
95
help: make the function or method const
80
- --> $DIR/rustc-const-stability-require-const.rs:64 :1
96
+ --> $DIR/rustc-const-stability-require-const.rs:63 :1
81
97
|
82
98
LL | pub fn not_a_const_fn() {}
83
99
| ^^^^^^^^^^^^^^^^^^^^^^^
84
100
85
- error: aborting due to 7 previous errors
101
+ error: aborting due to 9 previous errors
86
102
0 commit comments