Skip to content

Commit 91a40c1

Browse files
committed
Update float tests to include f16 and f128
1 parent af397ce commit 91a40c1

40 files changed

+672
-414
lines changed

tests/ui-toml/toml_disallowed_methods/conf_disallowed_methods.rs

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ fn main() {
4040

4141
a.sort_unstable();
4242

43+
// FIXME(f16_f128): add a clamp test once the function is available
4344
let _ = 2.0f32.clamp(3.0f32, 4.0f32);
4445
let _ = 2.0f64.clamp(3.0f64, 4.0f64);
4546

tests/ui/arithmetic_side_effects.rs

+4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
unconditional_panic
1212
)]
1313
#![feature(const_mut_refs)]
14+
#![feature(f128)]
15+
#![feature(f16)]
1416
#![warn(clippy::arithmetic_side_effects)]
1517

1618
extern crate proc_macro_derive;
@@ -162,8 +164,10 @@ pub fn association_with_structures_should_not_trigger_the_lint() {
162164
}
163165

164166
pub fn hard_coded_allowed() {
167+
let _ = 1f16 + 1f16;
165168
let _ = 1f32 + 1f32;
166169
let _ = 1f64 + 1f64;
170+
let _ = 1f128 + 1f128;
167171

168172
let _ = Saturating(0u32) + Saturating(0u32);
169173
let _ = String::new() + "";

tests/ui/cast.rs

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
clippy::identity_op
1818
)]
1919

20+
// FIXME(f16_f128): add tests once const casting is available for these types
21+
2022
fn main() {
2123
// Test clippy::cast_precision_loss
2224
let x0 = 1i32;

0 commit comments

Comments
 (0)