1 error[E0658]: floating point arithmetic is not allowed in constant functions
2 --> $DIR/const_fn_floating_point_arithmetic.rs:8:31
4 LL | const fn add(f: f32) -> f32 { f + 2.0 }
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
10 error[E0658]: floating point arithmetic is not allowed in constant functions
11 --> $DIR/const_fn_floating_point_arithmetic.rs:10:31
13 LL | const fn sub(f: f32) -> f32 { 2.0 - f }
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
19 error[E0658]: floating point arithmetic is not allowed in constant functions
20 --> $DIR/const_fn_floating_point_arithmetic.rs:12:39
22 LL | const fn mul(f: f32, g: f32) -> f32 { f * g }
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
28 error[E0658]: floating point arithmetic is not allowed in constant functions
29 --> $DIR/const_fn_floating_point_arithmetic.rs:14:39
31 LL | const fn div(f: f32, g: f32) -> f32 { f / g }
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
37 error[E0658]: floating point arithmetic is not allowed in constant functions
38 --> $DIR/const_fn_floating_point_arithmetic.rs:16:31
40 LL | const fn neg(f: f32) -> f32 { -f }
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
46 error: aborting due to 5 previous errors
48 For more information about this error, try `rustc --explain E0658`.