This commit modifies name resolution error reporting so that if a name
is in scope and has been imported then we do not suggest importing it.
This can occur when we add a label about constructors not being visible
due to private fields. In these cases, we know that the struct/variant
has been imported and we should silence any suggestions to import the
struct/variant.
while we could make this change (it's all unstable after all), there are crates.io crates that use the feature and that the compiler depends upon. We can instead roll out this feature while still supporting the old way.
The RUSTDOC_LIBDIR should be rustc_libdir, not sysroot_libdir; rustdoc
is like the compiler and should link against rustc's libdir.
Some people currently (i.e., in general, may not be on master) have doc
tests working, but no attempt to determine why has been attempted.
When a request for rustdoc is passed for stage 0, x.py build --stage 0
src/tools/rustdoc or ensure(tool::Rustdoc { .. }) with top_stage = 0, we
return the rustdoc for that compiler (i.e., the beta rustdoc).
Rollup of 16 pull requests
Successful merges:
- #57259 (Update reference of rlibc crate to compiler-builtins crate)
- #57740 (Use `to_ne_bytes` for converting IPv4Addr to octets)
- #57926 (Tiny expansion to docs for `core::convert`.)
- #58157 (Add Cargo.lock automatically adding message)
- #58203 (rustdoc: display sugared return types for async functions)
- #58243 (Add trait alias support in rustdoc)
- #58262 (Add #[must_use] message to Fn* traits)
- #58295 (std::sys::unix::stdio: explain why we do into_raw)
- #58297 (Cleanup JS a bit)
- #58317 (Some writing improvement, conciseness of intro)
- #58324 (miri: give non-generic functions a stable address)
- #58332 (operand-to-place copies should never be overlapping)
- #58345 (When there are multiple filenames, print what got interpreted as filenames)
- #58346 (rpath computation: explain why we pop())
- #58350 (Fix failing tidy (line endings on Windows))
- #58352 (miri value visitor: use `?` in macro)
Failed merges:
r? @ghost
When there are multiple filenames, print what got interpreted as filenames
I have written code that crafts command lines for rustc, and when I get "multiple input filenames provided" it can be quite hard to figure out where in this long list of arguments the mistake is hiding. Probably I passed an argument to a flag that does not expect an argument, but which flag would that be?
This changes the error message to print the first two filenames, to make it easier to debug what is going on.