Adapt AddRetag for shallow retagging
With https://github.com/rust-lang/miri/pull/872, Miri only retags "bare" references, not those nested in compound types. This adjust `Retag` statement generation to don't emit retags if they are definitely not a bare reference.
I also expanded the mir-opt test to cover the `Retag` in the drop shim, which had previously not been tested.
Add builtin targets for mips64(el)-unknown-linux-muslabi64
This is prerequisite for rust-lang/libc#1449.
Tested locally to produce working static and dynamic binaries, ~~but CI config is untested for now~~ CI is to be added in a follow-up PR.
*edit: dynamic binaries also confirmed working!*
*edit 2: changed triples to include ABI, and removed stray `crt_static_default = false` declarations to be consistent with other musl targets*
Add UWP MSVC targets
Hi,
- The README URI change is the correct one for VS2019 community edition, which I suspect most people would use. Doesn't _need_ to be merged though.
- This 5e6619edd1 fixes the UWP build (msvc or not, doesn't matter). I suspect it broke with recent changes unnoticed because no CI.
- Store lib location is found through the VCToolsInstallDir env variable. The end of the path is currently for the VS2019 store lib locations only.
- I could not test the aarch64_uwp_windows_msvc target because the rust build script does not currently support arm64 msvc AFAIU.
The grouping led to a lot of `mv`. Therefore, some relative paths were
wrong. In this commit the dependent files were also moved so that the paths
work again.
That way, callers don't need to repeat "let's add this to sm manually
for tracking dependencies" trick.
It should make it easier to switch to using `FileLoader` for binary
files in the future as well
Reduce the genericity of closures in the iterator traits
By default, closures inherit the generic parameters of their scope,
including `Self`. However, in most cases, the closures used to implement
iterators don't need to be generic on the iterator type, only its `Item`
type. We can reduce this genericity by redirecting such closures through
local functions.
This does make the closures more cumbersome to write, but it will
hopefully reduce duplication in their monomorphizations, as well as
their related type lengths.
Rollup of 11 pull requests
Successful merges:
- #62984 (Add lint for excess trailing semicolons)
- #63075 (Miri: Check that a ptr is aligned and inbounds already when evaluating `*`)
- #63490 (libsyntax: cleanup and refactor `pat.rs`)
- #63507 (When needing type annotations in local bindings, account for impl Trait and closures)
- #63509 (Point at the right enclosing scope when using `await` in non-async fn)
- #63528 (syntax: Remove `DummyResult::expr_only`)
- #63537 (expand: Unimplement `MutVisitor` on `MacroExpander`)
- #63542 (Add NodeId for Arm, Field and FieldPat)
- #63543 (Merge Variant and Variant_)
- #63560 (move test that shouldn't be in test/run-pass/)
- #63570 (Adjust tracking issues for `MaybeUninit<T>` gates)
Failed merges:
r? @ghost
move test that shouldn't be in test/run-pass/
We no longer test `src/test/run-pass/`; the proper way now is `// run-pass` in `src/test/ui/`
r? @petrochenkov
expand: Unimplement `MutVisitor` on `MacroExpander`
Each call to `fully_expand_fragment` is something unique, interesting, and requiring attention.
It represents a "root" of expansion and its use means that something unusual is happening, like eager expansion or expansion performed outside of the primary expansion pass.
So, it shouldn't hide under a generic visitor call.
Also, from all the implemented visitor methods only two were actually used.
cc https://github.com/rust-lang/rust/pull/63468#discussion_r313504119
syntax: Remove `DummyResult::expr_only`
The effect is that if a built-in macro both returns an erroneous AST fragment and is used in unexpected position, then the incorrect position error won't be reported.
This combination of two errors should be rare and isn't worth an extra field that makes people ask questions in comments.
(There wasn't even a test making sure it worked.)
Addresses https://github.com/rust-lang/rust/pull/63468#discussion_r313504644
r? @estebank
The remap-debuginfo config option remaps paths in most crates, but it
does not apply to proc-macros, so they are still non-reproducible.
This patch fixes that.