static_init 1.0.4

Safe mutable static and non const static initialization, and code execution at program startup/exit.
Documentation
Build #2136759 2025-05-21 08:28:43
# rustc version
rustc 1.89.0-nightly (bc8215286 2025-05-20)# docs.rs version
docsrs 0.6.0 (d8ea4838 2025-05-14)# build log
[INFO] running `Command { std: "docker" "create" "-v" "/home/cratesfyi/workspace-builder/builds/static_init-1.0.4/target:/opt/rustwide/target:rw,Z" "-v" "/home/cratesfyi/workspace-builder/builds/static_init-1.0.4/source:/opt/rustwide/workdir:ro,Z" "-v" "/home/cratesfyi/workspace-builder/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/home/cratesfyi/workspace-builder/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "DOCS_RS=1" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "6442450944" "--cpus" "6" "--user" "1001:1001" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:eea15d5475069c3ef791f10c2c6b5af2ee421ef2da1e680ecce1cba46243983b" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "rustdoc" "--lib" "-Zrustdoc-map" "--all-features" "--config" "build.rustdocflags=[\"--cfg\", \"docsrs\", \"--cfg\", \"docsrs\", \"-Z\", \"unstable-options\", \"--emit=invocation-specific\", \"--resource-suffix\", \"-20250520-1.89.0-nightly-bc8215286\", \"--static-root-path\", \"/-/rustdoc.static/\", \"--cap-lints\", \"warn\", \"--extern-html-root-takes-precedence\"]" "--offline" "-Zunstable-options" "--config=doc.extern-map.registries.crates-io=\"https://docs.rs/{pkg_name}/{version}/x86_64-unknown-linux-gnu\"" "-Zrustdoc-scrape-examples" "-j6" "--target" "x86_64-unknown-linux-gnu" "--config" "build.rustdocflags=[\"-Zmetrics-dir=/opt/rustwide/target/metrics\"]", kill_on_drop: false }`
[INFO] [stdout] e9fcd9bab5193263e29c1c8d526d43d09b51f913334305c4162bc8e66232e1db
[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" "e9fcd9bab5193263e29c1c8d526d43d09b51f913334305c4162bc8e66232e1db", kill_on_drop: false }`
[INFO] [stderr] warning: target filter specified, but no targets matched; this is a no-op
[INFO] [stderr]  Documenting static_init v1.0.4 (/opt/rustwide/workdir)
[INFO] [stderr] warning: unresolved link to `dynamic`
[INFO] [stderr]     --> src/lazy.rs:1621:1
[INFO] [stderr]      |
[INFO] [stderr] 1621 | / "The actual type of mutable statics attributed with [#[dynamic]](macro@crate::dynamic) \
[INFO] [stderr] 1622 | | \
[INFO] [stderr] 1623 | | The method [from_generator](Self::from_generator) is unsafe because this kind of static \
[INFO] [stderr] 1624 | | can only safely be used through this attribute macros."
[INFO] [stderr]      | |_______________________________________________________^
[INFO] [stderr]      |
[INFO] [stderr]      = note: the link appears in this line:
[INFO] [stderr]              
[INFO] [stderr]              The actual type of mutable statics attributed with [#[dynamic]](macro@crate::dynamic) The method [from_generator](Self::from_generator) is unsafe because this kind of static can only safely be used through this attribute macros.
[INFO] [stderr]                                                                    ^^^^^^^
[INFO] [stderr]      = note: no item named `dynamic` in scope
[INFO] [stderr]      = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
[INFO] [stderr]      = note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default
[INFO] [stderr]      = note: this warning originates in the macro `impl_mut_lazy` (in Nightly builds, run with -Z macro-backtrace for more info)
[INFO] [stderr] 
[INFO] [stderr] warning: unresolved link to `dynamic`
[INFO] [stderr]    --> src/lazy.rs:588:1
[INFO] [stderr]     |
[INFO] [stderr] 588 | / "The actual type of statics attributed with [#[dynamic]](macro@crate::dynamic). \
[INFO] [stderr] 589 | | \
[INFO] [stderr] 590 | | The method [from_generator](Self::from_generator) is unsafe because this kind of static \
[INFO] [stderr] 591 | | can only safely be used through this attribute macros."
[INFO] [stderr]     | |_______________________________________________________^
[INFO] [stderr]     |
[INFO] [stderr]     = note: the link appears in this line:
[INFO] [stderr]             
[INFO] [stderr]             The actual type of statics attributed with [#[dynamic]](macro@crate::dynamic). The method [from_generator](Self::from_generator) is unsafe because this kind of static can only safely be used through this attribute macros.
[INFO] [stderr]                                                           ^^^^^^^
[INFO] [stderr]     = note: no item named `dynamic` in scope
[INFO] [stderr]     = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
[INFO] [stderr]     = note: this warning originates in the macro `impl_lazy` (in Nightly builds, run with -Z macro-backtrace for more info)
[INFO] [stderr] 
[INFO] [stderr] warning: `static_init` (lib doc) generated 2 warnings
[INFO] [stderr]     Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.58s
[INFO] [stderr]    Generated /opt/rustwide/target/x86_64-unknown-linux-gnu/doc/static_init/index.html
[INFO] running `Command { std: "docker" "inspect" "e9fcd9bab5193263e29c1c8d526d43d09b51f913334305c4162bc8e66232e1db", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "e9fcd9bab5193263e29c1c8d526d43d09b51f913334305c4162bc8e66232e1db", kill_on_drop: false }`
[INFO] [stdout] e9fcd9bab5193263e29c1c8d526d43d09b51f913334305c4162bc8e66232e1db