Commit graph

154094 commits

Author SHA1 Message Date
Hans Kratz
bd49593772 Get rid of broken ct-ng oldconfig everywhere and directly provide a suitable .config file. 2021-10-14 10:40:00 -04:00
Mark Rousskov
e840ce5774 Switch to our own mirror of libisl 2021-10-14 10:39:55 -04:00
Mara Bos
66e73622cf Add tests for panic and [debug_]assert in Rust 2021. 2021-10-14 10:39:25 -04:00
Mara Bos
971356c0e6 Use correct edition for panic in [debug_]assert!() etc. 2021-10-14 10:39:25 -04:00
Hans Kratz
a1f28131d3 CI: Use mirror for downloads.
Crosstool-ng 1.22 used by those docker dist builds only allows one
mirror for all downloads.
2021-10-14 10:38:51 -04:00
Ibraheem Ahmed
4a9b892be3 revert stabilization of core::task::ready!
(cherry picked from commit 5f7e7d2e93)
2021-10-13 11:18:21 -07:00
Gary Guo
e2f363c672 Explicit PlaceAncestryRelation::SamePlace and handle like Descendant
(cherry picked from commit 7275cfa47c)
2021-10-13 11:18:21 -07:00
Gary Guo
0ee531522c Add regression test
(cherry picked from commit d7f8a06780)
2021-10-13 11:18:21 -07:00
Gary Guo
ce633b204e Ignore projection type when determining upvar ancestory
(cherry picked from commit 5481201160)
2021-10-13 11:18:21 -07:00
Jane Lusby
6689493d0a Revert "Stabilize Iterator::intersperse()"
(cherry picked from commit 8965b5884a)
2021-10-13 11:18:21 -07:00
Michael Woerister
79afdb015f Turn tcx.vtable_allocation() into a query.
(cherry picked from commit b7cc99142a)
2021-10-13 11:18:21 -07:00
Michael Woerister
cb8ea8ca2d Remove untracked vtable-const-allocation cache from tcx
(cherry picked from commit a1e2c0f0ad)
2021-10-13 11:18:21 -07:00
Noah Lev
7b7bdc06bb Fix stabilization version for bindings_after_at
According to the release notes and its PR milestone, it was stabilized
in 1.56.0.

(cherry picked from commit 6189d0a116)
2021-10-13 11:18:21 -07:00
Fabian Wolff
ff54f71c8e Disable SimplifyBranchSame optimization for now
(cherry picked from commit dd9b4763a4)
2021-10-13 11:18:21 -07:00
Fabian Wolff
7dff1cd389 Update comments
(cherry picked from commit 20489eaca2)
2021-10-13 11:18:21 -07:00
Fabian Wolff
e15cb6f969 Fix unsound optimization with explicit variant discriminants
(cherry picked from commit 529c35331b)
2021-10-13 11:18:20 -07:00
Josh Stone
38d40914a9 Downgrade lld-wrapper to 2018 edition 2021-10-13 11:18:20 -07:00
Hans Kratz
6e09975fcf Add wrapper for -Z gcc-ld=lld to invoke rust-lld with the correct flavor
The wrapper is installed as `ld` and `ld64` in the `lib\rustlib\<host_target>\bin\gcc-ld`
directory and its sole purpose is to invoke `rust-lld` in the parent directory with
the correct flavor.

(cherry picked from commit 6162fc0c80)
2021-10-13 10:57:19 -07:00
Roxane
16254e9b1d Fix test
(cherry picked from commit d0e2b607de)
2021-10-13 10:54:11 -07:00
Roxane
428285e28c 2229: Consume IfLet expr
(cherry picked from commit 87010206ad)
2021-10-13 10:54:11 -07:00
bors
e6e620e1c7 Auto merge of #89527 - ehuss:beta-backports, r=ehuss
[beta] Beta rollup

* Fix WinUWP std compilation errors due to I/O safety #88587
* Disable RemoveZsts in generators to avoid query cycles #88979
* Disable the evaluation cache when in intercrate mode #88994
* Fix linting when trailing macro expands to a trailing semi #88996
* Don't use projection cache or candidate cache in intercrate mode #89125
* 2229: Mark insignificant dtor in stdlib #89144
* Temporarily rename int_roundings functions to avoid conflicts #89184
* [rfc 2229] Drop fully captured upvars in the same order as the regular drop code #89208
* Use the correct edition for syntax highlighting doctests #89277
* Don't normalize opaque types with escaping late-bound regions #89285
* Update Let's Encrypt ROOT CA certificate in dist-(i686|x86_64)-linux docker images #89486

