]> git.lizzy.rs Git - rust.git/blob - src/test/ui/feature-gates/feature-gate-const_fn.stderr
Auto merge of #54720 - davidtwco:issue-51191, r=nikomatsakis
[rust.git] / src / test / ui / feature-gates / feature-gate-const_fn.stderr
1 error[E0379]: trait fns cannot be declared const
2   --> $DIR/feature-gate-const_fn.rs:18:5
3    |
4 LL |     const fn foo() -> u32; //~ ERROR const fn is unstable
5    |     ^^^^^ trait fns cannot be const
6
7 error[E0379]: trait fns cannot be declared const
8   --> $DIR/feature-gate-const_fn.rs:20:5
9    |
10 LL |     const fn bar() -> u32 { 0 } //~ ERROR const fn is unstable
11    |     ^^^^^ trait fns cannot be const
12
13 error[E0379]: trait fns cannot be declared const
14   --> $DIR/feature-gate-const_fn.rs:29:5
15    |
16 LL |     const fn foo() -> u32 { 0 } //~ ERROR trait fns cannot be declared const
17    |     ^^^^^ trait fns cannot be const
18
19 error[E0658]: const fn is unstable (see issue #24111)
20   --> $DIR/feature-gate-const_fn.rs:18:5
21    |
22 LL |     const fn foo() -> u32; //~ ERROR const fn is unstable
23    |     ^^^^^^^^^^^^^^^^^^^^^^
24    |
25    = help: add #![feature(const_fn)] to the crate attributes to enable
26
27 error[E0658]: const fn is unstable (see issue #24111)
28   --> $DIR/feature-gate-const_fn.rs:20:5
29    |
30 LL |     const fn bar() -> u32 { 0 } //~ ERROR const fn is unstable
31    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
32    |
33    = help: add #![feature(const_fn)] to the crate attributes to enable
34
35 error: aborting due to 5 previous errors
36
37 Some errors occurred: E0379, E0658.
38 For more information about an error, try `rustc --explain E0379`.