-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compiler error on nightly cargo doc
invocation on fltk-rs
repository
#96079
Comments
I'll take a look in the next days. Seems like it's an intra-doc link bug. |
Here is a code which reproduces the error: pub mod app {
pub struct S;
impl S {
/**
Doc comment hello! [`Foo::by_name`](`crate::enums::Foo::by_name`).
*/
pub fn whatever(&self) {}
}
}
pub mod enums {
pub enum Foo {
Bar,
}
impl Foo {
pub fn by_name(&self) {}
}
} |
Surprisingly enough, |
Figured the problem: the doc block hasn't been cleaned yet in the early intra doc links pass. Meaning that it interprets the link as a code block (because of the indent) and therefore doesn't load the associated module. |
Thanks for your work 🤩 |
rustdoc: Optimize and refactor doc link resolution One more subset of rust-lang/rust#94857 that should bring perf improvements rather than regressions + a couple more optimizations on top of it. It's better to read individual commits and their descriptions to understand the changes. The `may_have_doc_links` optimization is not *very* useful here, but it's much more important for rust-lang/rust#94857. Closes rust-lang/rust#96079
Code
Meta
rustc --version --verbose
:Error output
(The whole backtrace is printed anyway, so I'm posting only the
cargo doc
output:The text was updated successfully, but these errors were encountered: