about summary refs log tree commit diff
path: root/tests/ui/consts/rustc-const-stability-require-const.stderr
blob: 8d10bddaa45faa32902f25aed53dda43516bc0cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
error: attributes `#[rustc_const_unstable]`, `#[rustc_const_stable]` and `#[rustc_const_stable_indirect]` require the function or method to be `const`
  --> $DIR/rustc-const-stability-require-const.rs:7:1
   |
LL | pub fn foo() {}
   | ^^^^^^^^^^^^
   |
help: make the function or method const
  --> $DIR/rustc-const-stability-require-const.rs:7:1
   |
LL | pub fn foo() {}
   | ^^^^^^^^^^^^

error: attributes `#[rustc_const_unstable]`, `#[rustc_const_stable]` and `#[rustc_const_stable_indirect]` require the function or method to be `const`
  --> $DIR/rustc-const-stability-require-const.rs:12:1
   |
LL | pub fn bar() {}
   | ^^^^^^^^^^^^
   |
help: make the function or method const
  --> $DIR/rustc-const-stability-require-const.rs:12:1
   |
LL | pub fn bar() {}
   | ^^^^^^^^^^^^

error: attributes `#[rustc_const_unstable]`, `#[rustc_const_stable]` and `#[rustc_const_stable_indirect]` require the function or method to be `const`
  --> $DIR/rustc-const-stability-require-const.rs:32:1
   |
LL | pub extern "C" fn bar_c() {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^
   |
help: make the function or method const
  --> $DIR/rustc-const-stability-require-const.rs:32:1
   |
LL | pub extern "C" fn bar_c() {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^

error: attributes `#[rustc_const_unstable]`, `#[rustc_const_stable]` and `#[rustc_const_stable_indirect]` require the function or method to be `const`
  --> $DIR/rustc-const-stability-require-const.rs:37:1
   |
LL | pub extern "C" fn foo_c() {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^
   |
help: make the function or method const
  --> $DIR/rustc-const-stability-require-const.rs:37:1
   |
LL | pub extern "C" fn foo_c() {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^

error: attribute `#[rustc_const_stable]` can only be applied to functions that are declared `#[stable]`
  --> $DIR/rustc-const-stability-require-const.rs:52:1
   |
LL | #[rustc_const_stable(feature = "barfoo_const", since = "1.0.0")]
   | ---------------------------------------------------------------- attribute specified here
LL | const fn barfoo_unmarked() {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^

error: attribute `#[rustc_const_stable]` can only be applied to functions that are declared `#[stable]`
  --> $DIR/rustc-const-stability-require-const.rs:57:1
   |
LL | #[rustc_const_stable(feature = "barfoo_const", since = "1.0.0")]
   | ---------------------------------------------------------------- attribute specified here
LL | pub const fn barfoo_unstable() {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: attributes `#[rustc_const_unstable]`, `#[rustc_const_stable]` and `#[rustc_const_stable_indirect]` require the function or method to be `const`
  --> $DIR/rustc-const-stability-require-const.rs:21:5
   |
LL |     pub fn salad(&self) -> &'static str { "mmmmmm" }
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
help: make the function or method const
  --> $DIR/rustc-const-stability-require-const.rs:21:5
   |
LL |     pub fn salad(&self) -> &'static str { "mmmmmm" }
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: attributes `#[rustc_const_unstable]`, `#[rustc_const_stable]` and `#[rustc_const_stable_indirect]` require the function or method to be `const`
  --> $DIR/rustc-const-stability-require-const.rs:26:5
   |
LL |     pub fn roasted(&self) -> &'static str { "mmmmmmmmmm" }
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
help: make the function or method const
  --> $DIR/rustc-const-stability-require-const.rs:26:5
   |
LL |     pub fn roasted(&self) -> &'static str { "mmmmmmmmmm" }
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 8 previous errors