160792 Commits

Author SHA1 Message Date
Michael Goulet
5db4705598 resolve lifetimes for const generic defaults 2022-02-11 17:26:15 -05:00
Jeremy Banks
de2f0d5349 Remove obsolete no-op #[main] attribute from compiler. 2022-02-11 17:25:58 -05:00
bors
f58f0dfd72 Auto merge of #93846 - ehuss:beta-backports, r=ehuss
[beta] Backports

Backports of:

* #92611 — Add links to the reference and rust by example for asm! docs and lints
* #92983 — Update Linux runners to Ubuntu 20.04
* #93081 — Update LLVM submodule
* #93394 — Don't allow {} to refer to implicit captures in format_args.
* Cargo:
    * https://github.com/rust-lang/cargo/pull/10377 — Remove strip = "off" (and undocumented strip = "n"/strip = "no")
2022-02-11 03:28:31 +00:00
Eric Huss
5cdec688f6 [beta] Update cargo
Update includes:
* https://github.com/rust-lang/cargo/pull/10377
2022-02-09 20:04:33 -08:00
Mara Bos
120e33fbb2 Rollup merge of #93394 - m-ou-se:fix-93378, r=estebank
Don't allow {} to refer to implicit captures in format_args.

Fixes #93378
2022-02-09 20:00:35 -08:00
bors
560b4f3807 Auto merge of #93081 - nikic:aarch64-fix, r=cuviper
Update LLVM submodule

Update LLVM to fix #92786.
2022-02-09 20:00:17 -08:00
bors
2923c84d6a Auto merge of #92983 - pietroalbini:pa-bump-runner-images, r=Mark-Simulacrum
Update Linux runners to Ubuntu 20.04

r? `@Mark-Simulacrum`
2022-02-09 20:00:01 -08:00
Matthias Krüger
2cb7b2abfc Rollup merge of #92611 - Amanieu:asm-reference, r=m-ou-se
Add links to the reference and rust by example for asm! docs and lints

These were previously removed in #91728 due to broken links.

cc ``@ehuss`` since this updates the rust-by-example submodule
2022-02-09 19:59:37 -08:00
bors
0426998f5f Auto merge of #93523 - nagisa:branch-protection-revert-beta, r=Mark-Simulacrum
beta: Revert -Zbranch-protection

This reverts commit d331cb710f0dd969d779510a49a3bafc7f78a54e, reversing
changes made to 78fd0f633faaa5b6dd254fc1456735f63a1b1238.

This fixes #92885 as discussed on Zulip[1].

[1] https://zulip-archive.rust-lang.org/stream/238009-t-compiler/meetings/topic/.5Bweekly.5D.202022-01-27.20.2354818.html#269588396

r? `@Mark-Simulacrum`
2022-02-02 06:08:34 +00:00
Simonas Kazlauskas
b9610efd5d Revert -Zbranch-protection
This reverts commit d331cb710f0dd969d779510a49a3bafc7f78a54e, reversing
changes made to 78fd0f633faaa5b6dd254fc1456735f63a1b1238.

This is a fix for #92885 as discussed on Zulip[1].

[1] https://zulip-archive.rust-lang.org/stream/238009-t-compiler/meetings/topic/.5Bweekly.5D.202022-01-27.20.2354818.html#269588396
2022-01-31 23:02:55 +02:00
bors
28c8a34e18 Auto merge of #93377 - flip1995:beta-backport, r=Mark-Simulacrum
[beta] Clippy: Handle implicit named arguments in `useless_format`

Closes #92938

This backports a Clippy fix to beta, that was already backported for 1.58.1 in https://github.com/rust-lang/rust/pull/93110
2022-01-27 14:34:59 +00:00
Jason Newcomb
b57d411ad1
Handle implicit named arguments in useless_format 2022-01-27 15:16:26 +01:00
bors
436b81f58d Auto merge of #93306 - ehuss:beta-backports, r=ehuss
[beta] Backports

* Update cargo
    * https://github.com/rust-lang/cargo/pull/10328 — remove --host flag
    * https://github.com/rust-lang/cargo/pull/10325 — Fix documenting with undocumented dependencies
* https://github.com/rust-lang/rust/pull/93128 — Add script to prevent point releases with same number as existing ones
* https://github.com/rust-lang/rust/pull/93014 — Revert "Do not hash leading zero bytes of i64 numbers in Sip128 hasher"
* https://github.com/rust-lang/rust/pull/93012 — Update pulldown-cmark version to fix markdown list issue
2022-01-26 15:12:09 +00:00
Matthias Krüger
c67845871d Rollup merge of #93012 - GuillaumeGomez:pulldown-list, r=camelid
Update pulldown-cmark version to fix markdown list issue

Fixes #92971.

r? ```@camelid```
2022-01-25 12:29:53 -08:00
bors
e5e539c0de Auto merge of #93014 - Kobzol:revert-92103-stable-hash-skip-zero-bytes, r=the8472
Revert "Do not hash leading zero bytes of i64 numbers in Sip128 hasher"

