<p dir="auto">When a crate re-exports something from deep in its internal structure with "pub use", you can only find the thing at its original path. A case in point (that just happened on IRC) is searching for something like <code class="notranslate">uid_t</code> in the libc crate; you get the path <code class="notranslate">libc::types::os::arch::posix88::uid_t</code> when actually <code class="notranslate">libc::uid_t</code> suffices, but to know that you have to scan through the list of re-exports. Is it feasible for rustdoc to index these re-exported use paths?</p>
<p dir="auto">Currently, resolve does a lot of redundant error reporting. For example,</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/home/cmr/hacking/rust/src/libextra/interner.rs:161:8: 161:18 error: unresolved name
/home/cmr/hacking/rust/src/libextra/interner.rs:161         ast::ident { repr: off, ctxt: 0 }
                                                            ^~~~~~~~~~
/home/cmr/hacking/rust/src/libextra/interner.rs:161:8: 161:18 error: use of undeclared module `ast`
/home/cmr/hacking/rust/src/libextra/interner.rs:161         ast::ident { repr: off, ctxt: 0 }
                                                            ^~~~~~~~~~
/home/cmr/hacking/rust/src/libextra/interner.rs:161:8: 161:18 error: `ast::ident` does not name a structure
/home/cmr/hacking/rust/src/libextra/interner.rs:161         ast::ident { repr: off, ctxt: 0 }
                                                            ^~~~~~~~~~"><pre class="notranslate"><code class="notranslate">/home/cmr/hacking/rust/src/libextra/interner.rs:161:8: 161:18 error: unresolved name
/home/cmr/hacking/rust/src/libextra/interner.rs:161         ast::ident { repr: off, ctxt: 0 }
                                                            ^~~~~~~~~~
/home/cmr/hacking/rust/src/libextra/interner.rs:161:8: 161:18 error: use of undeclared module `ast`
/home/cmr/hacking/rust/src/libextra/interner.rs:161         ast::ident { repr: off, ctxt: 0 }
                                                            ^~~~~~~~~~
/home/cmr/hacking/rust/src/libextra/interner.rs:161:8: 161:18 error: `ast::ident` does not name a structure
/home/cmr/hacking/rust/src/libextra/interner.rs:161         ast::ident { repr: off, ctxt: 0 }
                                                            ^~~~~~~~~~
</code></pre></div>
<p dir="auto">This should be a single error, "error: use of undeclared module <code class="notranslate">ast</code>".</p>
<p dir="auto">Another example:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/home/cmr/hacking/rust/src/libextra/interner.rs:161:8: 161:18 error: unresolved name
/home/cmr/hacking/rust/src/libextra/interner.rs:161         ast::ident { repr: off, ctxt: 0 }
                                                            ^~~~~~~~~~
/home/cmr/hacking/rust/src/libextra/interner.rs:161:8: 161:18 error: use of undeclared module `ast`
/home/cmr/hacking/rust/src/libextra/interner.rs:161         ast::ident { repr: off, ctxt: 0 }
                                                            ^~~~~~~~~~
/home/cmr/hacking/rust/src/libextra/interner.rs:161:8: 161:18 error: `ast::ident` does not name a structure
/home/cmr/hacking/rust/src/libextra/interner.rs:161         ast::ident { repr: off, ctxt: 0 }
                                                            ^~~~~~~~~~"><pre class="notranslate"><code class="notranslate">/home/cmr/hacking/rust/src/libextra/interner.rs:161:8: 161:18 error: unresolved name
/home/cmr/hacking/rust/src/libextra/interner.rs:161         ast::ident { repr: off, ctxt: 0 }
                                                            ^~~~~~~~~~
/home/cmr/hacking/rust/src/libextra/interner.rs:161:8: 161:18 error: use of undeclared module `ast`
/home/cmr/hacking/rust/src/libextra/interner.rs:161         ast::ident { repr: off, ctxt: 0 }
                                                            ^~~~~~~~~~
/home/cmr/hacking/rust/src/libextra/interner.rs:161:8: 161:18 error: `ast::ident` does not name a structure
/home/cmr/hacking/rust/src/libextra/interner.rs:161         ast::ident { repr: off, ctxt: 0 }
                                                            ^~~~~~~~~~
</code></pre></div>
<p dir="auto">Fixing this will require careful finagling of resolve. The best way to handle this is probably some central error reporting infrastructure, and as soon as <em>one</em> error is reported, stop making new errors for the current span. This is going to be tricky because every error path needs to be followed to ensure that an error is reported, and that if only one error is reported, it is the right error. Needs vastly improved test coverage in compile-fail. Shouldn't be hard, but will take time.</p>
<p dir="auto">Nominating for production-ready.</p>