Rust 1.47.0 stable release, take 2
This PR adds a workaround for https://github.com/rust-lang/rust/issues/76980 to the existing stable 1.47.0 branch. I will invalidate the dev artifacts and issue another pre-release once the PR is merged, to let people test this change.
r? `@ghost`
[stable] 1.47 release
This PR includes backports of:
* Fix miscompile in SimplifyBranchSame #77549
* Force posix-style quoting on lld, independent of host platform #77543
Note that both are still beta-nominated/beta-accepted, as they need to be backported to 1.48 as well (future beta branch).
This also adjusts the release notes to move rustc-docs to internal changes.
Note that issue 76980 isn't included as it is unclear what the exact cause there
is, so explaining it is difficult.
[beta] backports
This backports a number of PRs to beta, not all of which have been approved (yet).
* Switch to environment files to change the environment on GHA #77418
* cache types during normalization #76928
* Fixing memory exhaustion when formatting short code suggestion #76598
* Issue 72408 nested closures exponential #72412
r? `@Mark-Simulacrum`
Mostly to fix ui/issues/issue-37311-type-length-limit/issue-37311.rs.
Most parts of the compiler can handle deeply nested types with a lot
of duplicates just fine, but some parts still attempt to naively
traverse type tree.
Before such problems were caught by type length limit check,
but now these places will have to be changed to handle
duplicated types gracefully.
This fixes#72408.
Nested closures were resulting in exponential compilation time.
As a performance optimization this change introduces MiniSet,
which is a simple small storage optimized set.
[beta] Revert "Promote missing_fragment_specifier to hard error #75516"
This reverts "Promote missing_fragment_specifier to hard error #75516" on just beta. I would like us to explore a more principled fix, perhaps along the lines `@petrochenkov` suggested in #76605, on master when we have more time to test it but I don't want us shipping the breakage in the meantime. I don't personally feel comfortable immediately backporting anything more than a revert here.
cc `@matklad`
[beta] backports
This backports the following:
* revert const_type_id stabilization #77083
* [mir-opt] Disable the `ConsideredEqual` logic in SimplifyBranchSame opt #76837
* Rename Iterator::get_unchecked #77201 (manually, because of file renaming and other issues on master causing literal cherry-pick to fail)
* Rebase LLVM onto 11.0.0-rc3 #77063 (bumping direct to master, see https://github.com/rust-lang/rust/pull/77063#issuecomment-700231036).
The last two have not yet been approved by compiler team, but I'm posting this now and going to go ahead and approve as I expect both to get approved and we want testing as much as possible before release in ~2 weeks.
r? `@ghost`
[beta] backports
* Ignore rustc_private items from std docs #76571
* Fix HashMap visualizers in Visual Studio (Code) #76389
* Account for version number in NtIdent hack #76331
* Account for async functions when suggesting new named lifetime #75867
* Fix loading pretty-printers in rust-lldb script #76015
This also bumps to the released stable compiler.
Issue #74616 tracks a backwards-compatibility hack for certain macros.
This has is implemented by hard-coding the filenames and macro names of
certain code that we want to continue to compile.
However, the initial implementation of the hack was based on the
directory structure when building the crate from its repository (e.g.
`js-sys/src/lib.rs`). When the crate is build as a dependency, it will
include a version number from the clone from the cargo registry (e.g.
`js-sys-0.3.17/src/lib.rs`), which would fail the check.
This commit modifies the backwards-compatibility hack to check that
desired crate name (`js-sys` or `time-macros-impl`) is a prefix of the
proper part of the path.
See https://github.com/rust-lang/rust/issues/76070#issuecomment-687215646
for more details.
CDB doesn't care that you're using static_cast between unrelated types.
VS(C) does. These should've been reinterpret_cast or C casts.
Cast is from e.g. `u8*` to `tuple<$T1, $T2>*`