Commit graph

154116 commits

Author SHA1 Message Date
bors
59eed8a2aa Auto merge of #90460 - pietroalbini:bidi-stable, r=nikomatsakis,pietroalbini
[stable] Fix CVE-2021-42574 and prepare Rust 1.56.1

This PR implements new lints to mitigate the impact of [CVE-2021-42574], caused by the presence of bidirectional-override Unicode codepoints in the compiled source code. [See the advisory][advisory] for more information about the vulnerability.

The changes in this PR will be released later today as part of Rust 1.56.1.

[CVE-2021-42574]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-42574
[advisory]: https://blog.rust-lang.org/2021/11/01/cve-2021-42574.html
2021-11-01 07:14:16 +00:00
Pietro Albini
6552f7a75a
ignore prim-methods-external-core rustdoc test on macOS
The test is for an unstable feature that doesn't affect the stable
release (no_core), and it's causing CI issues for macOS.
2021-11-01 08:12:01 +01:00
Pietro Albini
2e7743efe0
change version number to 1.56.1 2021-10-31 13:12:08 +01:00
Pietro Albini
c6d24de9f8
add 1.56.1 to the release notes 2021-10-31 13:11:36 +01:00
Esteban Küber
dd61274930
Lint against RTL unicode codepoints in literals and comments
Address CVE-2021-42574.
2021-10-31 13:04:30 +01:00
bors
09c42c4585 Auto merge of #90004 - pietroalbini:stable-next, r=pietroalbini
Rust 1.56.0 stable release

This PR bumps 1.56.0 to the stable channel. This also includes a backport for:

* Latest changes to the release notes
* #89867

r? `@ghost`
cc `@rust-lang/release`
2021-10-18 09:52:13 +00:00
Loïc BRANSTETT
7b9189aef3
Rework the equivalent test to work with sidebar-items.js 2021-10-18 10:48:15 +02:00
Loïc BRANSTETT
6307ecb63a
Add equivalent test in src/test/rustdoc 2021-10-18 10:48:10 +02:00
Urgau
e05ee65ac3
Apply documentation suggestions from code review
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
2021-10-18 10:48:06 +02:00
Loïc BRANSTETT
b5729387f3
Oops, inverted condition, fix that 2021-10-18 10:48:02 +02:00
Loïc BRANSTETT
f96a40f4db
Add regression test for #89852 2021-10-18 10:47:56 +02:00
Loïc BRANSTETT
aef5765479
Deduplicate macro_rules! from module_exports when documenting them
This can append if within the same module a `#[macro_export] macro_rules!`
is declared but also a reexport of itself producing two export of the same
macro in the same module. In that case we only want to document it once.
2021-10-18 10:47:29 +02:00
Pietro Albini
3197652fbe
bring updated release notes from master 2021-10-18 09:34:09 +02:00
Pietro Albini
47b1e6659b
switch release channel to stable 2021-10-18 09:28:38 +02:00
bors
7eda943963 Auto merge of #89924 - cuviper:beta-clone3, r=Mark-Simulacrum
Only use `clone3` when needed for pidfd

In #89522 we learned that `clone3` is interacting poorly with Gentoo's
`sandbox` tool. We only need that for the unstable pidfd extensions, so
otherwise avoid that and use a normal `fork`.

r? `@Mark-Simulacrum`
2021-10-16 15:27:00 +00:00
Josh Stone
74ef5300ef
Also note tool expectations of fork vs clone3
Co-authored-by: Josh Triplett <josh@joshtriplett.org>
2021-10-15 15:29:15 -07:00
Josh Stone
ad6e5e1bae Update another comment on fork vs. clone3 2021-10-15 14:45:23 -07:00
Josh Stone
de2e4836ad Only use clone3 when needed for pidfd
In #89522 we learned that `clone3` is interacting poorly with Gentoo's
`sandbox` tool. We only need that for the unstable pidfd extensions, so
otherwise avoid that and use a normal `fork`.
2021-10-15 12:21:45 -07:00
bors
58268ff091 Auto merge of #89854 - cuviper:beta-next, r=Mark-Simulacrum
[beta] backports

- 2229: Consume IfLet expr #89282
- Wrapper for -Z gcc-ld=lld to invoke rust-lld with the correct flavor #89288
- Fix unsound optimization with explicit variant discriminants #89489
- Fix stabilization version for bindings_after_at #89605
- Turn vtable_allocation() into a query #89619
- Revert "Stabilize Iterator::intersperse()" #89638
- Ignore type of projections for upvar capturing #89648
- ~~Add Poll::ready and~~ revert stabilization of task::ready! #89651
- CI: Use mirror for libisl downloads for more docker dist builds #89661
-  Use correct edition for panic in [debug_]assert!(). #89622
-  Switch to our own mirror of libisl plus ct-ng oldconfig fixes #89599
-  Emit item no type error even if type inference fails #89585
-  Revert enum discriminants #89884
2021-10-14 23:41:16 +00:00
Mark Rousskov
673a223e3b Revert "Stabilize arbitrary_enum_discriminant"
This reverts commit 7a62f29f31.
2021-10-14 10:56:35 -04:00
Gary Guo
8d944ebb58 Add regression test for ice 89574 2021-10-14 10:40:31 -04:00
Gary Guo
c418c6db2e Emit item no type error even if type inference fails 2021-10-14 10:40:26 -04:00
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