mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-05 01:24:03 +00:00
PoisonError::new is defined twice, once under #[cfg(panic = "unwind")] and once under its negation, so exactly one definition exists in any given build. rustdoc's auto_cfg only sees whichever cfg survived expansion and tags the method as available under that cfg only, even though it is callable in every configuration - it just panics under panic=abort instead of returning. Disable auto_cfg on both variants so the portability note stops implying the method doesn't exist elsewhere. The doc comment already explains the panic=abort behavior in prose, so the cfg doesn't need to leak into the generated badge. Add a minimal regression test.