Hide private trait type params and show hidden items with document-private
As discussed in #46380, this PR removes the `strip-hidden` pass from `--document-private-items` which allows showing `#[doc(hidden)]` with rustdoc.
The second commit removes the trait implementation from the docs if the trait's parameter is private.
rustc: Filter out bogus extern crate warnings
Rustdoc has for some time now used the "everybody loops" pass in the compiler to
avoid typechecking and otherwise avoid looking at implementation details.
In #46115 the placement of this pass was pushed back in the compiler to after
macro expansion to ensure that it works with macro-expanded code as well. This
in turn caused the regression in #46271.
The bug here was that the resolver was producing `def_id` instances for
"possibly unused extern crates" which would then later get processed during
typeck to actually issue lint warnings. The problem was that *after* resolution
these `def_id` nodes were actually removed from the AST by the "everybody loops"
pass. This later, when we tried to take a look at `def_id`, caused the compiler
to panic.
The fix applied here is a bit of a heavy hammer which is to just, in this one
case, ignore the `extern crate` lints if the `def_id` looks "bogus" in any way
(basically if it looks like the node was removed after resolution). The real
underlying bug here is probably that the "everybody loops" AST pass is being
stressed to much beyond what it was originally intended to do, but this should
at least fix the ICE for now...
Closes#46271
wasm: Update LLVM to fix a test
This commit updates LLVM with some tweaks to the integer <-> floating point
conversion instructions to ensure that `as` in Rust doesn't trap.
Closes#46298
incr.comp.: Make traits::VTable encodable and decodable.
Make vtables encodable so we can cache the `trans_fulfill_obligation` query at some point.
r? @eddyb
Fix rustdoc item summaries that are headers
Rustoc item summaries that are headers were not displayed at all because
they started with whitespace.
This PR fixes this and now removes the whitespace and then displays the
block.
I'm not sure if the rustdoc test is written correctly, if there's anything to improve, just let me know. :)
This fixes#46377.
This is how it looks when rendered out now:
![Rendered](https://i.imgur.com/7u8jUAM.png)
Remove librustdoc dependency on env_logger
We want librustdoc to pickup the env_logger dependency from
the sysroot. This ensures that the same copy of env_logger is used
for both internal crates (e.g. librustc_driver, libsyntax) and
librustdoc
Closes#46383
rustbuild: Fix a typo with the Cargo book
The usage of `Path::new` prevented out-of-tree builds (like the bots do) from
working by accident!
Closes#46195
NetBSD: add sysctl backend for std::env::current_exe
Use the CTL_KERN.KERN_PROC_ARGS.-1.KERN_PROC_PATHNAME sysctl in
preference over the /proc/curproc/exe symlink.
Additionally, perform more validation of aformentioned symlink.
Particularly on pre-8.x NetBSD this symlink will point to '/' when
accurate information is unavailable.
make coercions to `!` in unreachable code a hard error
This was added to cover up a lazy extra semicolon in #35849, but does
not actually make sense. This is removed as a part of the stabilization
of `never_type`.
incr.comp.: Load cached diagnostics lazily and allow more things in the cache.
This PR implements makes two changes:
1. Diagnostics are loaded lazily from the incr. comp. cache now. This turned out to be necessary for correctness because diagnostics contain `Span` values and deserializing those requires that the source file they point to is still around in the current compilation session. Obviously this isn't always the case. Loading them lazily allows for never touching diagnostics that are not valid anymore.
2. The compiler can now deal with there being no cache entry for a given query invocation. Before, all query results of a cacheable query were always expected to be present in the cache. Now, the compiler can fall back to re-computing the result if there is no cache entry found. This allows for caching things that we cannot force from dep-node (like the `symbol_name` query). In such a case we'll just have a "best effort" caching strategy.
~~This PR is based on https://github.com/rust-lang/rust/pull/46301 (=first 2 commits), so please don't merge until that has landed. The rest of the commits are ready for review though.~~
r? @nikomatsakis
The previous method ran into problems because ICH would treat Spans
as (file,line,col) but the cache contained byte offsets and its
possible for the latter to change while the former stayed stable.
incr.comp.: Remove ability to produce incr. comp. hashes during metadata export.
This functionality has been superseded by on-import hashing, which can be less conservative and does not require extra infrastructure.
r? @nikomatsakis