From 2788c71dd44f0badd88a8a9971b5ce23e95905b7 Mon Sep 17 00:00:00 2001 From: qwerty01 Date: Thu, 10 Jun 2021 11:28:26 -0400 Subject: [PATCH 01/12] Updates `Clone` docs for `Copy` comparison. --- library/core/src/clone.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/core/src/clone.rs b/library/core/src/clone.rs index 51a2dc03de318..19faf9cddac6f 100644 --- a/library/core/src/clone.rs +++ b/library/core/src/clone.rs @@ -38,7 +38,7 @@ /// A common trait for the ability to explicitly duplicate an object. /// -/// Differs from [`Copy`] in that [`Copy`] is implicit and extremely inexpensive, while +/// Differs from [`Copy`] in that [`Copy`] is implicit and an inexpensive bit-wise copy, while /// `Clone` is always explicit and may or may not be expensive. In order to enforce /// these characteristics, Rust does not allow you to reimplement [`Copy`], but you /// may reimplement `Clone` and run arbitrary code. From cb65b48c06406efd21c96372fff2840c957c8798 Mon Sep 17 00:00:00 2001 From: Taylor Yu Date: Thu, 10 Jun 2021 22:25:11 -0500 Subject: [PATCH 02/12] fix wording in option doc Fix some awkward wording in the `core::option` documentation in the "Options and pointers" section. --- library/core/src/option.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/core/src/option.rs b/library/core/src/option.rs index 4e7afca6a4930..0dd182203dfce 100644 --- a/library/core/src/option.rs +++ b/library/core/src/option.rs @@ -50,8 +50,8 @@ //! the optional owned box, [`Option`]`<`[`Box`]`>`. //! //! The following example uses [`Option`] to create an optional box of -//! [`i32`]. Notice that in order to use the inner [`i32`] value first, the -//! `check_optional` function needs to use pattern matching to +//! [`i32`]. Notice that in order to use the inner [`i32`] value, the +//! `check_optional` function first needs to use pattern matching to //! determine whether the box has a value (i.e., it is [`Some(...)`][`Some`]) or //! not ([`None`]). //! From 4763377a96691997e03e27f7b292e7dcd5e7a53d Mon Sep 17 00:00:00 2001 From: Taylor Yu Date: Thu, 10 Jun 2021 22:27:27 -0500 Subject: [PATCH 03/12] fix typo in option doc Fix a typo/missed replacement in the documentation for `impl From<&Option> for Option<&T>` in `core::option`. --- library/core/src/option.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/core/src/option.rs b/library/core/src/option.rs index 0dd182203dfce..aedfe88f68878 100644 --- a/library/core/src/option.rs +++ b/library/core/src/option.rs @@ -1350,7 +1350,7 @@ impl<'a, T> From<&'a Option> for Option<&'a T> { /// /// Converts an `Option<`[`String`]`>` into an `Option<`[`usize`]`>`, preserving the original. /// The [`map`] method takes the `self` argument by value, consuming the original, - /// so this technique uses `as_ref` to first take an `Option` to a reference + /// so this technique uses `from` to first take an `Option` to a reference /// to the value inside the original. /// /// [`map`]: Option::map From 00a5ec13757b3830248f4822e5012ec304bf3647 Mon Sep 17 00:00:00 2001 From: Ellen Date: Sat, 12 Jun 2021 09:56:25 +0100 Subject: [PATCH 04/12] dont ICE on `ConstEvaluatable` predicates --- src/librustdoc/clean/mod.rs | 2 +- src/test/rustdoc/const-generics/const-evaluatable-checked.rs | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 src/test/rustdoc/const-generics/const-evaluatable-checked.rs diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index d1c18821ea644..61507d5ddca25 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -350,12 +350,12 @@ impl<'a> Clean> for ty::Predicate<'a> { ty::PredicateKind::RegionOutlives(pred) => pred.clean(cx), ty::PredicateKind::TypeOutlives(pred) => pred.clean(cx), ty::PredicateKind::Projection(pred) => Some(pred.clean(cx)), + ty::PredicateKind::ConstEvaluatable(..) => None, ty::PredicateKind::Subtype(..) | ty::PredicateKind::WellFormed(..) | ty::PredicateKind::ObjectSafe(..) | ty::PredicateKind::ClosureKind(..) - | ty::PredicateKind::ConstEvaluatable(..) | ty::PredicateKind::ConstEquate(..) | ty::PredicateKind::TypeWellFormedFromEnv(..) => panic!("not user writable"), } diff --git a/src/test/rustdoc/const-generics/const-evaluatable-checked.rs b/src/test/rustdoc/const-generics/const-evaluatable-checked.rs new file mode 100644 index 0000000000000..2ba55559181b5 --- /dev/null +++ b/src/test/rustdoc/const-generics/const-evaluatable-checked.rs @@ -0,0 +1,5 @@ +#![crate_name = "foo"] +#![feature(const_evaluatable_checked, const_generics)] +#![allow(incomplete_features)] +// make sure that `ConstEvaluatable` predicates dont cause rustdoc to ICE #77647 +pub struct Ice where [(); N + 1]:; \ No newline at end of file From 9a75381f64d1988f78649833ef92cdf4482619e8 Mon Sep 17 00:00:00 2001 From: Ellen Date: Sat, 12 Jun 2021 10:18:51 +0100 Subject: [PATCH 05/12] line --- src/test/rustdoc/const-generics/const-evaluatable-checked.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/rustdoc/const-generics/const-evaluatable-checked.rs b/src/test/rustdoc/const-generics/const-evaluatable-checked.rs index 2ba55559181b5..0952f94f26804 100644 --- a/src/test/rustdoc/const-generics/const-evaluatable-checked.rs +++ b/src/test/rustdoc/const-generics/const-evaluatable-checked.rs @@ -2,4 +2,4 @@ #![feature(const_evaluatable_checked, const_generics)] #![allow(incomplete_features)] // make sure that `ConstEvaluatable` predicates dont cause rustdoc to ICE #77647 -pub struct Ice where [(); N + 1]:; \ No newline at end of file +pub struct Ice where [(); N + 1]:; From 94de92ddc71cb517a4d81f2b851b2871a1fc7fba Mon Sep 17 00:00:00 2001 From: Ellen Date: Sat, 12 Jun 2021 16:35:18 +0100 Subject: [PATCH 06/12] add `@has` --- src/test/rustdoc/const-generics/const-evaluatable-checked.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/test/rustdoc/const-generics/const-evaluatable-checked.rs b/src/test/rustdoc/const-generics/const-evaluatable-checked.rs index 0952f94f26804..1c074fdb3f882 100644 --- a/src/test/rustdoc/const-generics/const-evaluatable-checked.rs +++ b/src/test/rustdoc/const-generics/const-evaluatable-checked.rs @@ -2,4 +2,6 @@ #![feature(const_evaluatable_checked, const_generics)] #![allow(incomplete_features)] // make sure that `ConstEvaluatable` predicates dont cause rustdoc to ICE #77647 +// @has foo/struct.Ice.html '//pre[@class="rust struct"]' \ +// 'pub struct Ice where [(); N + 1]: ;' pub struct Ice where [(); N + 1]:; From d7db9698e66084154a5e87a7268b21a17b4171b8 Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Mon, 14 Jun 2021 08:17:11 +0900 Subject: [PATCH 07/12] Add a regression test for issue-76510 --- .../const-mut-refs/issue-76510.32bit.stderr | 36 +++++++++++++++++++ .../const-mut-refs/issue-76510.64bit.stderr | 36 +++++++++++++++++++ .../ui/consts/const-mut-refs/issue-76510.rs | 18 ++++++++++ 3 files changed, 90 insertions(+) create mode 100644 src/test/ui/consts/const-mut-refs/issue-76510.32bit.stderr create mode 100644 src/test/ui/consts/const-mut-refs/issue-76510.64bit.stderr create mode 100644 src/test/ui/consts/const-mut-refs/issue-76510.rs diff --git a/src/test/ui/consts/const-mut-refs/issue-76510.32bit.stderr b/src/test/ui/consts/const-mut-refs/issue-76510.32bit.stderr new file mode 100644 index 0000000000000..965bc67a381ae --- /dev/null +++ b/src/test/ui/consts/const-mut-refs/issue-76510.32bit.stderr @@ -0,0 +1,36 @@ +error[E0764]: mutable references are not allowed in the final value of constants + --> $DIR/issue-76510.rs:5:29 + | +LL | const S: &'static mut str = &mut " hello "; + | ^^^^^^^^^^^^^^ + +error[E0658]: mutation through a reference is not allowed in constants + --> $DIR/issue-76510.rs:5:29 + | +LL | const S: &'static mut str = &mut " hello "; + | ^^^^^^^^^^^^^^ + | + = note: see issue #57349 for more information + = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + +error[E0596]: cannot borrow data in a `&` reference as mutable + --> $DIR/issue-76510.rs:5:29 + | +LL | const S: &'static mut str = &mut " hello "; + | ^^^^^^^^^^^^^^ cannot borrow as mutable + +error[E0080]: it is undefined behavior to use this value + --> $DIR/issue-76510.rs:5:1 + | +LL | const S: &'static mut str = &mut " hello "; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered mutable reference in a `const` + | + = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. + = note: the raw bytes of the constant (size: 8, align: 4) { + ╾─alloc2──╼ 07 00 00 00 │ ╾──╼.... + } + +error: aborting due to 4 previous errors + +Some errors have detailed explanations: E0080, E0596, E0658, E0764. +For more information about an error, try `rustc --explain E0080`. diff --git a/src/test/ui/consts/const-mut-refs/issue-76510.64bit.stderr b/src/test/ui/consts/const-mut-refs/issue-76510.64bit.stderr new file mode 100644 index 0000000000000..ac7d5993585e8 --- /dev/null +++ b/src/test/ui/consts/const-mut-refs/issue-76510.64bit.stderr @@ -0,0 +1,36 @@ +error[E0764]: mutable references are not allowed in the final value of constants + --> $DIR/issue-76510.rs:5:29 + | +LL | const S: &'static mut str = &mut " hello "; + | ^^^^^^^^^^^^^^ + +error[E0658]: mutation through a reference is not allowed in constants + --> $DIR/issue-76510.rs:5:29 + | +LL | const S: &'static mut str = &mut " hello "; + | ^^^^^^^^^^^^^^ + | + = note: see issue #57349 for more information + = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + +error[E0596]: cannot borrow data in a `&` reference as mutable + --> $DIR/issue-76510.rs:5:29 + | +LL | const S: &'static mut str = &mut " hello "; + | ^^^^^^^^^^^^^^ cannot borrow as mutable + +error[E0080]: it is undefined behavior to use this value + --> $DIR/issue-76510.rs:5:1 + | +LL | const S: &'static mut str = &mut " hello "; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered mutable reference in a `const` + | + = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. + = note: the raw bytes of the constant (size: 16, align: 8) { + ╾───────alloc2────────╼ 07 00 00 00 00 00 00 00 │ ╾──────╼........ + } + +error: aborting due to 4 previous errors + +Some errors have detailed explanations: E0080, E0596, E0658, E0764. +For more information about an error, try `rustc --explain E0080`. diff --git a/src/test/ui/consts/const-mut-refs/issue-76510.rs b/src/test/ui/consts/const-mut-refs/issue-76510.rs new file mode 100644 index 0000000000000..892f6c98116c2 --- /dev/null +++ b/src/test/ui/consts/const-mut-refs/issue-76510.rs @@ -0,0 +1,18 @@ +// stderr-per-bitwidth + +use std::mem::{transmute, ManuallyDrop}; + +const S: &'static mut str = &mut " hello "; +//~^ ERROR: mutable references are not allowed in the final value of constants +//~| ERROR: mutation through a reference is not allowed in constants +//~| ERROR: cannot borrow data in a `&` reference as mutable +//~| ERROR: it is undefined behavior to use this value + +const fn trigger() -> [(); unsafe { + let s = transmute::<(*const u8, usize), &ManuallyDrop>((S.as_ptr(), 3)); + 0 + }] { + [(); 0] +} + +fn main() {} From 6a66b79fb6b85f01aeaa1cd339160957a98c97a6 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Mon, 14 Jun 2021 16:40:10 +0200 Subject: [PATCH 08/12] Allow to run only a few GUI tests --- src/bootstrap/test.rs | 9 ++++++++- src/tools/rustdoc-gui/tester.js | 18 +++++++++++++++--- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs index fe4666effe622..0b7a0e25df1ac 100644 --- a/src/bootstrap/test.rs +++ b/src/bootstrap/test.rs @@ -805,7 +805,7 @@ impl Step for RustdocGUI { fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> { let builder = run.builder; - let run = run.path("src/test/rustdoc-gui"); + let run = run.suite_path("src/test/rustdoc-gui"); run.default_condition( builder.config.nodejs.is_some() && builder @@ -870,6 +870,13 @@ impl Step for RustdocGUI { .arg(out_dir) .arg("--tests-folder") .arg(builder.build.src.join("src/test/rustdoc-gui")); + for path in &builder.paths { + if let Some(name) = path.file_name().and_then(|f| f.to_str()) { + if name.ends_with(".goml") { + command.arg("--file").arg(name); + } + } + } builder.run(&mut command); } } diff --git a/src/tools/rustdoc-gui/tester.js b/src/tools/rustdoc-gui/tester.js index c55e014e834d4..8c8d86d5e3817 100644 --- a/src/tools/rustdoc-gui/tester.js +++ b/src/tools/rustdoc-gui/tester.js @@ -10,6 +10,7 @@ const {Options, runTest} = require('browser-ui-test'); function showHelp() { console.log("rustdoc-js options:"); console.log(" --doc-folder [PATH] : location of the generated doc folder"); + console.log(" --file [PATH] : file to run (can be repeated)"); console.log(" --help : show this message then quit"); console.log(" --tests-folder [PATH] : location of the .GOML tests folder"); } @@ -18,6 +19,7 @@ function parseOptions(args) { var opts = { "doc_folder": "", "tests_folder": "", + "files": [], }; var correspondances = { "--doc-folder": "doc_folder", @@ -26,13 +28,18 @@ function parseOptions(args) { for (var i = 0; i < args.length; ++i) { if (args[i] === "--doc-folder" - || args[i] === "--tests-folder") { + || args[i] === "--tests-folder" + || args[i] === "--file") { i += 1; if (i >= args.length) { console.log("Missing argument after `" + args[i - 1] + "` option."); return null; } - opts[correspondances[args[i - 1]]] = args[i]; + if (args[i - 1] !== "--file") { + opts[correspondances[args[i - 1]]] = args[i]; + } else { + opts["files"].push(args[i]); + } } else if (args[i] === "--help") { showHelp(); process.exit(0); @@ -78,7 +85,12 @@ async function main(argv) { } let failed = false; - let files = fs.readdirSync(opts["tests_folder"]).filter(file => path.extname(file) == ".goml"); + let files; + if (opts["files"].length === 0) { + files = fs.readdirSync(opts["tests_folder"]).filter(file => path.extname(file) == ".goml"); + } else { + files = opts["files"].filter(file => path.extname(file) == ".goml"); + } files.sort(); for (var i = 0; i < files.length; ++i) { From 084794ed164199619d9bd6e5422b4feaee4a0a9a Mon Sep 17 00:00:00 2001 From: Arpad Borsos Date: Fri, 14 May 2021 11:04:48 +0200 Subject: [PATCH 09/12] Avoid possible filename collision in coverage tests Previously, coverage tests were writing profiler data to files based on their pid. As rustdoc spawns each doctest as its own process, it might be possible in rare cases that a pid is being reused which would cause a file to be overwritten, leading to incorrect coverage results. --- .../run-make-fulldeps/coverage-reports/Makefile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/test/run-make-fulldeps/coverage-reports/Makefile b/src/test/run-make-fulldeps/coverage-reports/Makefile index d3d398f1fac29..78fbf811f12bf 100644 --- a/src/test/run-make-fulldeps/coverage-reports/Makefile +++ b/src/test/run-make-fulldeps/coverage-reports/Makefile @@ -87,7 +87,7 @@ endif # Run it in order to generate some profiling data, # with `LLVM_PROFILE_FILE=` environment variable set to # output the coverage stats for this run. - LLVM_PROFILE_FILE="$(TMPDIR)"/$@-%p.profraw \ + LLVM_PROFILE_FILE="$(TMPDIR)"/$@.profraw \ $(call RUN,$@) || \ ( \ status=$$?; \ @@ -97,8 +97,11 @@ endif ) \ ) - # Run it through rustdoc as well to cover doctests - LLVM_PROFILE_FILE="$(TMPDIR)"/$@-%p.profraw \ + # Run it through rustdoc as well to cover doctests. + # `%p` is the pid, and `%m` the binary signature. We suspect that the pid alone + # might result in overwritten files and failed tests, as rustdoc spawns each + # doctest as its own process, so make sure the filename is as unique as possible. + LLVM_PROFILE_FILE="$(TMPDIR)"/$@-%p-%m.profraw \ $(RUSTDOC) --crate-name workaround_for_79771 --test $(SOURCEDIR)/$@.rs \ $$( sed -n 's/^\/\/ compile-flags: \([^#]*\).*/\1/p' $(SOURCEDIR)/$@.rs ) \ -L "$(TMPDIR)" -Zinstrument-coverage \ @@ -106,7 +109,7 @@ endif # Postprocess the profiling data so it can be used by the llvm-cov tool "$(LLVM_BIN_DIR)"/llvm-profdata merge --sparse \ - "$(TMPDIR)"/$@-*.profraw \ + "$(TMPDIR)"/$@*.profraw \ -o "$(TMPDIR)"/$@.profdata # Generate a coverage report using `llvm-cov show`. @@ -118,8 +121,7 @@ endif --instr-profile="$(TMPDIR)"/$@.profdata \ $(call BIN,"$(TMPDIR)"/$@) \ $$( \ - for file in $(TMPDIR)/rustdoc-$@/*/rust_out; \ - do \ + for file in $(TMPDIR)/rustdoc-$@/*/rust_out; do \ [ -x "$$file" ] && printf "%s %s " -object $$file; \ done \ ) \ From 91f491ecf27f39c1ebba48c7e011a212dde7013c Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Tue, 15 Jun 2021 14:52:16 +0200 Subject: [PATCH 10/12] Don't mark "safe" intrinsics as unsafe --- src/librustdoc/clean/mod.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index d1c18821ea644..2281a9f69ee34 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -26,6 +26,8 @@ use rustc_mir::const_eval::{is_const_fn, is_unstable_const_fn}; use rustc_span::hygiene::{AstPass, MacroKind}; use rustc_span::symbol::{kw, sym, Ident, Symbol}; use rustc_span::{self, ExpnKind}; +use rustc_target::spec::abi::Abi; +use rustc_typeck::check::intrinsic::intrinsic_operation_unsafety; use rustc_typeck::hir_ty_to_ty; use std::collections::hash_map::Entry; @@ -2132,7 +2134,11 @@ impl Clean for (&hir::ForeignItem<'_>, Option) { decl, generics, header: hir::FnHeader { - unsafety: hir::Unsafety::Unsafe, + unsafety: if abi == Abi::RustIntrinsic { + intrinsic_operation_unsafety(item.ident.name) + } else { + hir::Unsafety::Unsafe + }, abi, constness: hir::Constness::NotConst, asyncness: hir::IsAsync::NotAsync, From f6830403b3ba09ab8e3b07845061b5fbd30e249d Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Tue, 15 Jun 2021 16:08:18 +0200 Subject: [PATCH 11/12] Add test for safe intrinsics --- src/test/rustdoc/safe-intrinsic.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/test/rustdoc/safe-intrinsic.rs diff --git a/src/test/rustdoc/safe-intrinsic.rs b/src/test/rustdoc/safe-intrinsic.rs new file mode 100644 index 0000000000000..d3bb8514b7e43 --- /dev/null +++ b/src/test/rustdoc/safe-intrinsic.rs @@ -0,0 +1,20 @@ +#![feature(intrinsics)] +#![feature(no_core)] + +#![no_core] +#![crate_name = "foo"] + +extern "rust-intrinsic" { + // @has 'foo/fn.abort.html' + // @has - '//pre[@class="rust fn"]' 'pub extern "rust-intrinsic" fn abort() -> !' + pub fn abort() -> !; + // @has 'foo/fn.unreachable.html' + // @has - '//pre[@class="rust fn"]' 'pub unsafe extern "rust-intrinsic" fn unreachable() -> !' + pub fn unreachable() -> !; +} + +extern "C" { + // @has 'foo/fn.needs_drop.html' + // @has - '//pre[@class="rust fn"]' 'pub unsafe extern "C" fn needs_drop() -> !' + pub fn needs_drop() -> !; +} From 5781cb546c60e6f42983500f3959c8945954190a Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Wed, 16 Jun 2021 09:54:39 +0900 Subject: [PATCH 12/12] Remove some duplicate `char` assoc items on RELEASES.md --- RELEASES.md | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/RELEASES.md b/RELEASES.md index 8adc450ac9869..a49091373df9f 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -81,13 +81,6 @@ Stabilised APIs - [`Vec::extend_from_within`] - [`array::from_mut`] - [`array::from_ref`] -- [`char::MAX`] -- [`char::REPLACEMENT_CHARACTER`] -- [`char::UNICODE_VERSION`] -- [`char::decode_utf16`] -- [`char::from_digit`] -- [`char::from_u32_unchecked`] -- [`char::from_u32`] - [`cmp::max_by_key`] - [`cmp::max_by`] - [`cmp::min_by_key`] @@ -152,13 +145,6 @@ related tools. [cargo/9298]: https://github.com/rust-lang/cargo/pull/9298 [cargo/9282]: https://github.com/rust-lang/cargo/pull/9282 [cargo/9392]: https://github.com/rust-lang/cargo/pull/9392 -[`char::MAX`]: https://doc.rust-lang.org/std/primitive.char.html#associatedconstant.MAX -[`char::REPLACEMENT_CHARACTER`]: https://doc.rust-lang.org/std/primitive.char.html#associatedconstant.REPLACEMENT_CHARACTER -[`char::UNICODE_VERSION`]: https://doc.rust-lang.org/std/primitive.char.html#associatedconstant.UNICODE_VERSION -[`char::decode_utf16`]: https://doc.rust-lang.org/std/primitive.char.html#method.decode_utf16 -[`char::from_u32`]: https://doc.rust-lang.org/std/primitive.char.html#method.from_u32 -[`char::from_u32_unchecked`]: https://doc.rust-lang.org/std/primitive.char.html#method.from_u32_unchecked -[`char::from_digit`]: https://doc.rust-lang.org/std/primitive.char.html#method.from_digit [`AtomicBool::fetch_update`]: https://doc.rust-lang.org/std/sync/atomic/struct.AtomicBool.html#method.fetch_update [`AtomicPtr::fetch_update`]: https://doc.rust-lang.org/std/sync/atomic/struct.AtomicPtr.html#method.fetch_update [`BTreeMap::retain`]: https://doc.rust-lang.org/std/collections/struct.BTreeMap.html#method.retain