lib.rs (2612e3bbc0386368a850140a6c9b990cd496a5ec) lib.rs (89eed1ab1161e7d60595917e3b982e03dfcc0f8d)
1// SPDX-License-Identifier: Apache-2.0 OR MIT
2
3//! # The Rust core allocation and collections library
4//!
5//! This library provides smart pointers and collections for managing
6//! heap-allocated values.
7//!
8//! This library, like core, normally doesn’t need to be used directly

--- 75 unchanged lines hidden (view full) ---

84//
85// Lints:
86#![deny(unsafe_op_in_unsafe_fn)]
87#![deny(fuzzy_provenance_casts)]
88#![warn(deprecated_in_future)]
89#![warn(missing_debug_implementations)]
90#![warn(missing_docs)]
91#![allow(explicit_outlives_requirements)]
1// SPDX-License-Identifier: Apache-2.0 OR MIT
2
3//! # The Rust core allocation and collections library
4//!
5//! This library provides smart pointers and collections for managing
6//! heap-allocated values.
7//!
8//! This library, like core, normally doesn’t need to be used directly

--- 75 unchanged lines hidden (view full) ---

84//
85// Lints:
86#![deny(unsafe_op_in_unsafe_fn)]
87#![deny(fuzzy_provenance_casts)]
88#![warn(deprecated_in_future)]
89#![warn(missing_debug_implementations)]
90#![warn(missing_docs)]
91#![allow(explicit_outlives_requirements)]
92#![warn(multiple_supertrait_upcastable)]
92//
93// Library features:
93//
94// Library features:
95// tidy-alphabetical-start
96#![cfg_attr(not(no_global_oom_handling), feature(const_alloc_error))]
97#![cfg_attr(not(no_global_oom_handling), feature(const_btree_len))]
98#![cfg_attr(test, feature(is_sorted))]
99#![cfg_attr(test, feature(new_uninit))]
94#![feature(alloc_layout_extra)]
95#![feature(allocator_api)]
96#![feature(array_chunks)]
97#![feature(array_into_iter_constructors)]
98#![feature(array_methods)]
99#![feature(array_windows)]
100#![feature(alloc_layout_extra)]
101#![feature(allocator_api)]
102#![feature(array_chunks)]
103#![feature(array_into_iter_constructors)]
104#![feature(array_methods)]
105#![feature(array_windows)]
106#![feature(ascii_char)]
100#![feature(assert_matches)]
101#![feature(async_iterator)]
102#![feature(coerce_unsized)]
107#![feature(assert_matches)]
108#![feature(async_iterator)]
109#![feature(coerce_unsized)]
103#![cfg_attr(not(no_global_oom_handling), feature(const_alloc_error))]
110#![feature(const_align_of_val)]
104#![feature(const_box)]
111#![feature(const_box)]
105#![cfg_attr(not(no_global_oom_handling), feature(const_btree_len))]
106#![cfg_attr(not(no_borrow), feature(const_cow_is_borrowed))]
112#![cfg_attr(not(no_borrow), feature(const_cow_is_borrowed))]
107#![feature(const_convert)]
108#![feature(const_size_of_val)]
109#![feature(const_align_of_val)]
110#![feature(const_ptr_read)]
111#![feature(const_maybe_uninit_zeroed)]
112#![feature(const_maybe_uninit_write)]
113#![feature(const_eval_select)]
113#![feature(const_maybe_uninit_as_mut_ptr)]
114#![feature(const_maybe_uninit_as_mut_ptr)]
115#![feature(const_maybe_uninit_write)]
116#![feature(const_maybe_uninit_zeroed)]
117#![feature(const_pin)]
114#![feature(const_refs_to_cell)]
118#![feature(const_refs_to_cell)]
119#![feature(const_size_of_val)]
120#![feature(const_waker)]
115#![feature(core_intrinsics)]
116#![feature(core_panic)]
121#![feature(core_intrinsics)]
122#![feature(core_panic)]
117#![feature(const_eval_select)]
118#![feature(const_pin)]
119#![feature(const_waker)]
120#![feature(cstr_from_bytes_until_nul)]
121#![feature(dispatch_from_dyn)]
122#![feature(error_generic_member_access)]
123#![feature(error_in_core)]
124#![feature(exact_size_is_empty)]
125#![feature(extend_one)]
126#![feature(fmt_internals)]
127#![feature(fn_traits)]
128#![feature(hasher_prefixfree_extras)]
129#![feature(inline_const)]
130#![feature(inplace_iteration)]
123#![feature(dispatch_from_dyn)]
124#![feature(error_generic_member_access)]
125#![feature(error_in_core)]
126#![feature(exact_size_is_empty)]
127#![feature(extend_one)]
128#![feature(fmt_internals)]
129#![feature(fn_traits)]
130#![feature(hasher_prefixfree_extras)]
131#![feature(inline_const)]
132#![feature(inplace_iteration)]
131#![cfg_attr(test, feature(is_sorted))]
132#![feature(iter_advance_by)]
133#![feature(iter_next_chunk)]
134#![feature(iter_repeat_n)]
135#![feature(layout_for_ptr)]
136#![feature(maybe_uninit_slice)]
137#![feature(maybe_uninit_uninit_array)]
138#![feature(maybe_uninit_uninit_array_transpose)]
133#![feature(iter_advance_by)]
134#![feature(iter_next_chunk)]
135#![feature(iter_repeat_n)]
136#![feature(layout_for_ptr)]
137#![feature(maybe_uninit_slice)]
138#![feature(maybe_uninit_uninit_array)]
139#![feature(maybe_uninit_uninit_array_transpose)]
139#![cfg_attr(test, feature(new_uninit))]
140#![feature(nonnull_slice_from_raw_parts)]
141#![feature(pattern)]
142#![feature(pointer_byte_offsets)]
143#![feature(provide_any)]
144#![feature(ptr_internals)]
145#![feature(ptr_metadata)]
146#![feature(ptr_sub_ptr)]
147#![feature(receiver_trait)]
148#![feature(saturating_int_impl)]
149#![feature(set_ptr_value)]
150#![feature(sized_type_properties)]
151#![feature(slice_from_ptr_range)]
152#![feature(slice_group_by)]
153#![feature(slice_ptr_get)]
154#![feature(slice_ptr_len)]
155#![feature(slice_range)]
140#![feature(pattern)]
141#![feature(pointer_byte_offsets)]
142#![feature(provide_any)]
143#![feature(ptr_internals)]
144#![feature(ptr_metadata)]
145#![feature(ptr_sub_ptr)]
146#![feature(receiver_trait)]
147#![feature(saturating_int_impl)]
148#![feature(set_ptr_value)]
149#![feature(sized_type_properties)]
150#![feature(slice_from_ptr_range)]
151#![feature(slice_group_by)]
152#![feature(slice_ptr_get)]
153#![feature(slice_ptr_len)]
154#![feature(slice_range)]
155#![feature(std_internals)]
156#![feature(str_internals)]
157#![feature(strict_provenance)]
158#![feature(trusted_len)]
159#![feature(trusted_random_access)]
160#![feature(try_trait_v2)]
161#![feature(tuple_trait)]
162#![feature(unchecked_math)]
163#![feature(unicode_internals)]
164#![feature(unsize)]
165#![feature(utf8_chunks)]
156#![feature(str_internals)]
157#![feature(strict_provenance)]
158#![feature(trusted_len)]
159#![feature(trusted_random_access)]
160#![feature(try_trait_v2)]
161#![feature(tuple_trait)]
162#![feature(unchecked_math)]
163#![feature(unicode_internals)]
164#![feature(unsize)]
165#![feature(utf8_chunks)]
166#![feature(std_internals)]
166// tidy-alphabetical-end
167//
168// Language features:
167//
168// Language features:
169// tidy-alphabetical-start
170#![cfg_attr(not(test), feature(generator_trait))]
171#![cfg_attr(test, feature(panic_update_hook))]
172#![cfg_attr(test, feature(test))]
169#![feature(allocator_internals)]
170#![feature(allow_internal_unstable)]
171#![feature(associated_type_bounds)]
173#![feature(allocator_internals)]
174#![feature(allow_internal_unstable)]
175#![feature(associated_type_bounds)]
176#![feature(c_unwind)]
172#![feature(cfg_sanitize)]
177#![feature(cfg_sanitize)]
173#![feature(const_deref)]
174#![feature(const_mut_refs)]
178#![feature(const_mut_refs)]
175#![feature(const_ptr_write)]
176#![feature(const_precise_live_drops)]
179#![feature(const_precise_live_drops)]
180#![feature(const_ptr_write)]
177#![feature(const_trait_impl)]
178#![feature(const_try)]
179#![feature(dropck_eyepatch)]
180#![feature(exclusive_range_pattern)]
181#![feature(fundamental)]
181#![feature(const_trait_impl)]
182#![feature(const_try)]
183#![feature(dropck_eyepatch)]
184#![feature(exclusive_range_pattern)]
185#![feature(fundamental)]
182#![cfg_attr(not(test), feature(generator_trait))]
183#![feature(hashmap_internals)]
184#![feature(lang_items)]
185#![feature(min_specialization)]
186#![feature(hashmap_internals)]
187#![feature(lang_items)]
188#![feature(min_specialization)]
189#![feature(multiple_supertrait_upcastable)]
186#![feature(negative_impls)]
187#![feature(never_type)]
190#![feature(negative_impls)]
191#![feature(never_type)]
192#![feature(pointer_is_aligned)]
188#![feature(rustc_allow_const_fn_unstable)]
189#![feature(rustc_attrs)]
193#![feature(rustc_allow_const_fn_unstable)]
194#![feature(rustc_attrs)]
190#![feature(pointer_is_aligned)]
191#![feature(slice_internals)]
192#![feature(staged_api)]
193#![feature(stmt_expr_attributes)]
195#![feature(slice_internals)]
196#![feature(staged_api)]
197#![feature(stmt_expr_attributes)]
194#![cfg_attr(test, feature(test))]
195#![feature(unboxed_closures)]
196#![feature(unsized_fn_params)]
198#![feature(unboxed_closures)]
199#![feature(unsized_fn_params)]
197#![feature(c_unwind)]
198#![feature(with_negative_coherence)]
200#![feature(with_negative_coherence)]
199#![cfg_attr(test, feature(panic_update_hook))]
201// tidy-alphabetical-end
200//
201// Rustdoc features:
202#![feature(doc_cfg)]
203#![feature(doc_cfg_hide)]
204// Technically, this is a bug in rustdoc: rustdoc sees the documentation on `#[lang = slice_alloc]`
205// blocks is for `&[T]`, which also has documentation using this feature in `core`, and gets mad
206// that the feature-gate isn't enabled. Ideally, it wouldn't check for the feature gate for docs
207// from other crates, but since this can only appear for lang items, it doesn't seem worth fixing.

--- 77 unchanged lines hidden ---
202//
203// Rustdoc features:
204#![feature(doc_cfg)]
205#![feature(doc_cfg_hide)]
206// Technically, this is a bug in rustdoc: rustdoc sees the documentation on `#[lang = slice_alloc]`
207// blocks is for `&[T]`, which also has documentation using this feature in `core`, and gets mad
208// that the feature-gate isn't enabled. Ideally, it wouldn't check for the feature gate for docs
209// from other crates, but since this can only appear for lang items, it doesn't seem worth fixing.

--- 77 unchanged lines hidden ---