]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const_fn_floating_point_arithmetic.stock.stderr
Do not suggest `let_else` if no bindings would be introduced
[rust.git] / src / test / ui / consts / const_fn_floating_point_arithmetic.stock.stderr
1 error[E0658]: floating point arithmetic is not allowed in constant functions
2   --> $DIR/const_fn_floating_point_arithmetic.rs:8:31
3    |
4 LL | const fn add(f: f32) -> f32 { f + 2.0 }
5    |                               ^^^^^^^
6    |
7    = note: see issue #57241 <https://github.com/rust-lang/rust/issues/57241> for more information
8    = help: add `#![feature(const_fn_floating_point_arithmetic)]` to the crate attributes to enable
9
10 error[E0658]: floating point arithmetic is not allowed in constant functions
11   --> $DIR/const_fn_floating_point_arithmetic.rs:10:31
12    |
13 LL | const fn sub(f: f32) -> f32 { 2.0 - f }
14    |                               ^^^^^^^
15    |
16    = note: see issue #57241 <https://github.com/rust-lang/rust/issues/57241> for more information
17    = help: add `#![feature(const_fn_floating_point_arithmetic)]` to the crate attributes to enable
18
19 error[E0658]: floating point arithmetic is not allowed in constant functions
20   --> $DIR/const_fn_floating_point_arithmetic.rs:12:39
21    |
22 LL | const fn mul(f: f32, g: f32) -> f32 { f * g }
23    |                                       ^^^^^
24    |
25    = note: see issue #57241 <https://github.com/rust-lang/rust/issues/57241> for more information
26    = help: add `#![feature(const_fn_floating_point_arithmetic)]` to the crate attributes to enable
27
28 error[E0658]: floating point arithmetic is not allowed in constant functions
29   --> $DIR/const_fn_floating_point_arithmetic.rs:14:39
30    |
31 LL | const fn div(f: f32, g: f32) -> f32 { f / g }
32    |                                       ^^^^^
33    |
34    = note: see issue #57241 <https://github.com/rust-lang/rust/issues/57241> for more information
35    = help: add `#![feature(const_fn_floating_point_arithmetic)]` to the crate attributes to enable
36
37 error[E0658]: floating point arithmetic is not allowed in constant functions
38   --> $DIR/const_fn_floating_point_arithmetic.rs:16:31
39    |
40 LL | const fn neg(f: f32) -> f32 { -f }
41    |                               ^^
42    |
43    = note: see issue #57241 <https://github.com/rust-lang/rust/issues/57241> for more information
44    = help: add `#![feature(const_fn_floating_point_arithmetic)]` to the crate attributes to enable
45
46 error: aborting due to 5 previous errors
47
48 For more information about this error, try `rustc --explain E0658`.