]> git.proxmox.com Git - rustc.git/blob - src/test/ui/consts/rustc-const-stability-require-const.stderr
New upstream version 1.55.0+dfsg1
[rustc.git] / src / test / ui / consts / rustc-const-stability-require-const.stderr
1 error: attributes `#[rustc_const_unstable]` and `#[rustc_const_stable]` require the function or method to be `const`
2 --> $DIR/rustc-const-stability-require-const.rs:7:1
3 |
4 LL | #[rustc_const_unstable(feature = "const_foo", issue = "none")]
5 | -------------------------------------------------------------- attribute specified here
6 LL | pub fn foo() {}
7 | ^^^^^^^^^^^^
8 |
9 help: make the function or method const
10 --> $DIR/rustc-const-stability-require-const.rs:7:1
11 |
12 LL | pub fn foo() {}
13 | ^^^^^^^^^^^^
14
15 error: attributes `#[rustc_const_unstable]` and `#[rustc_const_stable]` require the function or method to be `const`
16 --> $DIR/rustc-const-stability-require-const.rs:12:1
17 |
18 LL | #[rustc_const_stable(feature = "const_bar", since = "1.0.0")]
19 | ------------------------------------------------------------- attribute specified here
20 LL | pub fn bar() {}
21 | ^^^^^^^^^^^^
22 |
23 help: make the function or method const
24 --> $DIR/rustc-const-stability-require-const.rs:12:1
25 |
26 LL | pub fn bar() {}
27 | ^^^^^^^^^^^^
28
29 error: attributes `#[rustc_const_unstable]` and `#[rustc_const_stable]` require the function or method to be `const`
30 --> $DIR/rustc-const-stability-require-const.rs:21:5
31 |
32 LL | #[rustc_const_unstable(feature = "const_salad", issue = "none")]
33 | ---------------------------------------------------------------- attribute specified here
34 LL | pub fn salad(&self) -> &'static str { "mmmmmm" }
35 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
36 |
37 help: make the function or method const
38 --> $DIR/rustc-const-stability-require-const.rs:21:5
39 |
40 LL | pub fn salad(&self) -> &'static str { "mmmmmm" }
41 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
42
43 error: attributes `#[rustc_const_unstable]` and `#[rustc_const_stable]` require the function or method to be `const`
44 --> $DIR/rustc-const-stability-require-const.rs:26:5
45 |
46 LL | #[rustc_const_unstable(feature = "const_roasted", issue = "none")]
47 | ------------------------------------------------------------------ attribute specified here
48 LL | pub fn roasted(&self) -> &'static str { "mmmmmmmmmm" }
49 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
50 |
51 help: make the function or method const
52 --> $DIR/rustc-const-stability-require-const.rs:26:5
53 |
54 LL | pub fn roasted(&self) -> &'static str { "mmmmmmmmmm" }
55 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
56
57 error: attributes `#[rustc_const_unstable]` and `#[rustc_const_stable]` require the function or method to be `const`
58 --> $DIR/rustc-const-stability-require-const.rs:32:1
59 |
60 LL | #[rustc_const_stable(feature = "const_bar", since = "1.0.0")]
61 | ------------------------------------------------------------- attribute specified here
62 LL | pub extern "C" fn bar_c() {}
63 | ^^^^^^^^^^^^^^^^^^^^^^^^^
64 |
65 help: make the function or method const
66 --> $DIR/rustc-const-stability-require-const.rs:32:1
67 |
68 LL | pub extern "C" fn bar_c() {}
69 | ^^^^^^^^^^^^^^^^^^^^^^^^^
70
71 error: attributes `#[rustc_const_unstable]` and `#[rustc_const_stable]` require the function or method to be `const`
72 --> $DIR/rustc-const-stability-require-const.rs:37:1
73 |
74 LL | #[rustc_const_unstable(feature = "const_foo", issue = "none")]
75 | -------------------------------------------------------------- attribute specified here
76 LL | pub extern "C" fn foo_c() {}
77 | ^^^^^^^^^^^^^^^^^^^^^^^^^
78 |
79 help: make the function or method const
80 --> $DIR/rustc-const-stability-require-const.rs:37:1
81 |
82 LL | pub extern "C" fn foo_c() {}
83 | ^^^^^^^^^^^^^^^^^^^^^^^^^
84
85 error: aborting due to 6 previous errors
86