]>
Commit | Line | Data |
---|---|---|
74b04a01 | 1 | #![feature(alloc_layout_extra)] |
3dfed10e | 2 | #![feature(array_chunks)] |
1b1a35ee | 3 | #![feature(array_methods)] |
1b1a35ee | 4 | #![feature(array_windows)] |
f2b60f7d | 5 | #![feature(bigint_helper_methods)] |
83c7162d | 6 | #![feature(cell_update)] |
487cf647 | 7 | #![feature(const_align_offset)] |
1b1a35ee | 8 | #![feature(const_assume)] |
487cf647 | 9 | #![feature(const_align_of_val_raw)] |
a2a8927a XL |
10 | #![feature(const_black_box)] |
11 | #![feature(const_bool_to_option)] | |
2b03887a | 12 | #![feature(const_caller_location)] |
29967ef6 | 13 | #![feature(const_cell_into_inner)] |
3c0e092e | 14 | #![feature(const_convert)] |
487cf647 | 15 | #![feature(const_hash)] |
5099ac24 | 16 | #![feature(const_heap)] |
a2a8927a | 17 | #![feature(const_maybe_uninit_as_mut_ptr)] |
5099ac24 FG |
18 | #![feature(const_maybe_uninit_assume_init_read)] |
19 | #![feature(const_nonnull_new)] | |
a2a8927a | 20 | #![feature(const_num_from_num)] |
f2b60f7d | 21 | #![feature(const_pointer_byte_offsets)] |
487cf647 | 22 | #![feature(const_pointer_is_aligned)] |
5099ac24 | 23 | #![feature(const_ptr_as_ref)] |
5869c6ff | 24 | #![feature(const_ptr_read)] |
6a06907d | 25 | #![feature(const_ptr_write)] |
94222f64 | 26 | #![feature(const_trait_impl)] |
a2a8927a | 27 | #![feature(const_likely)] |
2b03887a | 28 | #![feature(const_location_fields)] |
1b1a35ee | 29 | #![feature(core_intrinsics)] |
b039eaaf SL |
30 | #![feature(core_private_bignum)] |
31 | #![feature(core_private_diy_float)] | |
e9174d1e | 32 | #![feature(dec2flt)] |
1b1a35ee | 33 | #![feature(div_duration)] |
3c0e092e | 34 | #![feature(duration_consts_float)] |
1b1a35ee | 35 | #![feature(duration_constants)] |
041b39d2 | 36 | #![feature(exact_size_is_empty)] |
6a06907d | 37 | #![feature(extern_types)] |
62682a34 | 38 | #![feature(flt2dec)] |
cc61c64b | 39 | #![feature(fmt_internals)] |
3c0e092e | 40 | #![feature(float_minimum_maximum)] |
a2a8927a | 41 | #![feature(future_join)] |
923072b8 FG |
42 | #![feature(generic_assert_internals)] |
43 | #![feature(array_try_from_fn)] | |
04454e1e | 44 | #![feature(hasher_prefixfree_extras)] |
0531ce1d | 45 | #![feature(hashmap_internals)] |
dfeec247 | 46 | #![feature(try_find)] |
a2a8927a | 47 | #![feature(inline_const)] |
9fa01778 | 48 | #![feature(is_sorted)] |
487cf647 | 49 | #![feature(layout_for_ptr)] |
ff7c6d11 | 50 | #![feature(pattern)] |
cc61c64b | 51 | #![feature(sort_internals)] |
a2a8927a | 52 | #![feature(slice_take)] |
5e7ed085 | 53 | #![feature(slice_from_ptr_range)] |
04454e1e | 54 | #![feature(split_as_slice)] |
5869c6ff | 55 | #![feature(maybe_uninit_uninit_array)] |
fc512014 | 56 | #![feature(maybe_uninit_write_slice)] |
2b03887a | 57 | #![feature(maybe_uninit_uninit_array_transpose)] |
f035d41b | 58 | #![feature(min_specialization)] |
136023e0 | 59 | #![feature(numfmt)] |
7cac9316 | 60 | #![feature(step_trait)] |
83c7162d | 61 | #![feature(str_internals)] |
04454e1e | 62 | #![feature(std_internals)] |
62682a34 | 63 | #![feature(test)] |
7cac9316 | 64 | #![feature(trusted_len)] |
a2a8927a | 65 | #![feature(try_blocks)] |
17df50a5 | 66 | #![feature(try_trait_v2)] |
83c7162d | 67 | #![feature(slice_internals)] |
0bf4aa26 | 68 | #![feature(slice_partition_dedup)] |
9ffffee4 FG |
69 | #![feature(ip)] |
70 | #![feature(ip_in_core)] | |
1b1a35ee | 71 | #![feature(iter_advance_by)] |
f2b60f7d | 72 | #![feature(iter_array_chunks)] |
5e7ed085 | 73 | #![feature(iter_collect_into)] |
416331ca | 74 | #![feature(iter_partition_in_place)] |
dc3f5686 | 75 | #![feature(iter_intersperse)] |
416331ca | 76 | #![feature(iter_is_partitioned)] |
064997fb | 77 | #![feature(iter_next_chunk)] |
e1599b0c | 78 | #![feature(iter_order_by)] |
487cf647 | 79 | #![feature(iter_repeat_n)] |
5099ac24 | 80 | #![feature(iterator_try_collect)] |
a2a8927a | 81 | #![feature(iterator_try_reduce)] |
9ffffee4 FG |
82 | #![feature(const_ip)] |
83 | #![feature(const_ipv4)] | |
84 | #![feature(const_ipv6)] | |
1b1a35ee XL |
85 | #![feature(const_mut_refs)] |
86 | #![feature(const_pin)] | |
2b03887a | 87 | #![feature(const_waker)] |
dfeec247 XL |
88 | #![feature(never_type)] |
89 | #![feature(unwrap_infallible)] | |
f2b60f7d | 90 | #![feature(pointer_byte_offsets)] |
487cf647 | 91 | #![feature(pointer_is_aligned)] |
a2a8927a | 92 | #![feature(portable_simd)] |
cdc7bbd5 | 93 | #![feature(ptr_metadata)] |
353b0b11 | 94 | #![feature(lazy_cell)] |
6a06907d | 95 | #![feature(unsized_tuple_coercion)] |
fc512014 | 96 | #![feature(const_option)] |
a2a8927a | 97 | #![feature(const_option_ext)] |
3c0e092e | 98 | #![feature(const_result)] |
fc512014 | 99 | #![feature(integer_atomics)] |
94222f64 | 100 | #![feature(int_roundings)] |
5869c6ff | 101 | #![feature(slice_group_by)] |
3c0e092e | 102 | #![feature(split_array)] |
5e7ed085 | 103 | #![feature(strict_provenance)] |
064997fb | 104 | #![feature(strict_provenance_atomic_ptr)] |
5869c6ff | 105 | #![feature(trusted_random_access)] |
cdc7bbd5 | 106 | #![feature(unsize)] |
3c0e092e XL |
107 | #![feature(const_array_from_ref)] |
108 | #![feature(const_slice_from_ref)] | |
5099ac24 | 109 | #![feature(waker_getters)] |
04454e1e | 110 | #![feature(slice_flatten)] |
923072b8 | 111 | #![feature(provide_any)] |
f2b60f7d | 112 | #![feature(utf8_chunks)] |
2b03887a | 113 | #![feature(is_ascii_octdigit)] |
487cf647 | 114 | #![feature(get_many_mut)] |
f035d41b | 115 | #![deny(unsafe_op_in_unsafe_fn)] |
487cf647 | 116 | #![deny(fuzzy_provenance_casts)] |
223e47cc | 117 | |
1a4d82fc | 118 | extern crate test; |
223e47cc | 119 | |
48663c56 | 120 | mod alloc; |
1a4d82fc | 121 | mod any; |
e9174d1e | 122 | mod array; |
0531ce1d | 123 | mod ascii; |
923072b8 | 124 | mod asserting; |
1a4d82fc | 125 | mod atomic; |
e1599b0c | 126 | mod bool; |
1a4d82fc JJ |
127 | mod cell; |
128 | mod char; | |
b039eaaf | 129 | mod clone; |
1a4d82fc | 130 | mod cmp; |
5869c6ff | 131 | mod const_ptr; |
a2a8927a | 132 | mod convert; |
1a4d82fc | 133 | mod fmt; |
a2a8927a | 134 | mod future; |
1a4d82fc | 135 | mod hash; |
b039eaaf | 136 | mod intrinsics; |
1a4d82fc | 137 | mod iter; |
3dfed10e | 138 | mod lazy; |
fc512014 | 139 | mod macros; |
8faf50e0 | 140 | mod manually_drop; |
1a4d82fc | 141 | mod mem; |
9ffffee4 | 142 | mod net; |
1a4d82fc JJ |
143 | mod nonzero; |
144 | mod num; | |
145 | mod ops; | |
146 | mod option; | |
2b03887a | 147 | mod panic; |
ff7c6d11 | 148 | mod pattern; |
1b1a35ee | 149 | mod pin; |
5099ac24 | 150 | mod pin_macro; |
1a4d82fc JJ |
151 | mod ptr; |
152 | mod result; | |
a2a8927a | 153 | mod simd; |
1a4d82fc JJ |
154 | mod slice; |
155 | mod str; | |
83c7162d | 156 | mod str_lossy; |
29967ef6 | 157 | mod task; |
83c7162d | 158 | mod time; |
1a4d82fc | 159 | mod tuple; |
fc512014 | 160 | mod unicode; |
5099ac24 | 161 | mod waker; |
9c376795 FG |
162 | |
163 | /// Copied from `std::test_helpers::test_rng`, see that function for rationale. | |
164 | #[track_caller] | |
165 | #[allow(dead_code)] // Not used in all configurations. | |
166 | pub(crate) fn test_rng() -> rand_xorshift::XorShiftRng { | |
167 | use core::hash::{BuildHasher, Hash, Hasher}; | |
168 | let mut hasher = std::collections::hash_map::RandomState::new().build_hasher(); | |
169 | core::panic::Location::caller().hash(&mut hasher); | |
170 | let hc64 = hasher.finish(); | |
171 | let seed_vec = hc64.to_le_bytes().into_iter().chain(0u8..8).collect::<Vec<u8>>(); | |
172 | let seed: [u8; 16] = seed_vec.as_slice().try_into().unwrap(); | |
173 | rand::SeedableRng::from_seed(seed) | |
174 | } |