[INFO] crate zkp-logging-allocator 0.1.0 is already in cache [INFO] documenting zkp-logging-allocator-0.1.0 against master#394e1b40d264aa6928811919c1124fa248e7d802 for pr-73566 [INFO] extracting crate zkp-logging-allocator 0.1.0 into /workspace/builds/worker-4/source [INFO] validating manifest of crates.io crate zkp-logging-allocator 0.1.0 on toolchain 394e1b40d264aa6928811919c1124fa248e7d802 [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+394e1b40d264aa6928811919c1124fa248e7d802" "read-manifest" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] started tweaking crates.io crate zkp-logging-allocator 0.1.0 [INFO] finished tweaking crates.io crate zkp-logging-allocator 0.1.0 [INFO] tweaked toml for crates.io crate zkp-logging-allocator 0.1.0 written to /workspace/builds/worker-4/source/Cargo.toml [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+394e1b40d264aa6928811919c1124fa248e7d802" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update", kill_on_drop: false }` [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+394e1b40d264aa6928811919c1124fa248e7d802" "fetch" "--locked" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "MAP_USER_ID=0" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--network" "none" "rustops/crates-build-env@sha256:819119df93c0f5eca3f29186f14981ef29945a311854d7222af07488600a2584" "/opt/rustwide/cargo-home/bin/cargo" "+394e1b40d264aa6928811919c1124fa248e7d802" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 256b9748e055eafa71f416de5fe8462b56c3a98fc20dbd0de59b4fac7c88a938 [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] running `Command { std: "docker" "start" "-a" "256b9748e055eafa71f416de5fe8462b56c3a98fc20dbd0de59b4fac7c88a938", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "256b9748e055eafa71f416de5fe8462b56c3a98fc20dbd0de59b4fac7c88a938", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "256b9748e055eafa71f416de5fe8462b56c3a98fc20dbd0de59b4fac7c88a938", kill_on_drop: false }` [INFO] [stdout] 256b9748e055eafa71f416de5fe8462b56c3a98fc20dbd0de59b4fac7c88a938 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "MAP_USER_ID=0" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--network" "none" "rustops/crates-build-env@sha256:819119df93c0f5eca3f29186f14981ef29945a311854d7222af07488600a2584" "/opt/rustwide/cargo-home/bin/cargo" "+394e1b40d264aa6928811919c1124fa248e7d802" "doc" "--frozen" "--no-deps" "--document-private-items" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 2a1595d8a18deba54456ff09bbccb1ceddda2b10dd9d6b5401928536911e668d [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] running `Command { std: "docker" "start" "-a" "2a1595d8a18deba54456ff09bbccb1ceddda2b10dd9d6b5401928536911e668d", kill_on_drop: false }` [INFO] [stderr] Checking log v0.4.8 [INFO] [stderr] Documenting zkp-logging-allocator v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:5:1 [INFO] [stdout] | [INFO] [stdout] 5 | / #![cfg_attr(not(feature = "std"), no_std)] [INFO] [stdout] 6 | | // #![forbid(unsafe_code)] // Allocators are by nature unsafe [INFO] [stdout] 7 | | #![warn( [INFO] [stdout] 8 | | // Enable sets of warnings [INFO] [stdout] ... | [INFO] [stdout] 47 | | #[global_allocator] [INFO] [stdout] 48 | | pub static ALLOCATOR: LoggingAllocator = LoggingAllocator::new(); [INFO] [stdout] | |_________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] note: the lint level is defined here [INFO] [stdout] --> src/lib.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | missing_doc_code_examples, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/logging_allocator.rs:11:1 [INFO] [stdout] | [INFO] [stdout] 11 | / pub struct LoggingAllocator { [INFO] [stdout] 12 | | info: usize, [INFO] [stdout] 13 | | warn: usize, [INFO] [stdout] 14 | | error: usize, [INFO] [stdout] ... | [INFO] [stdout] 20 | | num_allocations: AtomicUsize, [INFO] [stdout] 21 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/logging_allocator.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | info: usize, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/logging_allocator.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | warn: usize, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/logging_allocator.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | error: usize, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/logging_allocator.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | reject: usize, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/logging_allocator.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | allocated: AtomicUsize, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/logging_allocator.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | peak_allocated: AtomicUsize, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/logging_allocator.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | total_allocated: AtomicUsize, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/logging_allocator.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 19 | largest_allocated: AtomicUsize, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/logging_allocator.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | num_allocations: AtomicUsize, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/logging_allocator.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / use crate::SizeBytes; [INFO] [stdout] 2 | | use log::{error, info, warn}; [INFO] [stdout] 3 | | use std::{ [INFO] [stdout] 4 | | alloc::{GlobalAlloc, Layout, System}, [INFO] [stdout] ... | [INFO] [stdout] 136 | | prev [INFO] [stdout] 137 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/logging_allocator.rs:128:1 [INFO] [stdout] | [INFO] [stdout] 128 | / fn fetch_max(atom: &AtomicUsize, value: usize) -> usize { [INFO] [stdout] 129 | | let mut prev = atom.load(Relaxed); [INFO] [stdout] 130 | | while prev < value { [INFO] [stdout] 131 | | match atom.compare_exchange_weak(prev, value, Relaxed, Relaxed) { [INFO] [stdout] ... | [INFO] [stdout] 136 | | prev [INFO] [stdout] 137 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/logging_allocator.rs:23:1 [INFO] [stdout] | [INFO] [stdout] 23 | / impl LoggingAllocator { [INFO] [stdout] 24 | | // We need a `const fn` constructor [INFO] [stdout] 25 | | // TODO: Implement `Default` when trait functions can be `const`. [INFO] [stdout] 26 | | pub const fn new() -> Self { [INFO] [stdout] ... | [INFO] [stdout] 68 | | } [INFO] [stdout] 69 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/logging_allocator.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | / pub const fn new() -> Self { [INFO] [stdout] 27 | | Self { [INFO] [stdout] 28 | | info: 1_000_000, [INFO] [stdout] 29 | | warn: 10_000_000, [INFO] [stdout] ... | [INFO] [stdout] 37 | | } [INFO] [stdout] 38 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/logging_allocator.rs:40:5 [INFO] [stdout] | [INFO] [stdout] 40 | / pub fn allocated(&self) -> usize { [INFO] [stdout] 41 | | self.allocated.load(Relaxed) [INFO] [stdout] 42 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/logging_allocator.rs:44:5 [INFO] [stdout] | [INFO] [stdout] 44 | / pub fn peak_allocated(&self) -> usize { [INFO] [stdout] 45 | | self.peak_allocated.load(Relaxed) [INFO] [stdout] 46 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/logging_allocator.rs:48:5 [INFO] [stdout] | [INFO] [stdout] 48 | / pub fn total_allocated(&self) -> usize { [INFO] [stdout] 49 | | self.total_allocated.load(Relaxed) [INFO] [stdout] 50 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/logging_allocator.rs:52:5 [INFO] [stdout] | [INFO] [stdout] 52 | / pub fn largest_allocated(&self) -> usize { [INFO] [stdout] 53 | | self.largest_allocated.load(Relaxed) [INFO] [stdout] 54 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/logging_allocator.rs:56:5 [INFO] [stdout] | [INFO] [stdout] 56 | / pub fn num_allocations(&self) -> usize { [INFO] [stdout] 57 | | self.num_allocations.load(Relaxed) [INFO] [stdout] 58 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/logging_allocator.rs:60:5 [INFO] [stdout] | [INFO] [stdout] 60 | / pub fn log_statistics(&self) { [INFO] [stdout] 61 | | info!( [INFO] [stdout] 62 | | "allocated {} in {} allocations. currently allocated {}, largest allocated {}", [INFO] [stdout] 63 | | SizeBytes::from(self.total_allocated()), [INFO] [stdout] ... | [INFO] [stdout] 67 | | ); [INFO] [stdout] 68 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/size_bytes.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / use std::fmt; [INFO] [stdout] 2 | | [INFO] [stdout] 3 | | /// Wrapper for `usize` to represent number of bytes. [INFO] [stdout] 4 | | /// [INFO] [stdout] ... | [INFO] [stdout] 51 | | } [INFO] [stdout] 52 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/size_bytes.rs:3:1 [INFO] [stdout] | [INFO] [stdout] 3 | / /// Wrapper for `usize` to represent number of bytes. [INFO] [stdout] 4 | | /// [INFO] [stdout] 5 | | /// Provides a pretty implementation of `std::fmt::Display`. [INFO] [stdout] | |____________________________________________________________^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/size_bytes.rs:8:29 [INFO] [stdout] | [INFO] [stdout] 8 | pub(crate) struct SizeBytes(usize); [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:48:1 [INFO] [stdout] | [INFO] [stdout] 48 | pub static ALLOCATOR: LoggingAllocator = LoggingAllocator::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/size_bytes.rs:48:1 [INFO] [stdout] | [INFO] [stdout] 48 | / impl From for SizeBytes { [INFO] [stdout] 49 | | fn from(size: usize) -> Self { [INFO] [stdout] 50 | | Self(size) [INFO] [stdout] 51 | | } [INFO] [stdout] 52 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/size_bytes.rs:49:5 [INFO] [stdout] | [INFO] [stdout] 49 | / fn from(size: usize) -> Self { [INFO] [stdout] 50 | | Self(size) [INFO] [stdout] 51 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/size_bytes.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | / impl fmt::Display for SizeBytes { [INFO] [stdout] 11 | | // We only want three digits accuracy, so f32 is fine. [INFO] [stdout] 12 | | #[allow(clippy::cast_precision_loss)] [INFO] [stdout] 13 | | // Conversions f32 -> usize are safe here. [INFO] [stdout] ... | [INFO] [stdout] 45 | | } [INFO] [stdout] 46 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/size_bytes.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | / fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { [INFO] [stdout] 18 | | let size = self.0 as f32; [INFO] [stdout] 19 | | if size < 1.0e3 { [INFO] [stdout] 20 | | write!(f, "{} B", size) [INFO] [stdout] ... | [INFO] [stdout] 44 | | } [INFO] [stdout] 45 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/logging_allocator.rs:73:1 [INFO] [stdout] | [INFO] [stdout] 73 | / unsafe impl GlobalAlloc for LoggingAllocator { [INFO] [stdout] 74 | | unsafe fn alloc(&self, layout: Layout) -> *mut u8 { [INFO] [stdout] 75 | | if layout.size() < self.info { [INFO] [stdout] 76 | | // Do nothing for small allocations [INFO] [stdout] ... | [INFO] [stdout] 122 | | } [INFO] [stdout] 123 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/logging_allocator.rs:74:5 [INFO] [stdout] | [INFO] [stdout] 74 | / unsafe fn alloc(&self, layout: Layout) -> *mut u8 { [INFO] [stdout] 75 | | if layout.size() < self.info { [INFO] [stdout] 76 | | // Do nothing for small allocations [INFO] [stdout] 77 | | // Note that the log messages themselves also make small [INFO] [stdout] ... | [INFO] [stdout] 116 | | result [INFO] [stdout] 117 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/logging_allocator.rs:119:5 [INFO] [stdout] | [INFO] [stdout] 119 | / unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout) { [INFO] [stdout] 120 | | System.dealloc(ptr, layout); [INFO] [stdout] 121 | | let _ = self.allocated.fetch_sub(layout.size(), Relaxed); [INFO] [stdout] 122 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 32 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 1.94s [INFO] running `Command { std: "docker" "inspect" "2a1595d8a18deba54456ff09bbccb1ceddda2b10dd9d6b5401928536911e668d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "2a1595d8a18deba54456ff09bbccb1ceddda2b10dd9d6b5401928536911e668d", kill_on_drop: false }` [INFO] [stdout] 2a1595d8a18deba54456ff09bbccb1ceddda2b10dd9d6b5401928536911e668d