This is not strictly necessary to make this test "more robust with
respect to NLL"; its just an attempt to narrow the scope of the test
and focus on its core.
Most of the time we want to robustify tests, but in this case this
test is deliberately encoding artifacts of AST-borrowck. So instead
of adding artificial uses that would obscure the aspects of
AST-borrowck that are being tests, we instead use revisions and then
mark the cases that apply to NLL as well as AST-borrowck.
rustdoc: refactor: centralize all command-line argument parsing
This is something i've wanted to do for a while, since we keep having to add new arguments to places like `rust_input` or `core::run_core` whenever we add a new CLI flag or the like. Those functions have inflated up to 11-19, and in some cases hiding away the locations where some CLI flags were being parsed, obscuring their use. Now, we have a central place where all command-line configuration occurs, including argument validation.
One note about the design: i grouped together all the arguments that `html::render::run` needed, so that i could pass them on from compilation in one lump instead of trying to thread through individual items or clone the entire blob ahead of time.
One other thing this adds is that rustdoc also now recognizes all the `-Z` options that rustc does, since we were manually grabbing a few previously. Now we parse a full `DebuggingOptions` struct and hand it directly to rustc when scraping docs.
The error message is sub-par, but fixing that requries moving ScalarMaybeUndef
to librustc which would conflict badly with another PR that is in flight.
submodules: update clippy from 71ec4ff6 to d8b42690
Fixes clippy toolstate.
Changes:
````
rustup https://github.com/rust-lang/rust/pull/55665 (pass contexts by reference)
Fix typo
Improve clippy_dev help text
RIIR update lints: Generate lint group registrations
Test clippy_dev on CI and fix test
RIIR update lints: Generate modules section
````
Fixes clippy toolstate.
Changes:
````
rustup https://github.com/rust-lang/rust/pull/55665 (pass contexts by reference)
Fix typo
Improve clippy_dev help text
RIIR update lints: Generate lint group registrations
Test clippy_dev on CI and fix test
RIIR update lints: Generate modules section
````
rustc_target: pass contexts by reference, not value.
`LayoutOf` now takes `&self` instead of `self`, and so does every method generic over a context that implements `LayoutOf` and/or other traits, like `HasDataLayout`, `HasTyCtxt`, etc.
Originally using by-value `Copy` types was relevant because `TyCtxt` was one of those types, but now `TyCtxt::layout_of` is separate from `LayoutOf`, and `TyCtxt` is not an often used layout context.
Passing these context by reference is a lot nicer for miri, which has `self: &mut EvalContext`, and needed `f(&self)` (that is, creating `&&mut EvalContext` references) for layout purposes.
Now, the `&mut EvalContext` can be passed to a function expecting `&C`, directly.
This should help with #54012 / #55627 (to not need `where &'a T::Cx: LayoutOf` bounds).
r? @nikomatsakis or @oli-obk or @nagisa cc @sunfishcode
If LLVM 7 is used, generate memcpy/memmove with differing
src/dst alignment. I've added new FFI functions to construct
these through the builder API, which is more convenient than
dealing with differing intrinsic signatures depending on the
LLVM version.
In each of the three cases in this test, there is a mutable borrow
of some field of the union and then a shared borrow of some other field
immediately following.
Under NLL, the mutable borrow is killed straight away as it isn't
used later - therefore not causing a conflict with the shared borrow.
This commit adds a use of the first mutable borrow to force the intended
errors to appear under NLL.
Move collect_and_partition_mono_items to rustc_mir
Most of the logic of it is inside rustc_mir anyway.
Also removes the single function crate rustc_metadata_utils. Based on #55225