-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-synthetic-implsArea: Synthetic impls, used by rustdoc to document auto traits and traits with blanket implsArea: Synthetic impls, used by rustdoc to document auto traits and traits with blanket implsI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️P-highHigh priorityHigh priorityT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
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
A-synthetic-implsArea: Synthetic impls, used by rustdoc to document auto traits and traits with blanket implsArea: Synthetic impls, used by rustdoc to document auto traits and traits with blanket implsI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️P-highHigh priorityHigh priorityT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.