Reverts rust-lang/rust#92103. It had a (in retrospect, obvious) correctness problem where changing the order of two adjacent values would produce identical hashes, which is problematic in stable hashing (see [this comment](https://github.com/rust-lang/rust/pull/92103#issuecomment-1014625442)).

I'll try to send the PR again with a fix for this issue.

r? `@the8472`
2022-01-25 12:29:28 -08:00
Matthias Krüger
9f7c5dce21 Rollup merge of #93128 - pietroalbini:pa-verify-stable-version-number, r=Mark-Simulacrum
Add script to prevent point releases with same number as existing ones

This will hopefully prevent what happened today with #93110 and #93121, where we built point release artifacts without changing version numbers, thus requiring another PR to change the version number.

r? `@Mark-Simulacrum`
2022-01-25 12:04:23 -08:00
Eric Huss
14b8f9aa68 [beta] Update cargo 2022-01-25 12:03:33 -08:00
bors
92c92fb3c1 Auto merge of #93111 - pietroalbini:pa-cve-2022-21658-beta, r=Mark-Simulacrum
[beta] Fix CVE-2022-21658

See https://blog.rust-lang.org/2022/01/20/cve-2022-21658.html. Patches reviewed by `@m-ou-se.`

Also backports:

*  resolve rustfmt issue with generated files #92912
*  rustdoc: fix intra-link for generic trait impls #92792
*  Fix rust logo style #92764

r? `@ghost`
2022-01-20 23:48:10 +00:00
Guillaume Gomez
046f8b89cc Add GUI test for rust logo style in the sidebars 2022-01-20 10:58:30 -05:00
Guillaume Gomez
f909100a3b Fix style for rust logo 2022-01-20 10:58:30 -05:00
Mahdi Dibaiee
4dceb072c7 rustdoc: add intra-doc trait impl test for extern types 2022-01-20 10:57:48 -05:00
Mahdi Dibaiee
bf46804b7d rustdoc: fix intra-link for generic trait impls 2022-01-20 10:57:45 -05:00
Caleb Cartwright
9fc25ab809 fix(rustfmt): resolve generated file formatting issue 2022-01-20 10:56:47 -05:00
Hans Kratz
c758a75df2
Fix compilation for a few tier 2 targets 2022-01-20 16:34:39 +01:00
Pietro Albini
1e884617ff
Update std::fs::remove_dir_all documentation 2022-01-19 15:56:24 +01:00
Alex Crichton
a935222f80
Fix CVE-2022-21658 for WASI 2022-01-19 15:56:22 +01:00
Hans Kratz
4c482ad2da
Fix CVE-2022-21658 for UNIX-like 2022-01-19 15:56:21 +01:00
Chris Denton
3d52c4c012
Fix CVE-2022-21658 for Windows 2022-01-19 15:56:19 +01:00
bors
98a701b425 Auto merge of #93010 - Mark-Simulacrum:beta-next, r=Mark-Simulacrum
[beta] rollup

This rolls up the following bumps onto the beta branch; no backports in this PR.

*  [beta] Bootstrap update #92888
*  [beta] backport cargo #92839

r? `@Mark-Simulacrum`
2022-01-19 02:33:16 +00:00
Weihang Lo
f61c455453 [beta] backport cargo 2022-01-17 14:16:37 -05:00
Pietro Albini
db07b11796 update the bootstrap compiler to the latest stable 2022-01-17 14:14:22 -05:00
bors
7c0b250923 Auto merge of #92734 - pietroalbini:beta-1.59.0, r=pietroalbini
[beta] Prepare 1.59.0 beta

cc `@rust-lang/release`
r? `@ghost`
2022-01-13 11:29:38 +00:00
Pietro Albini
7df20db1cb
bump rls 2022-01-13 11:09:37 +01:00
Pietro Albini
8c4b2dad14
fix unused warnings in rustfmt 2022-01-11 13:19:32 +01:00
Pietro Albini
19ae40b0f7
add dummy feature gate to make racer compile 2022-01-11 11:12:08 +01:00
Pietro Albini
34297971c9
switch to the beta channel 2022-01-10 17:19:04 +01:00
bors
02822334e9 Auto merge of #91305 - camelid:rm-cond, r=GuillaumeGomez
rustdoc: Remove apparently unnecessary conditional in `doc_value`

I need to remove this conditional for #91072, but while it seems
unnecessary, we are not certain. So, the plan is to first remove the
conditional and see if any regressions pop up before doing the refactor.
This way, it will be easier to revert if there are subtle regressions.

r? `@jyn514`
2022-01-08 08:55:46 +00:00
bors
84abaf3f7d Auto merge of #92664 - ehuss:rollup-t9yrvk5, r=ehuss
Rollup of 8 pull requests

