]> git.lizzy.rs Git - rust.git/blob - src/libstd/lib.rs
Fix duplicate maybe_uninit_extra attribute
[rust.git] / src / libstd / lib.rs
1 //! # The Rust Standard Library
2 //!
3 //! The Rust Standard Library is the foundation of portable Rust software, a
4 //! set of minimal and battle-tested shared abstractions for the [broader Rust
5 //! ecosystem][crates.io]. It offers core types, like [`Vec<T>`] and
6 //! [`Option<T>`], library-defined [operations on language
7 //! primitives](#primitives), [standard macros](#macros), [I/O] and
8 //! [multithreading], among [many other things][other].
9 //!
10 //! `std` is available to all Rust crates by default. Therefore, the
11 //! standard library can be accessed in [`use`] statements through the path
12 //! `std`, as in [`use std::env`].
13 //!
14 //! # How to read this documentation
15 //!
16 //! If you already know the name of what you are looking for, the fastest way to
17 //! find it is to use the <a href="#" onclick="focusSearchBar();">search
18 //! bar</a> at the top of the page.
19 //!
20 //! Otherwise, you may want to jump to one of these useful sections:
21 //!
22 //! * [`std::*` modules](#modules)
23 //! * [Primitive types](#primitives)
24 //! * [Standard macros](#macros)
25 //! * [The Rust Prelude](prelude/index.html)
26 //!
27 //! If this is your first time, the documentation for the standard library is
28 //! written to be casually perused. Clicking on interesting things should
29 //! generally lead you to interesting places. Still, there are important bits
30 //! you don't want to miss, so read on for a tour of the standard library and
31 //! its documentation!
32 //!
33 //! Once you are familiar with the contents of the standard library you may
34 //! begin to find the verbosity of the prose distracting. At this stage in your
35 //! development you may want to press the `[-]` button near the top of the
36 //! page to collapse it into a more skimmable view.
37 //!
38 //! While you are looking at that `[-]` button also notice the `[src]`
39 //! button. Rust's API documentation comes with the source code and you are
40 //! encouraged to read it. The standard library source is generally high
41 //! quality and a peek behind the curtains is often enlightening.
42 //!
43 //! # What is in the standard library documentation?
44 //!
45 //! First of all, The Rust Standard Library is divided into a number of focused
46 //! modules, [all listed further down this page](#modules). These modules are
47 //! the bedrock upon which all of Rust is forged, and they have mighty names
48 //! like [`std::slice`] and [`std::cmp`]. Modules' documentation typically
49 //! includes an overview of the module along with examples, and are a smart
50 //! place to start familiarizing yourself with the library.
51 //!
52 //! Second, implicit methods on [primitive types] are documented here. This can
53 //! be a source of confusion for two reasons:
54 //!
55 //! 1. While primitives are implemented by the compiler, the standard library
56 //!    implements methods directly on the primitive types (and it is the only
57 //!    library that does so), which are [documented in the section on
58 //!    primitives](#primitives).
59 //! 2. The standard library exports many modules *with the same name as
60 //!    primitive types*. These define additional items related to the primitive
61 //!    type, but not the all-important methods.
62 //!
63 //! So for example there is a [page for the primitive type
64 //! `i32`](primitive.i32.html) that lists all the methods that can be called on
65 //! 32-bit integers (very useful), and there is a [page for the module
66 //! `std::i32`](i32/index.html) that documents the constant values [`MIN`] and
67 //! [`MAX`](i32/constant.MAX.html) (rarely useful).
68 //!
69 //! Note the documentation for the primitives [`str`] and [`[T]`][slice] (also
70 //! called 'slice'). Many method calls on [`String`] and [`Vec<T>`] are actually
71 //! calls to methods on [`str`] and [`[T]`][slice] respectively, via [deref
72 //! coercions][deref-coercions].
73 //!
74 //! Third, the standard library defines [The Rust Prelude], a small collection
75 //! of items - mostly traits - that are imported into every module of every
76 //! crate. The traits in the prelude are pervasive, making the prelude
77 //! documentation a good entry point to learning about the library.
78 //!
79 //! And finally, the standard library exports a number of standard macros, and
80 //! [lists them on this page](#macros) (technically, not all of the standard
81 //! macros are defined by the standard library - some are defined by the
82 //! compiler - but they are documented here the same). Like the prelude, the
83 //! standard macros are imported by default into all crates.
84 //!
85 //! # Contributing changes to the documentation
86 //!
87 //! Check out the rust contribution guidelines [here](
88 //! https://rustc-dev-guide.rust-lang.org/getting-started.html).
89 //! The source for this documentation can be found on
90 //! [GitHub](https://github.com/rust-lang/rust).
91 //! To contribute changes, make sure you read the guidelines first, then submit
92 //! pull-requests for your suggested changes.
93 //!
94 //! Contributions are appreciated! If you see a part of the docs that can be
95 //! improved, submit a PR, or chat with us first on [Discord][rust-discord]
96 //! #docs.
97 //!
98 //! # A Tour of The Rust Standard Library
99 //!
100 //! The rest of this crate documentation is dedicated to pointing out notable
101 //! features of The Rust Standard Library.
102 //!
103 //! ## Containers and collections
104 //!
105 //! The [`option`] and [`result`] modules define optional and error-handling
106 //! types, [`Option<T>`] and [`Result<T, E>`]. The [`iter`] module defines
107 //! Rust's iterator trait, [`Iterator`], which works with the [`for`] loop to
108 //! access collections.
109 //!
110 //! The standard library exposes three common ways to deal with contiguous
111 //! regions of memory:
112 //!
113 //! * [`Vec<T>`] - A heap-allocated *vector* that is resizable at runtime.
114 //! * [`[T; n]`][array] - An inline *array* with a fixed size at compile time.
115 //! * [`[T]`][slice] - A dynamically sized *slice* into any other kind of contiguous
116 //!   storage, whether heap-allocated or not.
117 //!
118 //! Slices can only be handled through some kind of *pointer*, and as such come
119 //! in many flavors such as:
120 //!
121 //! * `&[T]` - *shared slice*
122 //! * `&mut [T]` - *mutable slice*
123 //! * [`Box<[T]>`][owned slice] - *owned slice*
124 //!
125 //! [`str`], a UTF-8 string slice, is a primitive type, and the standard library
126 //! defines many methods for it. Rust [`str`]s are typically accessed as
127 //! immutable references: `&str`. Use the owned [`String`] for building and
128 //! mutating strings.
129 //!
130 //! For converting to strings use the [`format!`] macro, and for converting from
131 //! strings use the [`FromStr`] trait.
132 //!
133 //! Data may be shared by placing it in a reference-counted box or the [`Rc`]
134 //! type, and if further contained in a [`Cell`] or [`RefCell`], may be mutated
135 //! as well as shared. Likewise, in a concurrent setting it is common to pair an
136 //! atomically-reference-counted box, [`Arc`], with a [`Mutex`] to get the same
137 //! effect.
138 //!
139 //! The [`collections`] module defines maps, sets, linked lists and other
140 //! typical collection types, including the common [`HashMap<K, V>`].
141 //!
142 //! ## Platform abstractions and I/O
143 //!
144 //! Besides basic data types, the standard library is largely concerned with
145 //! abstracting over differences in common platforms, most notably Windows and
146 //! Unix derivatives.
147 //!
148 //! Common types of I/O, including [files], [TCP], [UDP], are defined in the
149 //! [`io`], [`fs`], and [`net`] modules.
150 //!
151 //! The [`thread`] module contains Rust's threading abstractions. [`sync`]
152 //! contains further primitive shared memory types, including [`atomic`] and
153 //! [`mpsc`], which contains the channel types for message passing.
154 //!
155 //! [I/O]: io/index.html
156 //! [`MIN`]: i32/constant.MIN.html
157 //! [TCP]: net/struct.TcpStream.html
158 //! [The Rust Prelude]: prelude/index.html
159 //! [UDP]: net/struct.UdpSocket.html
160 //! [`Arc`]: sync/struct.Arc.html
161 //! [owned slice]: boxed/index.html
162 //! [`Cell`]: cell/struct.Cell.html
163 //! [`FromStr`]: str/trait.FromStr.html
164 //! [`HashMap<K, V>`]: collections/struct.HashMap.html
165 //! [`Iterator`]: iter/trait.Iterator.html
166 //! [`Mutex`]: sync/struct.Mutex.html
167 //! [`Option<T>`]: option/enum.Option.html
168 //! [`Rc`]: rc/struct.Rc.html
169 //! [`RefCell`]: cell/struct.RefCell.html
170 //! [`Result<T, E>`]: result/enum.Result.html
171 //! [`String`]: string/struct.String.html
172 //! [`Vec<T>`]: vec/struct.Vec.html
173 //! [array]: primitive.array.html
174 //! [slice]: primitive.slice.html
175 //! [`atomic`]: sync/atomic/index.html
176 //! [`collections`]: collections/index.html
177 //! [`for`]: ../book/ch03-05-control-flow.html#looping-through-a-collection-with-for
178 //! [`format!`]: macro.format.html
179 //! [`fs`]: fs/index.html
180 //! [`io`]: io/index.html
181 //! [`iter`]: iter/index.html
182 //! [`mpsc`]: sync/mpsc/index.html
183 //! [`net`]: net/index.html
184 //! [`option`]: option/index.html
185 //! [`result`]: result/index.html
186 //! [`std::cmp`]: cmp/index.html
187 //! [`std::slice`]: slice/index.html
188 //! [`str`]: primitive.str.html
189 //! [`sync`]: sync/index.html
190 //! [`thread`]: thread/index.html
191 //! [`use std::env`]: env/index.html
192 //! [`use`]: ../book/ch07-02-defining-modules-to-control-scope-and-privacy.html
193 //! [crates.io]: https://crates.io
194 //! [deref-coercions]: ../book/ch15-02-deref.html#implicit-deref-coercions-with-functions-and-methods
195 //! [files]: fs/struct.File.html
196 //! [multithreading]: thread/index.html
197 //! [other]: #what-is-in-the-standard-library-documentation
198 //! [primitive types]: ../book/ch03-02-data-types.html
199 //! [rust-discord]: https://discord.gg/rust-lang
200
201 #![cfg_attr(not(feature = "restricted-std"), stable(feature = "rust1", since = "1.0.0"))]
202 #![cfg_attr(feature = "restricted-std", unstable(feature = "restricted_std", issue = "none"))]
203 #![doc(
204     html_root_url = "https://doc.rust-lang.org/nightly/",
205     html_playground_url = "https://play.rust-lang.org/",
206     issue_tracker_base_url = "https://github.com/rust-lang/rust/issues/",
207     test(no_crate_inject, attr(deny(warnings))),
208     test(attr(allow(dead_code, deprecated, unused_variables, unused_mut)))
209 )]
210 // Don't link to std. We are std.
211 #![no_std]
212 #![warn(deprecated_in_future)]
213 #![warn(missing_docs)]
214 #![warn(missing_debug_implementations)]
215 #![deny(intra_doc_link_resolution_failure)] // rustdoc is run without -D warnings
216 #![allow(explicit_outlives_requirements)]
217 #![allow(unused_lifetimes)]
218 // Tell the compiler to link to either panic_abort or panic_unwind
219 #![needs_panic_runtime]
220 // std may use features in a platform-specific way
221 #![allow(unused_features)]
222 #![cfg_attr(test, feature(print_internals, set_stdio, update_panic_count))]
223 #![cfg_attr(
224     all(target_vendor = "fortanix", target_env = "sgx"),
225     feature(slice_index_methods, coerce_unsized, sgx_platform, ptr_wrapping_offset_from)
226 )]
227 #![cfg_attr(all(test, target_vendor = "fortanix", target_env = "sgx"), feature(fixed_size_array))]
228 // std is implemented with unstable features, many of which are internal
229 // compiler details that will never be stable
230 // NB: the following list is sorted to minimize merge conflicts.
231 #![feature(alloc_error_handler)]
232 #![feature(alloc_layout_extra)]
233 #![feature(allocator_api)]
234 #![feature(allocator_internals)]
235 #![feature(allow_internal_unsafe)]
236 #![feature(allow_internal_unstable)]
237 #![feature(arbitrary_self_types)]
238 #![feature(array_error_internals)]
239 #![feature(asm)]
240 #![feature(associated_type_bounds)]
241 #![feature(atomic_mut_ptr)]
242 #![feature(box_syntax)]
243 #![feature(c_variadic)]
244 #![feature(can_vector)]
245 #![feature(cfg_accessible)]
246 #![feature(cfg_target_has_atomic)]
247 #![feature(cfg_target_thread_local)]
248 #![feature(char_error_internals)]
249 #![feature(char_internals)]
250 #![feature(clamp)]
251 #![feature(concat_idents)]
252 #![feature(const_cstr_unchecked)]
253 #![feature(const_raw_ptr_deref)]
254 #![feature(container_error_extra)]
255 #![feature(core_intrinsics)]
256 #![feature(custom_test_frameworks)]
257 #![feature(decl_macro)]
258 #![feature(doc_alias)]
259 #![feature(doc_cfg)]
260 #![feature(doc_keyword)]
261 #![feature(doc_masked)]
262 #![cfg_attr(not(bootstrap), feature(doc_spotlight))]
263 #![feature(dropck_eyepatch)]
264 #![feature(duration_constants)]
265 #![feature(exact_size_is_empty)]
266 #![feature(exhaustive_patterns)]
267 #![feature(extend_one)]
268 #![feature(external_doc)]
269 #![feature(fn_traits)]
270 #![feature(format_args_nl)]
271 #![feature(future_readiness_fns)]
272 #![feature(gen_future)]
273 #![feature(generator_trait)]
274 #![feature(global_asm)]
275 #![feature(hash_raw_entry)]
276 #![feature(hashmap_internals)]
277 #![feature(int_error_internals)]
278 #![feature(int_error_matching)]
279 #![feature(integer_atomics)]
280 #![feature(into_future)]
281 #![feature(lang_items)]
282 #![feature(libc)]
283 #![feature(link_args)]
284 #![feature(linkage)]
285 #![feature(llvm_asm)]
286 #![feature(log_syntax)]
287 #![feature(maybe_uninit_extra)]
288 #![feature(maybe_uninit_ref)]
289 #![feature(maybe_uninit_slice)]
290 #![feature(min_specialization)]
291 #![feature(needs_panic_runtime)]
292 #![feature(negative_impls)]
293 #![feature(never_type)]
294 #![feature(nll)]
295 #![feature(once_cell)]
296 #![feature(optin_builtin_traits)]
297 #![feature(or_patterns)]
298 #![feature(panic_info_message)]
299 #![feature(panic_internals)]
300 #![feature(panic_unwind)]
301 #![feature(prelude_import)]
302 #![feature(ptr_internals)]
303 #![feature(raw)]
304 #![feature(raw_ref_macros)]
305 #![feature(ready_macro)]
306 #![feature(renamed_spin_loop)]
307 #![feature(rustc_attrs)]
308 #![feature(rustc_private)]
309 #![feature(shrink_to)]
310 #![feature(slice_concat_ext)]
311 #![feature(slice_internals)]
312 #![feature(slice_strip)]
313 #![feature(staged_api)]
314 #![feature(std_internals)]
315 #![feature(stdsimd)]
316 #![feature(stmt_expr_attributes)]
317 #![feature(str_internals)]
318 #![feature(test)]
319 #![feature(thread_local)]
320 #![feature(toowned_clone_into)]
321 #![feature(total_cmp)]
322 #![feature(trace_macros)]
323 #![feature(try_reserve)]
324 #![feature(unboxed_closures)]
325 #![feature(unsafe_block_in_unsafe_fn)]
326 #![feature(untagged_unions)]
327 #![feature(unwind_attributes)]
328 #![feature(vec_into_raw_parts)]
329 #![feature(wake_trait)]
330 // NB: the above list is sorted to minimize merge conflicts.
331 #![default_lib_allocator]
332
333 // Explicitly import the prelude. The compiler uses this same unstable attribute
334 // to import the prelude implicitly when building crates that depend on std.
335 #[prelude_import]
336 #[allow(unused)]
337 use prelude::v1::*;
338
339 // Access to Bencher, etc.
340 #[cfg(test)]
341 extern crate test;
342
343 #[allow(unused_imports)] // macros from `alloc` are not used on all platforms
344 #[macro_use]
345 extern crate alloc as alloc_crate;
346 #[doc(masked)]
347 #[allow(unused_extern_crates)]
348 extern crate libc;
349
350 // We always need an unwinder currently for backtraces
351 #[doc(masked)]
352 #[allow(unused_extern_crates)]
353 extern crate unwind;
354
355 // During testing, this crate is not actually the "real" std library, but rather
356 // it links to the real std library, which was compiled from this same source
357 // code. So any lang items std defines are conditionally excluded (or else they
358 // would generate duplicate lang item errors), and any globals it defines are
359 // _not_ the globals used by "real" std. So this import, defined only during
360 // testing gives test-std access to real-std lang items and globals. See #2912
361 #[cfg(test)]
362 extern crate std as realstd;
363
364 // The standard macros that are not built-in to the compiler.
365 #[macro_use]
366 mod macros;
367
368 // The Rust prelude
369 pub mod prelude;
370
371 // Public module declarations and re-exports
372 #[stable(feature = "rust1", since = "1.0.0")]
373 pub use alloc_crate::borrow;
374 #[stable(feature = "rust1", since = "1.0.0")]
375 pub use alloc_crate::boxed;
376 #[stable(feature = "rust1", since = "1.0.0")]
377 pub use alloc_crate::fmt;
378 #[stable(feature = "rust1", since = "1.0.0")]
379 pub use alloc_crate::format;
380 #[stable(feature = "rust1", since = "1.0.0")]
381 pub use alloc_crate::rc;
382 #[stable(feature = "rust1", since = "1.0.0")]
383 pub use alloc_crate::slice;
384 #[stable(feature = "rust1", since = "1.0.0")]
385 pub use alloc_crate::str;
386 #[stable(feature = "rust1", since = "1.0.0")]
387 pub use alloc_crate::string;
388 #[stable(feature = "rust1", since = "1.0.0")]
389 pub use alloc_crate::vec;
390 #[stable(feature = "rust1", since = "1.0.0")]
391 pub use core::any;
392 #[stable(feature = "simd_arch", since = "1.27.0")]
393 #[doc(no_inline)]
394 pub use core::arch;
395 #[stable(feature = "core_array", since = "1.36.0")]
396 pub use core::array;
397 #[stable(feature = "rust1", since = "1.0.0")]
398 pub use core::cell;
399 #[stable(feature = "rust1", since = "1.0.0")]
400 pub use core::char;
401 #[stable(feature = "rust1", since = "1.0.0")]
402 pub use core::clone;
403 #[stable(feature = "rust1", since = "1.0.0")]
404 pub use core::cmp;
405 #[stable(feature = "rust1", since = "1.0.0")]
406 pub use core::convert;
407 #[stable(feature = "rust1", since = "1.0.0")]
408 pub use core::default;
409 #[stable(feature = "rust1", since = "1.0.0")]
410 pub use core::hash;
411 #[stable(feature = "core_hint", since = "1.27.0")]
412 pub use core::hint;
413 #[stable(feature = "i128", since = "1.26.0")]
414 pub use core::i128;
415 #[stable(feature = "rust1", since = "1.0.0")]
416 pub use core::i16;
417 #[stable(feature = "rust1", since = "1.0.0")]
418 pub use core::i32;
419 #[stable(feature = "rust1", since = "1.0.0")]
420 pub use core::i64;
421 #[stable(feature = "rust1", since = "1.0.0")]
422 pub use core::i8;
423 #[stable(feature = "rust1", since = "1.0.0")]
424 pub use core::intrinsics;
425 #[stable(feature = "rust1", since = "1.0.0")]
426 pub use core::isize;
427 #[stable(feature = "rust1", since = "1.0.0")]
428 pub use core::iter;
429 #[stable(feature = "rust1", since = "1.0.0")]
430 pub use core::marker;
431 #[stable(feature = "rust1", since = "1.0.0")]
432 pub use core::mem;
433 #[stable(feature = "rust1", since = "1.0.0")]
434 pub use core::ops;
435 #[stable(feature = "rust1", since = "1.0.0")]
436 pub use core::option;
437 #[stable(feature = "pin", since = "1.33.0")]
438 pub use core::pin;
439 #[stable(feature = "rust1", since = "1.0.0")]
440 pub use core::ptr;
441 #[stable(feature = "rust1", since = "1.0.0")]
442 pub use core::raw;
443 #[stable(feature = "rust1", since = "1.0.0")]
444 pub use core::result;
445 #[stable(feature = "i128", since = "1.26.0")]
446 pub use core::u128;
447 #[stable(feature = "rust1", since = "1.0.0")]
448 pub use core::u16;
449 #[stable(feature = "rust1", since = "1.0.0")]
450 pub use core::u32;
451 #[stable(feature = "rust1", since = "1.0.0")]
452 pub use core::u64;
453 #[stable(feature = "rust1", since = "1.0.0")]
454 pub use core::u8;
455 #[stable(feature = "rust1", since = "1.0.0")]
456 pub use core::usize;
457
458 pub mod f32;
459 pub mod f64;
460
461 #[macro_use]
462 pub mod thread;
463 pub mod ascii;
464 pub mod backtrace;
465 pub mod collections;
466 pub mod env;
467 pub mod error;
468 pub mod ffi;
469 pub mod fs;
470 pub mod io;
471 pub mod net;
472 pub mod num;
473 pub mod os;
474 pub mod panic;
475 pub mod path;
476 pub mod process;
477 pub mod sync;
478 pub mod time;
479
480 #[unstable(feature = "once_cell", issue = "74465")]
481 pub mod lazy;
482
483 #[stable(feature = "futures_api", since = "1.36.0")]
484 pub mod task {
485     //! Types and Traits for working with asynchronous tasks.
486
487     #[doc(inline)]
488     #[stable(feature = "futures_api", since = "1.36.0")]
489     pub use core::task::*;
490
491     #[doc(inline)]
492     #[unstable(feature = "wake_trait", issue = "69912")]
493     pub use alloc::task::*;
494 }
495
496 #[stable(feature = "futures_api", since = "1.36.0")]
497 pub mod future;
498
499 // Platform-abstraction modules
500 #[macro_use]
501 mod sys_common;
502 mod sys;
503
504 pub mod alloc;
505
506 // Private support modules
507 mod memchr;
508 mod panicking;
509
510 // The runtime entry point and a few unstable public functions used by the
511 // compiler
512 pub mod rt;
513
514 #[path = "../backtrace/src/lib.rs"]
515 #[allow(dead_code, unused_attributes)]
516 mod backtrace_rs;
517
518 // Pull in the `std_detect` crate directly into libstd. The contents of
519 // `std_detect` are in a different repository: rust-lang/stdarch.
520 //
521 // `std_detect` depends on libstd, but the contents of this module are
522 // set up in such a way that directly pulling it here works such that the
523 // crate uses the this crate as its libstd.
524 #[path = "../stdarch/crates/std_detect/src/mod.rs"]
525 #[allow(missing_debug_implementations, missing_docs, dead_code)]
526 #[unstable(feature = "stdsimd", issue = "48556")]
527 #[cfg(not(test))]
528 mod std_detect;
529
530 #[doc(hidden)]
531 #[unstable(feature = "stdsimd", issue = "48556")]
532 #[cfg(not(test))]
533 pub use std_detect::detect;
534
535 // Re-export macros defined in libcore.
536 #[stable(feature = "rust1", since = "1.0.0")]
537 #[allow(deprecated, deprecated_in_future)]
538 pub use core::{
539     assert_eq, assert_ne, debug_assert, debug_assert_eq, debug_assert_ne, matches, r#try, todo,
540     unimplemented, unreachable, write, writeln,
541 };
542
543 // Re-export built-in macros defined through libcore.
544 #[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
545 #[allow(deprecated)]
546 pub use core::{
547     asm, assert, cfg, column, compile_error, concat, concat_idents, env, file, format_args,
548     format_args_nl, global_asm, include, include_bytes, include_str, line, llvm_asm, log_syntax,
549     module_path, option_env, stringify, trace_macros,
550 };
551
552 #[stable(feature = "core_primitive", since = "1.43.0")]
553 pub use core::primitive;
554
555 // Include a number of private modules that exist solely to provide
556 // the rustdoc documentation for primitive types. Using `include!`
557 // because rustdoc only looks for these modules at the crate level.
558 include!("primitive_docs.rs");
559
560 // Include a number of private modules that exist solely to provide
561 // the rustdoc documentation for the existing keywords. Using `include!`
562 // because rustdoc only looks for these modules at the crate level.
563 include!("keyword_docs.rs");
564
565 // This is required to avoid an unstable error when `restricted-std` is not
566 // enabled. The use of #![feature(restricted_std)] in rustc-std-workspace-std
567 // is unconditional, so the unstable feature needs to be defined somewhere.
568 #[cfg_attr(not(feature = "restricted-std"), unstable(feature = "restricted_std", issue = "none"))]
569 mod __restricted_std_workaround {}