Cargo update:
* - [beta] 1.56 backports (rust-lang/cargo#9958)
* - [beta] Revert "When a dependency does not have a version, git or path… (rust-lang/cargo#9912)
* - [beta] Fix rustc --profile=dev unstable check. (rust-lang/cargo#9901)
2021-10-04 23:56:38 +00:00
bors
06b37f1521 Auto merge of #89380 - ehuss:fix-windows-llvm, r=Mark-Simulacrum
Fix Windows LLVM issue.

GitHub image 20210928.2 added LLVM 12.0.1 to the stock image.  However, the `lldb` executable doesn't work, it fails with:

> C:/Program Files/LLVM/bin/lldb.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory

We probably don't want to start testing LLDB on windows anyways (at least not without intent).

The hacky solution for now is to just delete the system LLVM.
2021-10-04 16:56:07 -07:00
Eric Huss
cfa1cd029e Bless src/test/rustdoc-ui/doctest-edition.stderr
The backport of #89277 needed adjustment due to another
PR (#87915 - Use smaller spans for some structured suggestions)
causing the test to have a slightly different span.
2021-10-04 13:45:49 -07:00
bors
a6b733599e Auto merge of #89486 - rusticstuff:docker_letsencrypt_ca_update, r=Mark-Simulacrum
Update Let's Encrypt ROOT CA certificate in dist-(i686|x86_64)-linux docker images

The DST Root CA X3 used by Let's Encrypt has expired ([Let's Encrypt announcement](https://letsencrypt.org/docs/dst-root-ca-x3-expiration-september-2021/)). This patch installs the new root certificate (ISRG Root X1) and disables the old one. Disabling the old one is necessary because otherwise curl still fails to download from servers with Let's Encrypt certs even though they are cross-signed.

Fixes #89484.
2021-10-04 12:38:23 -07:00
bors
bb4672b168 Auto merge of #89285 - jackh726:issue-88862, r=nikomatsakis
Don't normalize opaque types with escaping late-bound regions

Fixes #88862

Turns out, this has some really bad perf implications in large types (issue #88862). While we technically can handle them fine, it doesn't change test output either way. For now, revert with an added benchmark. Future attempts to change this back will have to consider perf.

Needs a perf run once https://github.com/rust-lang/rustc-perf/pull/1033 is merged

r? `@nikomatsakis`
2021-10-04 12:37:55 -07:00
bors
a6c3c1ba3e Auto merge of #89277 - jyn514:codeblock-edition, r=GuillaumeGomez
Use the correct edition for syntax highlighting doctests

Previously it would unconditionally use edition 2015, which was incorrect.

Helps with https://github.com/rust-lang/rust/issues/89135 in that you can now override the doctest to be 2018 edition instead of being forced to fix the error. This doesn't resolve any of the deeper problems that rustdoc disagrees with most rust users on what a code block is.

cc `@Mark-Simulacrum`
2021-10-04 12:37:38 -07:00
Jubilee
d0a803317c Rollup merge of #89208 - wesleywiser:rfc_2229_droporder, r=nikomatsakis
[rfc 2229] Drop fully captured upvars in the same order as the regular drop code

Currently, with the new 2021 edition, if a closure captures all of the
fields of an upvar, we'll drop those fields in the order they are used
within the closure instead of the normal drop order (the definition
order of the fields in the type).

This changes that so we sort the captured fields by the definition order
which causes them to drop in that same order as well.

Fixes rust-lang/project-rfc-2229#42

r? `@nikomatsakis`
2021-10-04 12:37:21 -07:00
Jubilee
4779e624e5 Rollup merge of #89184 - joshtriplett:master, r=estebank
Temporarily rename int_roundings functions to avoid conflicts

These functions are unstable, but because they're inherent they still
introduce conflicts with stable trait functions in crates. Temporarily
rename them to fix these conflicts, until we can resolve those conflicts
in a better way.
2021-10-04 12:37:04 -07:00
bors
945cf4fb21 Auto merge of #89144 - sexxi-goose:insig_stdlib, r=nikomatsakis
2229: Mark insignificant dtor in stdlib

I looked at all public [stdlib Drop implementations](https://doc.rust-lang.org/stable/std/ops/trait.Drop.html#implementors) and categorized them into Insigificant/Maybe/Significant Drop.

Reasons are noted here: https://docs.google.com/spreadsheets/d/19edb9r5lo2UqMrCOVjV0fwcSdS-R7qvKNL76q7tO8VA/edit#gid=1838773501

One thing missing from this PR is tagging HashMap as insigificant destructor as that needs some discussion.

r? `@Mark-Simulacrum`

cc `@nikomatsakis`
2021-10-04 12:36:06 -07:00
bors
f8e5fdaab6 Auto merge of #89125 - Aaron1011:remove-intercrate-cache, r=jackh726
Don't use projection cache or candidate cache in intercrate mode

Fixes #88969

It appears that *just* disabling the evaluation cache (in #88994)
leads to other issues involving intercrate mode caching. I suspect
that since we now always end up performing the full evaluation
in intercrate mode, we end up 'polluting' the candidate and projection
caches with results that depend on being in intercrate mode in some way.
Previously, we might have hit a cached evaluation (stored during
non-intercrate mode), and skipped doing this extra work in
intercrate mode.

The whole situation with intercrate mode caching is turning into
a mess. Ideally, we would remove intercrate mode entirely - however,
this might require waiting on Chalk.
2021-10-04 12:13:43 -07:00
Yuki Okushi
c981a57fe4 Rollup merge of #88996 - Aaron1011:trailing-macro-semi, r=petrochenkov
Fix linting when trailing macro expands to a trailing semi

When a macro is used in the trailing expression position of a block
(e.g. `fn foo() { my_macro!() }`), we currently parse it as an
expression, rather than a statement. As a result, we ended up
using the `NodeId` of the containing statement as our `lint_node_id`,
even though we don't normally do this for macro calls.

If such a macro expands to an expression with a `#[cfg]` attribute,
then the trailing statement can get removed entirely. This lead to
an ICE, since we were usng the `NodeId` of the expression to emit
a lint.

Ths commit makes us skip updating `lint_node_id` when handling
a macro in trailing expression position. This will cause us to
lint at the closest parent of the macro call.
2021-10-04 12:13:27 -07:00
bors
b893d562d6 Auto merge of #88994 - Aaron1011:intercrate-caching, r=jackh726
Disable the evaluation cache when in intercrate mode

It's possible to use the same `InferCtxt` with both
an intercrate and non-intercrate `SelectionContext`. However,
the local (inferctxt) evaluation cache is not aware of this
distinction, so this kind of `InferCtxt` re-use will pollute
the cache wth bad results.

This commit avoids the issue by disabling the evaluation cache
entirely during intercrate mode.
2021-10-04 12:13:05 -07:00
bors
d2e10d5cc6 Auto merge of #88979 - tmiasko:no-remove-zsts-in-generators, r=oli-obk
Disable RemoveZsts in generators to avoid query cycles

Querying layout of a generator requires its optimized MIR. Thus
computing layout during MIR optimization of a generator might create a
query cycle. Disable RemoveZsts in generators to avoid the issue
(similar approach is used in ConstProp transform already).

Fixes #88972.
2021-10-04 12:12:47 -07:00
bors
c0f9379260 Auto merge of #88587 - bdbai:fix/uwpio, r=joshtriplett
Fix WinUWP std compilation errors due to I/O safety

I/O safety for Windows has landed in #87329. However, it does not cover UWP specific parts and prevents all UWP targets from building. See https://github.com/YtFlow/Maple/issues/18. This PR fixes these compile errors when building std for UWP targets.
2021-10-04 12:11:44 -07:00
Eric Huss
a29557c9a6 [beta] Update cargo 2021-10-04 12:09:44 -07:00
bors
deef866109 Auto merge of #88946 - cuviper:beta-next, r=Mark-Simulacrum
[beta] backports

- rustdoc: Fix ICE with `doc(hidden)` on tuple variant fields #88639
- Fix 2021 `dyn` suggestion that used code as label #88657
- Workaround blink/chromium grid layout limitation of 1000 rows #88776
- Change scope of temporaries in match guards #88678
- Add a regression test for #88649 #88691
- Revert anon union parsing #88775
- Disable validate_maintainers. #88977

Also drop stage0 rustfmt, because that's only supposed to be used on master.

r? `@Mark-Simulacrum`
2021-09-17 12:26:24 +00:00
Eric Huss
ce1c9dce1b Disable debuginfo test on Windows that fails in new cdb version.
(cherry picked from commit 66a19876f7)
2021-09-16 09:12:23 -07:00
Eric Huss
207340dd97 Disable validate_maintainers.
(cherry picked from commit 6070763bc7)
2021-09-16 09:12:22 -07:00
Felix S. Klock II
533b5f7d7c regression test for issue #88583.
(cherry picked from commit 35370a7ba3)
2021-09-16 09:11:37 -07:00
Felix S. Klock II
73c80cde8c Re-add 71a7f8f188 post-revert.
(cherry picked from commit f26f1ed9a7)
2021-09-16 09:11:36 -07:00
Felix S. Klock II
983c1b1544 Revert "Implement Anonymous{Struct, Union} in the AST"
This reverts commit 059b68dd67.

Note that this was manually adjusted to retain some of the refactoring
introduced by commit 059b68dd67, so that it could
likewise retain the correction introduced in commit
5b4bc05fa5

(cherry picked from commit 91feb76d13)
2021-09-16 09:11:36 -07:00
Felix S. Klock II
48625e7677 Manually crafted revert of d4ad050ce5 .
(cherry picked from commit b6aa7e3105)
2021-09-16 09:11:36 -07:00
Felix S. Klock II
f6d517a1c8 Revert "Add test for restriction of anonymous types on validation"
This reverts commit 8a1dd6918b.

(cherry picked from commit f38ec9ca34)
2021-09-16 09:11:36 -07:00
Felix S. Klock II
2e9ac2c22f Revert "Fix ast expanded printing for anonymous types"
This reverts commit 5b4bc05fa5.

(cherry picked from commit 5560f6d90a)
2021-09-16 09:11:36 -07:00
Felix S. Klock II
d670969cf0 Revert "Add test for pretty printing anonymous types"
This reverts commit d59b1f1ef4.

(cherry picked from commit 2041fb1a2d)
2021-09-16 09:11:36 -07:00
Felix S. Klock II
74760e0bd2 Revert "Allow formatting Anonymous{Struct, Union} declarations"
This reverts commit 64acb7d921.

(cherry picked from commit 2691a39976)
2021-09-16 09:11:36 -07:00
hyd-dev
244a0979af Add a regression test for https://github.com/rust-lang/rust/issues/88649
(cherry picked from commit 214eef0435)
2021-09-16 09:10:32 -07:00
Matthew Jasper
726ab146d7 Change scope of temporaries in match guards
Each pattern in a match arm has its own copy of the match guard in MIR,
with its own temporary, so it has to be dropped before the the guards
are joined to the single copy of the arm.

(cherry picked from commit ad7f109bfa)
2021-09-16 09:10:02 -07:00
Stefan Schindler
6387590f06 Workaround blink/chromium grid layout limitation of 1000 rows
See https://github.com/rust-lang/rust/issues/88545 for more details

(cherry picked from commit 0bf16af5f3)
2021-09-14 15:10:29 -07:00
Noah Lev
5c76db10c5 Fix 2021 dyn suggestion that used code as label
The arguments to `span_suggestion` were in the wrong order, so the error
looked like this:

    error[E0783]: trait objects without an explicit `dyn` are deprecated
      --> src/test/ui/editions/dyn-trait-sugg-2021.rs:10:5
       |
    10 |     Foo::hi(123);
       |     ^^^ help: <dyn Foo>: `use `dyn``

Now the error looks like this, as expected:

    error[E0783]: trait objects without an explicit `dyn` are deprecated
      --> src/test/ui/editions/dyn-trait-sugg-2021.rs:10:5
       |
    10 |     Foo::hi(123);
       |     ^^^ help: use `dyn`: `<dyn Foo>`

This issue was only present in the 2021 error; the 2018 lint was
correct.

(cherry picked from commit 486d79f124)
2021-09-14 15:10:29 -07:00