-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-intra-doc-linksArea: Intra-doc links, the ability to link to items in docs by nameArea: Intra-doc links, the ability to link to items in docs by nameD-confusingDiagnostics: Confusing error or lint that should be reworked.Diagnostics: Confusing error or lint that should be reworked.S-blockedStatus: Blocked on something else such as an RFC or other implementation work.Status: Blocked on something else such as an RFC or other implementation work.T-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.
Description
I tried to document this code in libcore (./x.py doc src/libcore
):
impl<T: Deref, E> Result<T, E> {
/// Converts from `Result<T, E>` (or `&Result<T, E>`) to `Result<&<T as Deref>::Target, &E>`.
///
/// [`core::ops::Deref`]
pub fn as_deref(&self) -> Result<&T::Target, &E>;
}
I expected to see the above code build pass.
Instead, this happened: Build failed the following errors:
Documenting core v0.0.0 (/home/lzutao/fork/rust/compiler/src/libcore)
error: `[core::ops::Deref]` cannot be resolved, ignoring it.
--> src/libcore/result.rs:1151:68
|
1151 | /// Coerces the [`Ok`] variant of the original [`Result`] via [`core::ops::Deref`]
| ^^^^^^^^^^^^^^^^^^ cannot be resolved, ignoring
|
note: the lint level is defined here
--> src/libcore/lib.rs:64:9
|
64 | #![deny(intra_doc_link_resolution_failure)] // rustdoc is run without -D warnings
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
error: Could not document `core`.
Metadata
Metadata
Assignees
Labels
A-intra-doc-linksArea: Intra-doc links, the ability to link to items in docs by nameArea: Intra-doc links, the ability to link to items in docs by nameD-confusingDiagnostics: Confusing error or lint that should be reworked.Diagnostics: Confusing error or lint that should be reworked.S-blockedStatus: Blocked on something else such as an RFC or other implementation work.Status: Blocked on something else such as an RFC or other implementation work.T-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.