fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
3.5 KiB86 linesraw
1error: 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   |
4LL | #[rustc_const_unstable(feature = "const_foo", issue = "none")]
5   | -------------------------------------------------------------- attribute specified here
6LL | pub fn foo() {}
7   | ^^^^^^^^^^^^
8   |
9help: make the function or method const
10  --> $DIR/rustc-const-stability-require-const.rs:7:1
11   |
12LL | pub fn foo() {}
13   | ^^^^^^^^^^^^
14
15error: 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   |
18LL | #[rustc_const_stable(feature = "const_bar", since = "1.0.0")]
19   | ------------------------------------------------------------- attribute specified here
20LL | pub fn bar() {}
21   | ^^^^^^^^^^^^
22   |
23help: make the function or method const
24  --> $DIR/rustc-const-stability-require-const.rs:12:1
25   |
26LL | pub fn bar() {}
27   | ^^^^^^^^^^^^
28
29error: 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   |
32LL |     #[rustc_const_unstable(feature = "const_salad", issue = "none")]
33   |     ---------------------------------------------------------------- attribute specified here
34LL |     pub fn salad(&self) -> &'static str { "mmmmmm" }
35   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
36   |
37help: make the function or method const
38  --> $DIR/rustc-const-stability-require-const.rs:21:5
39   |
40LL |     pub fn salad(&self) -> &'static str { "mmmmmm" }
41   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
42
43error: 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   |
46LL |     #[rustc_const_unstable(feature = "const_roasted", issue = "none")]
47   |     ------------------------------------------------------------------ attribute specified here
48LL |     pub fn roasted(&self) -> &'static str { "mmmmmmmmmm" }
49   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
50   |
51help: make the function or method const
52  --> $DIR/rustc-const-stability-require-const.rs:26:5
53   |
54LL |     pub fn roasted(&self) -> &'static str { "mmmmmmmmmm" }
55   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
56
57error: 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   |
60LL | #[rustc_const_stable(feature = "const_bar", since = "1.0.0")]
61   | ------------------------------------------------------------- attribute specified here
62LL | pub extern "C" fn bar_c() {}
63   | ^^^^^^^^^^^^^^^^^^^^^^^^^
64   |
65help: make the function or method const
66  --> $DIR/rustc-const-stability-require-const.rs:32:1
67   |
68LL | pub extern "C" fn bar_c() {}
69   | ^^^^^^^^^^^^^^^^^^^^^^^^^
70
71error: 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   |
74LL | #[rustc_const_unstable(feature = "const_foo", issue = "none")]
75   | -------------------------------------------------------------- attribute specified here
76LL | pub extern "C" fn foo_c() {}
77   | ^^^^^^^^^^^^^^^^^^^^^^^^^
78   |
79help: make the function or method const
80  --> $DIR/rustc-const-stability-require-const.rs:37:1
81   |
82LL | pub extern "C" fn foo_c() {}
83   | ^^^^^^^^^^^^^^^^^^^^^^^^^
84
85error: aborting due to 6 previous errors
86