2020-03-07 01:40:54 +00:00
|
|
|
#![feature(alloc_layout_extra)]
|
2020-05-18 19:24:37 +00:00
|
|
|
#![feature(array_chunks)]
|
2020-08-30 19:07:23 +00:00
|
|
|
#![feature(array_methods)]
|
2020-08-13 19:09:14 +00:00
|
|
|
#![feature(array_windows)]
|
2023-07-03 17:11:39 +00:00
|
|
|
#![feature(ascii_char)]
|
|
|
|
#![feature(ascii_char_variants)]
|
2022-02-10 05:24:12 +00:00
|
|
|
#![feature(bigint_helper_methods)]
|
2018-04-06 20:45:31 +00:00
|
|
|
#![feature(cell_update)]
|
2022-10-07 18:59:23 +00:00
|
|
|
#![feature(const_align_offset)]
|
2020-09-24 14:41:40 +00:00
|
|
|
#![feature(const_assume)]
|
2022-10-29 13:38:00 +00:00
|
|
|
#![feature(const_align_of_val_raw)]
|
2021-12-23 11:07:41 +00:00
|
|
|
#![feature(const_black_box)]
|
2022-09-27 19:09:32 +00:00
|
|
|
#![feature(const_caller_location)]
|
2020-11-04 10:41:57 +00:00
|
|
|
#![feature(const_cell_into_inner)]
|
2022-11-08 16:39:40 +00:00
|
|
|
#![feature(const_hash)]
|
2022-01-26 04:06:09 +00:00
|
|
|
#![feature(const_heap)]
|
2021-11-17 00:58:52 +00:00
|
|
|
#![feature(const_maybe_uninit_as_mut_ptr)]
|
2022-01-28 09:41:35 +00:00
|
|
|
#![feature(const_nonnull_new)]
|
2022-10-07 19:46:28 +00:00
|
|
|
#![feature(const_pointer_is_aligned)]
|
2022-01-28 09:41:35 +00:00
|
|
|
#![feature(const_ptr_as_ref)]
|
2021-01-18 21:59:56 +00:00
|
|
|
#![feature(const_ptr_write)]
|
2021-03-13 17:40:47 +00:00
|
|
|
#![feature(const_trait_impl)]
|
2021-12-23 11:07:41 +00:00
|
|
|
#![feature(const_likely)]
|
2022-10-11 06:40:37 +00:00
|
|
|
#![feature(const_location_fields)]
|
2020-09-24 14:41:40 +00:00
|
|
|
#![feature(core_intrinsics)]
|
2023-11-08 00:12:01 +00:00
|
|
|
#![feature(core_io_borrowed_buf)]
|
2015-09-20 16:34:33 +00:00
|
|
|
#![feature(core_private_bignum)]
|
|
|
|
#![feature(core_private_diy_float)]
|
2015-08-29 16:30:05 +00:00
|
|
|
#![feature(dec2flt)]
|
2020-09-04 18:17:06 +00:00
|
|
|
#![feature(div_duration)]
|
2023-11-05 18:33:44 +00:00
|
|
|
#![feature(duration_abs_diff)]
|
2021-10-05 03:09:23 +00:00
|
|
|
#![feature(duration_consts_float)]
|
2020-08-30 17:31:34 +00:00
|
|
|
#![feature(duration_constants)]
|
2017-07-06 15:13:29 +00:00
|
|
|
#![feature(exact_size_is_empty)]
|
2020-10-19 13:38:11 +00:00
|
|
|
#![feature(extern_types)]
|
2015-06-10 20:33:52 +00:00
|
|
|
#![feature(flt2dec)]
|
2017-03-17 14:05:44 +00:00
|
|
|
#![feature(fmt_internals)]
|
2021-11-18 10:48:52 +00:00
|
|
|
#![feature(float_minimum_maximum)]
|
2021-12-08 02:10:39 +00:00
|
|
|
#![feature(future_join)]
|
2022-05-22 10:18:32 +00:00
|
|
|
#![feature(generic_assert_internals)]
|
2022-05-20 14:04:13 +00:00
|
|
|
#![feature(array_try_from_fn)]
|
2022-03-04 08:17:26 +00:00
|
|
|
#![feature(hasher_prefixfree_extras)]
|
2018-03-17 10:07:50 +00:00
|
|
|
#![feature(hashmap_internals)]
|
2019-08-06 11:13:13 +00:00
|
|
|
#![feature(try_find)]
|
2021-12-23 11:07:41 +00:00
|
|
|
#![feature(inline_const)]
|
2018-10-11 16:53:15 +00:00
|
|
|
#![feature(is_sorted)]
|
2022-10-29 13:38:00 +00:00
|
|
|
#![feature(layout_for_ptr)]
|
2017-12-17 22:44:03 +00:00
|
|
|
#![feature(pattern)]
|
2017-03-21 01:38:03 +00:00
|
|
|
#![feature(sort_internals)]
|
2021-10-09 15:28:20 +00:00
|
|
|
#![feature(slice_take)]
|
2021-10-11 21:41:25 +00:00
|
|
|
#![feature(slice_from_ptr_range)]
|
2023-06-20 00:50:14 +00:00
|
|
|
#![feature(slice_split_once)]
|
2021-12-26 08:45:33 +00:00
|
|
|
#![feature(split_as_slice)]
|
2021-01-01 21:12:49 +00:00
|
|
|
#![feature(maybe_uninit_uninit_array)]
|
2020-12-01 06:24:04 +00:00
|
|
|
#![feature(maybe_uninit_write_slice)]
|
2022-10-17 04:01:28 +00:00
|
|
|
#![feature(maybe_uninit_uninit_array_transpose)]
|
2020-06-16 11:07:15 +00:00
|
|
|
#![feature(min_specialization)]
|
2021-06-06 01:08:09 +00:00
|
|
|
#![feature(numfmt)]
|
2021-12-17 19:01:19 +00:00
|
|
|
#![feature(num_midpoint)]
|
2023-09-28 09:15:43 +00:00
|
|
|
#![feature(isqrt)]
|
2017-04-24 04:47:09 +00:00
|
|
|
#![feature(step_trait)]
|
2018-04-05 13:55:28 +00:00
|
|
|
#![feature(str_internals)]
|
2022-04-04 14:53:53 +00:00
|
|
|
#![feature(std_internals)]
|
2015-06-10 20:33:52 +00:00
|
|
|
#![feature(test)]
|
2017-05-23 09:24:25 +00:00
|
|
|
#![feature(trusted_len)]
|
2021-12-09 21:19:57 +00:00
|
|
|
#![feature(try_blocks)]
|
2021-04-15 08:13:39 +00:00
|
|
|
#![feature(try_trait_v2)]
|
2018-05-05 17:02:05 +00:00
|
|
|
#![feature(slice_internals)]
|
2018-09-08 13:33:02 +00:00
|
|
|
#![feature(slice_partition_dedup)]
|
2022-11-10 20:48:41 +00:00
|
|
|
#![feature(ip)]
|
2023-02-28 09:07:57 +00:00
|
|
|
#![feature(ip_in_core)]
|
2020-09-19 08:26:46 +00:00
|
|
|
#![feature(iter_advance_by)]
|
2022-01-02 16:31:56 +00:00
|
|
|
#![feature(iter_array_chunks)]
|
2022-02-20 00:46:55 +00:00
|
|
|
#![feature(iter_collect_into)]
|
2019-07-09 19:39:19 +00:00
|
|
|
#![feature(iter_partition_in_place)]
|
2021-10-07 17:39:36 +00:00
|
|
|
#![feature(iter_intersperse)]
|
2019-07-09 19:39:19 +00:00
|
|
|
#![feature(iter_is_partitioned)]
|
2022-06-21 06:57:02 +00:00
|
|
|
#![feature(iter_next_chunk)]
|
2019-06-28 12:43:32 +00:00
|
|
|
#![feature(iter_order_by)]
|
2022-11-15 08:04:55 +00:00
|
|
|
#![feature(iter_repeat_n)]
|
2022-02-16 02:58:42 +00:00
|
|
|
#![feature(iterator_try_collect)]
|
2021-07-11 05:43:30 +00:00
|
|
|
#![feature(iterator_try_reduce)]
|
2022-11-10 20:48:41 +00:00
|
|
|
#![feature(const_ip)]
|
|
|
|
#![feature(const_ipv4)]
|
|
|
|
#![feature(const_ipv6)]
|
2020-09-18 17:23:50 +00:00
|
|
|
#![feature(const_mut_refs)]
|
2020-09-12 23:55:34 +00:00
|
|
|
#![feature(const_pin)]
|
2022-09-14 12:15:44 +00:00
|
|
|
#![feature(const_waker)]
|
2019-11-02 20:12:51 +00:00
|
|
|
#![feature(never_type)]
|
|
|
|
#![feature(unwrap_infallible)]
|
2022-10-07 19:46:28 +00:00
|
|
|
#![feature(pointer_is_aligned)]
|
2021-11-30 15:50:44 +00:00
|
|
|
#![feature(portable_simd)]
|
2021-03-26 20:10:21 +00:00
|
|
|
#![feature(ptr_metadata)]
|
2022-12-12 05:42:45 +00:00
|
|
|
#![feature(lazy_cell)]
|
2020-10-19 13:38:11 +00:00
|
|
|
#![feature(unsized_tuple_coercion)]
|
2020-11-17 18:29:15 +00:00
|
|
|
#![feature(const_option)]
|
2021-12-14 17:58:01 +00:00
|
|
|
#![feature(const_option_ext)]
|
2021-10-16 16:18:00 +00:00
|
|
|
#![feature(const_result)]
|
2022-07-28 21:47:17 +00:00
|
|
|
#![cfg_attr(target_has_atomic = "128", feature(integer_atomics))]
|
2023-09-23 17:23:51 +00:00
|
|
|
#![cfg_attr(test, feature(cfg_match))]
|
2021-09-02 05:28:47 +00:00
|
|
|
#![feature(int_roundings)]
|
2020-12-10 09:16:29 +00:00
|
|
|
#![feature(slice_group_by)]
|
2021-03-17 16:23:09 +00:00
|
|
|
#![feature(split_array)]
|
2022-04-01 07:19:10 +00:00
|
|
|
#![feature(strict_provenance)]
|
2022-05-11 00:04:26 +00:00
|
|
|
#![feature(strict_provenance_atomic_ptr)]
|
2021-01-04 00:08:13 +00:00
|
|
|
#![feature(trusted_random_access)]
|
2021-03-26 20:10:21 +00:00
|
|
|
#![feature(unsize)]
|
2021-10-23 19:51:22 +00:00
|
|
|
#![feature(const_array_from_ref)]
|
|
|
|
#![feature(const_slice_from_ref)]
|
2021-12-12 09:55:41 +00:00
|
|
|
#![feature(waker_getters)]
|
2022-04-02 00:07:28 +00:00
|
|
|
#![feature(slice_flatten)]
|
2023-07-06 16:53:52 +00:00
|
|
|
#![feature(error_generic_member_access)]
|
|
|
|
#![feature(error_in_core)]
|
2023-11-21 12:58:01 +00:00
|
|
|
#![cfg_attr(bootstrap, feature(trait_upcasting))]
|
2022-08-20 16:49:20 +00:00
|
|
|
#![feature(utf8_chunks)]
|
2022-09-27 06:25:13 +00:00
|
|
|
#![feature(is_ascii_octdigit)]
|
2021-03-28 12:24:49 +00:00
|
|
|
#![feature(get_many_mut)]
|
2023-05-30 12:00:10 +00:00
|
|
|
#![feature(offset_of)]
|
2023-05-10 09:08:28 +00:00
|
|
|
#![feature(iter_map_windows)]
|
2020-11-19 17:32:35 +00:00
|
|
|
#![deny(unsafe_op_in_unsafe_fn)]
|
2022-11-20 10:28:08 +00:00
|
|
|
#![deny(fuzzy_provenance_casts)]
|
2014-06-28 20:57:36 +00:00
|
|
|
|
2019-04-30 06:23:14 +00:00
|
|
|
mod alloc;
|
2014-06-28 20:57:36 +00:00
|
|
|
mod any;
|
2015-08-29 16:30:05 +00:00
|
|
|
mod array;
|
2018-03-09 03:55:54 +00:00
|
|
|
mod ascii;
|
2022-05-22 10:18:32 +00:00
|
|
|
mod asserting;
|
2014-08-04 22:42:36 +00:00
|
|
|
mod atomic;
|
2019-09-07 14:49:27 +00:00
|
|
|
mod bool;
|
2014-06-28 20:57:36 +00:00
|
|
|
mod cell;
|
|
|
|
mod char;
|
2015-10-15 19:07:20 +00:00
|
|
|
mod clone;
|
2014-06-28 20:57:36 +00:00
|
|
|
mod cmp;
|
2020-12-26 00:59:08 +00:00
|
|
|
mod const_ptr;
|
2021-12-05 10:46:29 +00:00
|
|
|
mod convert;
|
2014-06-28 20:57:36 +00:00
|
|
|
mod fmt;
|
2021-12-08 02:10:39 +00:00
|
|
|
mod future;
|
2014-12-13 02:43:07 +00:00
|
|
|
mod hash;
|
2015-10-15 19:07:20 +00:00
|
|
|
mod intrinsics;
|
2023-11-08 00:12:01 +00:00
|
|
|
mod io;
|
2014-06-28 20:57:36 +00:00
|
|
|
mod iter;
|
2020-01-14 03:34:23 +00:00
|
|
|
mod lazy;
|
2023-09-23 17:23:51 +00:00
|
|
|
#[cfg(test)]
|
2020-11-22 08:08:04 +00:00
|
|
|
mod macros;
|
2018-07-27 10:12:55 +00:00
|
|
|
mod manually_drop;
|
2014-06-28 20:57:36 +00:00
|
|
|
mod mem;
|
2022-11-10 20:48:41 +00:00
|
|
|
mod net;
|
2014-12-23 20:52:02 +00:00
|
|
|
mod nonzero;
|
2014-06-28 20:57:36 +00:00
|
|
|
mod num;
|
|
|
|
mod ops;
|
|
|
|
mod option;
|
2022-09-27 19:09:32 +00:00
|
|
|
mod panic;
|
2017-12-17 22:44:03 +00:00
|
|
|
mod pattern;
|
2020-09-12 23:55:34 +00:00
|
|
|
mod pin;
|
2022-01-24 00:41:37 +00:00
|
|
|
mod pin_macro;
|
2014-06-28 20:57:36 +00:00
|
|
|
mod ptr;
|
|
|
|
mod result;
|
2021-10-22 07:47:12 +00:00
|
|
|
mod simd;
|
2014-08-07 03:48:25 +00:00
|
|
|
mod slice;
|
2014-08-19 01:43:43 +00:00
|
|
|
mod str;
|
2018-04-05 13:55:28 +00:00
|
|
|
mod str_lossy;
|
2020-09-03 23:04:34 +00:00
|
|
|
mod task;
|
2018-05-01 11:43:05 +00:00
|
|
|
mod time;
|
2014-06-28 20:57:36 +00:00
|
|
|
mod tuple;
|
2020-11-22 08:08:04 +00:00
|
|
|
mod unicode;
|
2021-12-12 09:55:41 +00:00
|
|
|
mod waker;
|
2022-11-21 00:55:41 +00:00
|
|
|
|
|
|
|
/// Copied from `std::test_helpers::test_rng`, see that function for rationale.
|
|
|
|
#[track_caller]
|
|
|
|
#[allow(dead_code)] // Not used in all configurations.
|
|
|
|
pub(crate) fn test_rng() -> rand_xorshift::XorShiftRng {
|
|
|
|
use core::hash::{BuildHasher, Hash, Hasher};
|
2023-10-13 06:44:19 +00:00
|
|
|
let mut hasher = std::hash::RandomState::new().build_hasher();
|
2022-11-21 00:55:41 +00:00
|
|
|
core::panic::Location::caller().hash(&mut hasher);
|
|
|
|
let hc64 = hasher.finish();
|
|
|
|
let seed_vec = hc64.to_le_bytes().into_iter().chain(0u8..8).collect::<Vec<u8>>();
|
|
|
|
let seed: [u8; 16] = seed_vec.as_slice().try_into().unwrap();
|
|
|
|
rand::SeedableRng::from_seed(seed)
|
|
|
|
}
|