Skip to content

Commit

Permalink
Merge branch 'main' of github.com:rajathkotyal/verify-rust-std into c…
Browse files Browse the repository at this point in the history
…-0011-core-nums-yenyunw-f32-to-int-unchecked
  • Loading branch information
Yenyun035 committed Nov 7, 2024
2 parents 573e0a8 + c738450 commit 39c6d63
Show file tree
Hide file tree
Showing 551 changed files with 17,355 additions and 8,141 deletions.
90 changes: 50 additions & 40 deletions library/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion library/alloc/benches/binary_heap.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::collections::BinaryHeap;

use rand::seq::SliceRandom;
use test::{black_box, Bencher};
use test::{Bencher, black_box};

#[bench]
fn bench_find_smallest_1000(b: &mut Bencher) {
Expand Down
4 changes: 2 additions & 2 deletions library/alloc/benches/btree/map.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use std::collections::BTreeMap;
use std::ops::RangeBounds;

use rand::seq::SliceRandom;
use rand::Rng;
use test::{black_box, Bencher};
use rand::seq::SliceRandom;
use test::{Bencher, black_box};

macro_rules! map_insert_rand_bench {
($name: ident, $n: expr, $map: ident) => {
Expand Down
3 changes: 2 additions & 1 deletion library/alloc/benches/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
#![feature(iter_next_chunk)]
#![feature(repr_simd)]
#![feature(slice_partition_dedup)]
#![feature(strict_provenance)]
#![cfg_attr(bootstrap, feature(strict_provenance))]
#![cfg_attr(not(bootstrap), feature(strict_provenance_lints))]
#![feature(test)]
#![deny(fuzzy_provenance_casts)]

Expand Down
8 changes: 4 additions & 4 deletions library/alloc/benches/slice.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use std::{mem, ptr};

use rand::distributions::{Alphanumeric, DistString, Standard};
use rand::Rng;
use test::{black_box, Bencher};
use rand::distributions::{Alphanumeric, DistString, Standard};
use test::{Bencher, black_box};

#[bench]
fn iterator(b: &mut Bencher) {
Expand Down Expand Up @@ -336,10 +336,10 @@ reverse!(reverse_u32, u32, |x| x as u32);
reverse!(reverse_u64, u64, |x| x as u64);
reverse!(reverse_u128, u128, |x| x as u128);
#[repr(simd)]
struct F64x4(f64, f64, f64, f64);
struct F64x4([f64; 4]);
reverse!(reverse_simd_f64x4, F64x4, |x| {
let x = x as f64;
F64x4(x, x, x, x)
F64x4([x, x, x, x])
});

macro_rules! rotate {
Expand Down
4 changes: 3 additions & 1 deletion library/alloc/benches/str.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use test::{black_box, Bencher};
use test::{Bencher, black_box};

#[bench]
fn char_iterator(b: &mut Bencher) {
Expand Down Expand Up @@ -347,3 +347,5 @@ make_test!(rsplitn_space_char, s, s.rsplitn(10, ' ').count());

make_test!(split_space_str, s, s.split(" ").count());
make_test!(split_ad_str, s, s.split("ad").count());

make_test!(to_lowercase, s, s.to_lowercase());
2 changes: 1 addition & 1 deletion library/alloc/benches/string.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::iter::repeat;

use test::{black_box, Bencher};
use test::{Bencher, black_box};

#[bench]
fn bench_with_capacity(b: &mut Bencher) {
Expand Down
2 changes: 1 addition & 1 deletion library/alloc/benches/vec.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::iter::repeat;

use rand::RngCore;
use test::{black_box, Bencher};
use test::{Bencher, black_box};

#[bench]
fn bench_new(b: &mut Bencher) {
Expand Down
4 changes: 2 additions & 2 deletions library/alloc/benches/vec_deque.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::collections::{vec_deque, VecDeque};
use std::collections::{VecDeque, vec_deque};
use std::mem;

use test::{black_box, Bencher};
use test::{Bencher, black_box};

#[bench]
fn bench_new(b: &mut Bencher) {
Expand Down
Loading

0 comments on commit 39c6d63

Please sign in to comment.