fork/rust

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

borsAuto merge of #71868 - Mark-Simulacrum:stable-1.43.1, r=pietroalbini8d69840ab92

1.43.1
1.4 KiB40 linesraw
1error[E0379]: functions in traits cannot be declared const
2  --> $DIR/feature-gate-const_fn.rs:6:5
3   |
4LL |     const fn foo() -> u32;
5   |     ^^^^^ functions in traits cannot be const
6
7error[E0379]: functions in traits cannot be declared const
8  --> $DIR/feature-gate-const_fn.rs:8:5
9   |
10LL |     const fn bar() -> u32 { 0 }
11   |     ^^^^^ functions in traits cannot be const
12
13error[E0379]: functions in traits cannot be declared const
14  --> $DIR/feature-gate-const_fn.rs:13:5
15   |
16LL |     const fn foo() -> u32 { 0 }
17   |     ^^^^^ functions in traits cannot be const
18
19error[E0658]: const fn is unstable
20  --> $DIR/feature-gate-const_fn.rs:6:5
21   |
22LL |     const fn foo() -> u32;
23   |     ^^^^^^^^^^^^^^^^^^^^^^
24   |
25   = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
26   = help: add `#![feature(const_fn)]` to the crate attributes to enable
27
28error[E0658]: const fn is unstable
29  --> $DIR/feature-gate-const_fn.rs:8:5
30   |
31LL |     const fn bar() -> u32 { 0 }
32   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
33   |
34   = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
35   = help: add `#![feature(const_fn)]` to the crate attributes to enable
36
37error: aborting due to 5 previous errors
38
39Some errors have detailed explanations: E0379, E0658.
40For more information about an error, try `rustc --explain E0379`.