Successful merges:

 - #84640 (Implement `TryFrom<char>` for `u8`)
 - #92336 (Remove &self from PrintState::to_string)
 - #92375 (Consolidate checking for msvc when generating debuginfo)
 - #92568 (Add note about non_exhaustive to variant_count)
 - #92600 (Add some missing `#[must_use]` to some `f{32,64}` operations)
 - #92610 (Create CSS class instead of using inline style for search results)
 - #92632 (Implement stabilization of `#[feature(available_parallelism)]`)
 - #92650 (Fix typo in `StableCrateId` docs)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-01-08 06:01:37 +00:00
Eric Huss
05cfc4f4a9
Rollup merge of #92650 - pierwill:patch-2, r=michaelwoerister
Fix typo in `StableCrateId` docs
2022-01-07 20:21:02 -08:00
Eric Huss
10010685a9
Rollup merge of #92632 - yoshuawuyts:stabilize-available-parallelism, r=joshtriplett
Implement stabilization of `#[feature(available_parallelism)]`

Stabilized in https://github.com/rust-lang/rust/issues/74479#issuecomment-984379800. Closes https://github.com/rust-lang/rust/issues/74479. Thanks!

cc/ ``@rust-lang/libs-api``
2022-01-07 20:21:01 -08:00
Eric Huss
759b13eb6c
Rollup merge of #92610 - GuillaumeGomez:css-class-instead-of-inline-style, r=jsha
Create CSS class instead of using inline style for search results

I saw this change in the update you proposed in https://github.com/rust-lang/rust/pull/92404. :)

r? ``@jsha``
2022-01-07 20:21:01 -08:00
Eric Huss
d43c9ad5d3
Rollup merge of #92600 - asquared31415:float-must-use, r=joshtriplett
Add some missing `#[must_use]` to some `f{32,64}` operations

This PR adds `#[must_use]` to the following methods:
 - `f32::recip`
 - `f32::max`
 - `f32::min`
 - `f32::maximum`
 - `f32::minimum`
 and their equivalents in `f64`.
 These methods all produce a new value without modifying the original and so are pointless to call without using the result.
2022-01-07 20:21:00 -08:00
Eric Huss
0bd7e2ff2e
Rollup merge of #92568 - Mark-Simulacrum:non-exhaustive-variant-count, r=the8472
Add note about non_exhaustive to variant_count

Since `variant_count` isn't returning something opaque, I thought it makes sense to explicitly call out that its return value may change for some enums.

cc #73662
2022-01-07 20:20:59 -08:00
Eric Huss
5cddd24daa
Rollup merge of #92375 - wesleywiser:consolidate_debuginfo_msvc_check, r=michaelwoerister
Consolidate checking for msvc when generating debuginfo

If the target we're generating code for is msvc, then we do two main
things differently: we generate type names in a C++ style instead of a
Rust style and we generate debuginfo for enums differently.

I've refactored the code so that there is one function
(`cpp_like_debuginfo`) which determines if we should use the C++ style
of naming types and other debuginfo generation or the regular Rust one.

r? ``@michaelwoerister``

This PR is not urgent so please don't let it interrupt your holidays! 🎄 🎁
2022-01-07 20:20:58 -08:00
Eric Huss
81c515bf77
Rollup merge of #92336 - dtolnay:printstateself, r=michaelwoerister
Remove &self from PrintState::to_string

The point of `PrintState::to_string` is to create a `State` and evaluate the caller's closure on it:

e9fbe79292/compiler/rustc_ast_pretty/src/pprust/state.rs (L868-L872)

Making the caller *also* construct and pass in a `State`, which is then ignored, was confusing.
2022-01-07 20:20:56 -08:00
Eric Huss
83de77dd5e
Rollup merge of #84640 - ids1024:u8_from_char, r=m-ou-se
Implement `TryFrom<char>` for `u8`

Previously suggested in https://github.com/rust-lang/rfcs/issues/2854.

It makes sense to have this since `char` implements `From<u8>`. Likewise `u32`, `u64`, and `u128` (since #79502) implement `From<char>`.
2022-01-07 20:20:55 -08:00
Ian Douglas Scott
a02639dc09 Implement TryFrom<char> for u8
Previously suggested in https://github.com/rust-lang/rfcs/issues/2854.

It makes sense to have this since `char` implements `From<u8>`. Likewise
`u32`, `u64`, and `u128` (since #79502) implement `From<char>`.
2022-01-07 12:28:47 -08:00
Wesley Wiser
836addcbc4 Consolidate checking for msvc when generating debuginfo
If the target we're generating code for is msvc, then we do two main
things differently: we generate type names in a C++ style instead of a
Rust style and we generate debuginfo for enums differently.

I've refactored the code so that there is one function
(`cpp_like_debuginfo`) which determines if we should use the C++ style
of naming types and other debuginfo generation or the regular Rust one.
2022-01-07 12:36:09 -05:00
pierwill
130ba4718e
Fix typo in StableCrateId docs 2022-01-07 10:26:26 -06:00
Yoshua Wuyts
3632f41c78 Stabilize #[feature(available_parallelism)] 2022-01-07 01:07:10 +01:00