Closed
Description
Hi, I noticed a weird internal error using cargo doc
. The smallest example I could make to reproduce the bug is an basic library project (cargo init --lib
) whose lib.rs contains:
#![feature(optin_builtin_traits)]
// the bug doesn't occur if the declaration of B is moved here
pub struct A();
// the bug still happens if the declaration of B is moved here
impl !Send for A {}
impl !Sync for A {}
pub struct B<T: ?Sized>(A, Box<T>);
cargo build
, cargo build --release
, and cargo check
all work fine; and as mentioned in the code, the place where B
is declared seems to matter.
Here is the output and trace of cargo doc --verbose
: [log was from an out of date nightly rust, see my comment below for the log for the latest nightly as of this edit]
Have a nice day.
Metadata
Metadata
Assignees
Labels
Area: Synthetic impls, used by rustdoc to document auto traits and traits with blanket implsIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️High priorityRelevant to the rustdoc team, which will review and decide on the PR/issue.Performance or correctness regression from one stable version to another.