Skip to content

Commit

Permalink
Update float tests to include f16 and f128
Browse files Browse the repository at this point in the history
  • Loading branch information
tgross35 committed Jun 18, 2024
1 parent af397ce commit 08a85ed
Show file tree
Hide file tree
Showing 43 changed files with 826 additions and 1,259 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ fn main() {

a.sort_unstable();

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

Expand Down
4 changes: 4 additions & 0 deletions tests/ui/arithmetic_side_effects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
unconditional_panic
)]
#![feature(const_mut_refs)]
#![feature(f128)]
#![feature(f16)]
#![warn(clippy::arithmetic_side_effects)]

extern crate proc_macro_derive;
Expand Down Expand Up @@ -162,8 +164,10 @@ pub fn association_with_structures_should_not_trigger_the_lint() {
}

pub fn hard_coded_allowed() {
let _ = 1f16 + 1f16;
let _ = 1f32 + 1f32;
let _ = 1f64 + 1f64;
let _ = 1f128 + 1f128;

let _ = Saturating(0u32) + Saturating(0u32);
let _ = String::new() + "";
Expand Down
Loading

0 comments on commit 08a85ed

Please sign in to comment.