cargo / displaydoc

displaydoc

cargo

A derive macro for implementing the display Trait via a doc comment and string interpolation

Audits

PE Patrick Elsen 2026-06-02

displaydoc@0.2.6 · 3 findings

displaydoc 0.2.6 is a small proc-macro crate that derives core::fmt::Display from /// doc comments. No build.rs, no binaries, no unsafe, no I/O; the only execution surface is the derive itself, a pure token-stream transformation over syn/quote/proc-macro2. Three findings: one medium correctness bug (#[doc(hidden)] panics the macro with "not implemented") and two low quality issues (panic!/expect in place of spanned syn errors; trybuild .stderr files excluded from the published crate).

build-exec-deterministicbuild-exec-minimalbuild-exec-no-networkbuild-exec-no-write-outbuild-exec-safehas-binarieshas-build-exechas-fuzz-testshas-install-exechas-integration-testshas-property-testshas-unit-testsimpl-algorithmimpl-concurrencyimpl-cryptoimpl-datastructureimpl-interpreterimpl-jitimpl-parserimpl-protocolis-benignuses-concurrencyuses-cryptouses-environmentuses-execuses-filesystemuses-interpreteruses-jituses-networkuses-unsafe
PE Patrick Elsen 2026-05-27

displaydoc@0.2.5

displaydoc 0.2.5 is a proc-macro derive that generates Display impls from doc-comment attributes — pure token rewriting plus a small format-string scanner, no unsafe, no I/O, no network. No findings; safe to deploy.

build-exec-deterministicbuild-exec-minimalbuild-exec-no-networkbuild-exec-no-write-outbuild-exec-safehas-binarieshas-build-exechas-fuzz-testshas-install-exechas-integration-testshas-property-testshas-unit-testsimpl-algorithmimpl-concurrencyimpl-cryptoimpl-datastructureimpl-interpreterimpl-jitimpl-parserimpl-protocolis-benignuses-concurrencyuses-cryptouses-environmentuses-execuses-filesystemuses-interpreteruses-jituses-networkuses-unsafe