]> git.lizzy.rs Git - rust.git/log
rust.git
22 months agoRollup merge of #100379 - davidtwco:triagebot-diag, r=Mark-Simulacrum
Matthias Krüger [Wed, 17 Aug 2022 10:32:50 +0000 (12:32 +0200)]
Rollup merge of #100379 - davidtwco:triagebot-diag, r=Mark-Simulacrum

triagebot: add translation-related mention groups

- Move some code around so that triagebot can ping relevant parties when translation logic is modified.
- Add mention groups to triagebot for translation-related files/folders.
- Auto-label pull requests with changes to translation-related files/folders with `A-translation`.

r? `@Mark-Simulacrum`

22 months agoRollup merge of #100018 - nnethercote:clean-up-LitKind, r=petrochenkov
Matthias Krüger [Wed, 17 Aug 2022 10:32:49 +0000 (12:32 +0200)]
Rollup merge of #100018 - nnethercote:clean-up-LitKind, r=petrochenkov

Clean up `LitKind`

r? ``@petrochenkov``

22 months agoRollup merge of #99972 - RalfJung:1zst, r=lcnr
Matthias Krüger [Wed, 17 Aug 2022 10:32:48 +0000 (12:32 +0200)]
Rollup merge of #99972 - RalfJung:1zst, r=lcnr

interpret: only consider 1-ZST when searching for receiver

`repr(transparent)` currently entirely rejects ZST with alignment larger than 1 (which is odd, arguably [this](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=02870f29396fa948c3123cb53d869ad1) should be accepted), so this should be safe. And if it ever isn't safe then that is very likely a bug elsewhere in the compiler.

22 months agoRollup merge of #99474 - aDotInTheVoid:rustdoc-json-noinline-test-cleanup, r=CraftSpider
Matthias Krüger [Wed, 17 Aug 2022 10:32:47 +0000 (12:32 +0200)]
Rollup merge of #99474 - aDotInTheVoid:rustdoc-json-noinline-test-cleanup, r=CraftSpider

Rustdoc json tests: New @hasexact test command

Alot of the time, we wanted to assert that a module had an exact set of items. Most of the time this was done by asserting that the ```@count``` of the module was `n`, and then doing `n` ```@has``` checks on the module.

This was tedious, so often shortcuts were done.

This PR adds a new command to jsondocck to allow consistently expressing this behavior, and then uses it to clean up the tests.

``@rustbot`` modify labels: +A-rustdoc-json +A-testsuite

22 months agoAuto merge of #100644 - TaKO8Ki:rollup-n0o6a1t, r=TaKO8Ki
bors [Tue, 16 Aug 2022 21:10:08 +0000 (21:10 +0000)]
Auto merge of #100644 - TaKO8Ki:rollup-n0o6a1t, r=TaKO8Ki

Rollup of 4 pull requests

Successful merges:

 - #100243 (Remove opt_remap_env_constness from rustc_query_impl)
 - #100625 (Add `IpDisplayBuffer` helper struct.)
 - #100629 (Use `merged_ty` method instead of rewriting it every time)
 - #100630 (rustdoc JSON: Fix ICE with `pub extern crate self as <self_crate_name>`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

22 months agoRollup merge of #100630 - Enselic:export_extern_crate_as_self, r=GuillaumeGomez
Takayuki Maeda [Tue, 16 Aug 2022 20:08:05 +0000 (05:08 +0900)]
Rollup merge of #100630 - Enselic:export_extern_crate_as_self, r=GuillaumeGomez

rustdoc JSON: Fix ICE with `pub extern crate self as <self_crate_name>`

Closes #100531

r? `@GuillaumeGomez`

`@rustbot` labels +A-rustdoc-json +T-rustdoc

22 months agoRollup merge of #100629 - GuillaumeGomez:merged-ty, r=compiler-errors
Takayuki Maeda [Tue, 16 Aug 2022 20:08:04 +0000 (05:08 +0900)]
Rollup merge of #100629 - GuillaumeGomez:merged-ty, r=compiler-errors

Use `merged_ty` method instead of rewriting it every time

`merged_ty` [source code](https://doc.rust-lang.org/nightly/nightly-rustc/src/rustc_typeck/check/coercion.rs.html#1331-1333) is quite literally the same, so instead of rewriting it, makes more sense to use the method instead.

r? `@compiler-errors`

22 months agoRollup merge of #100625 - reitermarkus:ip-display-buffer, r=thomcc
Takayuki Maeda [Tue, 16 Aug 2022 20:08:03 +0000 (05:08 +0900)]
Rollup merge of #100625 - reitermarkus:ip-display-buffer, r=thomcc

Add `IpDisplayBuffer` helper struct.

This removes the dependency on `std::io::Write` for implementing `Display`, allowing it to be moved to `core` as proposed in https://github.com/rust-lang/rfcs/pull/2832.

22 months agoRollup merge of #100243 - kckeiks:remove-macros-in-query-system, r=cjgillot
Takayuki Maeda [Tue, 16 Aug 2022 20:08:02 +0000 (05:08 +0900)]
Rollup merge of #100243 - kckeiks:remove-macros-in-query-system, r=cjgillot

Remove opt_remap_env_constness from rustc_query_impl

1st task off #96524.

r? `@cjgillot`

22 months agoAuto merge of #100626 - Dylan-DPC:rollup-mwbm7kj, r=Dylan-DPC
bors [Tue, 16 Aug 2022 18:07:02 +0000 (18:07 +0000)]
Auto merge of #100626 - Dylan-DPC:rollup-mwbm7kj, r=Dylan-DPC

Rollup of 6 pull requests

Successful merges:

 - #99942 (Fix nonsense non-tupled `Fn` trait error)
 - #100609 (Extend invalid floating point literal suffix suggestion)
 - #100610 (Ast and parser tweaks)
 - #100613 (compiletest: fix typo in runtest.rs)
 - #100616 (:arrow_up: rust-analyzer)
 - #100622 (Support 128-bit atomics on all aarch64 targets)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

22 months agoSimplify `IpDisplayBuffer` API.
Markus Reiter [Tue, 16 Aug 2022 17:32:00 +0000 (19:32 +0200)]
Simplify `IpDisplayBuffer` API.

22 months agoUse `MaybeUninit<u8>` for `IpDisplayBuffer`.
Markus Reiter [Tue, 16 Aug 2022 16:12:06 +0000 (18:12 +0200)]
Use `MaybeUninit<u8>` for `IpDisplayBuffer`.

22 months agoMove `IpDisplayBuffer` into submodule.
Markus Reiter [Tue, 16 Aug 2022 15:48:55 +0000 (17:48 +0200)]
Move `IpDisplayBuffer` into submodule.

22 months agoAdd `IpDisplayBuffer` helper struct.
Markus Reiter [Tue, 16 Aug 2022 12:42:00 +0000 (14:42 +0200)]
Add `IpDisplayBuffer` helper struct.

22 months agorustdoc JSON: Fix ICE with `pub extern crate self as <self_crate_name>`
Martin Nordholts [Tue, 16 Aug 2022 13:37:31 +0000 (15:37 +0200)]
rustdoc JSON: Fix ICE with `pub extern crate self as <self_crate_name>`

22 months agoUse `merged_ty` method instead of rewriting it every time
Guillaume Gomez [Tue, 16 Aug 2022 13:33:46 +0000 (15:33 +0200)]
Use `merged_ty` method instead of rewriting it every time

22 months agoRollup merge of #100622 - taiki-e:aarch64-atomic-128, r=Amanieu
Dylan DPC [Tue, 16 Aug 2022 12:46:16 +0000 (18:16 +0530)]
Rollup merge of #100622 - taiki-e:aarch64-atomic-128, r=Amanieu

Support 128-bit atomics on all aarch64 targets

Some aarch64 targets currently set `max_atomic_width` to 64, but aarch64 always supports 128-bit atomics.

r? `@Amanieu`

22 months agoRollup merge of #100616 - lnicola:rust-analyzer-2022-08-16, r=lnicola
Dylan DPC [Tue, 16 Aug 2022 12:46:15 +0000 (18:16 +0530)]
Rollup merge of #100616 - lnicola:rust-analyzer-2022-08-16, r=lnicola

:arrow_up: rust-analyzer

r? `@ghost`

22 months agoRollup merge of #100613 - eltociear:patch-15, r=Mark-Simulacrum
Dylan DPC [Tue, 16 Aug 2022 12:46:14 +0000 (18:16 +0530)]
Rollup merge of #100613 - eltociear:patch-15, r=Mark-Simulacrum

compiletest: fix typo in runtest.rs

nonexistant -> nonexistent

22 months agoRollup merge of #100610 - nnethercote:ast-and-parser-tweaks, r=spastorino
Dylan DPC [Tue, 16 Aug 2022 12:46:13 +0000 (18:16 +0530)]
Rollup merge of #100610 - nnethercote:ast-and-parser-tweaks, r=spastorino

Ast and parser tweaks

r? `@spastorino`

22 months agoRollup merge of #100609 - chenyukang:fix-100527, r=davidtwco
Dylan DPC [Tue, 16 Aug 2022 12:46:12 +0000 (18:16 +0530)]
Rollup merge of #100609 - chenyukang:fix-100527, r=davidtwco

Extend invalid floating point literal suffix suggestion

Fixes #100527

22 months agoRollup merge of #99942 - compiler-errors:nonsense-un-tupled-fn-trait-error, r=cjgillot
Dylan DPC [Tue, 16 Aug 2022 12:46:11 +0000 (18:16 +0530)]
Rollup merge of #99942 - compiler-errors:nonsense-un-tupled-fn-trait-error, r=cjgillot

Fix nonsense non-tupled `Fn` trait error

Given this code:

```rust
#![feature(unboxed_closures)]

fn a<F: Fn<usize>>(f: F) {}

fn main() {
    a(|_: usize| {});
}
```

We currently emit this error:
```
error[E0631]: type mismatch in closure arguments
 --> src/main.rs:6:5
  |
6 |     a(|_: usize| {});
  |     ^ ---------- found signature of `fn(usize) -> _`
  |     |
  |     expected signature of `fn(usize) -> _`
  |
note: required by a bound in `a`
 --> src/main.rs:3:9
  |
3 | fn a<F: Fn<usize>>(f: F) {}
  |         ^^^^^^^^^ required by this bound in `a`

For more information about this error, try `rustc --explain E0631`.
error: could not compile `playground` due to previous error
```
Notably, it says the same thing for "expected" and "found"!

Fix the output so that we instead emit:
```
error[E0308]: mismatched types
 --> /home/gh-compiler-errors/test.rs:6:5
  |
6 |     a(|_: usize| {});
  |     ^ types differ
  |
  = note: expected trait `Fn<usize>`
             found trait `Fn<(usize,)>`
note: required by a bound in `a`
 --> /home/gh-compiler-errors/test.rs:3:9
  |
3 | fn a<F: Fn<usize>>(f: F) {}
  |         ^^^^^^^^^ required by this bound in `a`

error: aborting due to previous error
```

The error could still use some work, namely the "mismatched types" part, but I'm leaving it a bit rough since the only way you'd ever get this error is when you're messing with `#![feature(unboxed_closures)]`.

Simply making sure we actually print out the difference in trait-refs is good enough for me. I could probably factor in some additional improvements if those are desired.

22 months agouse proper words in help message for floating point
yukang [Tue, 16 Aug 2022 11:12:36 +0000 (19:12 +0800)]
use proper words in help message for floating point

22 months agoAuto merge of #99612 - yanchen4791:issue-95079-fix, r=compiler-errors
bors [Tue, 16 Aug 2022 11:00:25 +0000 (11:00 +0000)]
Auto merge of #99612 - yanchen4791:issue-95079-fix, r=compiler-errors

Fix #95079 unhelpful error when missing move in nested closure

Fix #95079 by adding help for missing move in nested closure

22 months agoSupport 128-bit atomics on all aarch64 targets
Taiki Endo [Tue, 16 Aug 2022 10:52:19 +0000 (19:52 +0900)]
Support 128-bit atomics on all aarch64 targets

22 months ago:arrow_up: rust-analyzer
Laurențiu Nicola [Tue, 16 Aug 2022 08:24:50 +0000 (11:24 +0300)]
:arrow_up: rust-analyzer

22 months agoAuto merge of #100441 - nnethercote:shrink-ast-Attribute, r=petrochenkov
bors [Tue, 16 Aug 2022 07:54:22 +0000 (07:54 +0000)]
Auto merge of #100441 - nnethercote:shrink-ast-Attribute, r=petrochenkov

Shrink `ast::Attribute`.

r? `@ghost`

22 months agocompiletest: fix typo in runtest.rs
Ikko Ashimine [Tue, 16 Aug 2022 07:51:52 +0000 (16:51 +0900)]
compiletest: fix typo in runtest.rs

nonexistant -> nonexistent

22 months agoAuto merge of #100611 - matthiaskrgr:rollup-rxj10ur, r=matthiaskrgr
bors [Tue, 16 Aug 2022 05:13:38 +0000 (05:13 +0000)]
Auto merge of #100611 - matthiaskrgr:rollup-rxj10ur, r=matthiaskrgr

Rollup of 6 pull requests

Successful merges:

 - #100338 (when there are 3 or more return statements in the loop)
 - #100384 (Add support for generating unique profraw files by default when using `-C instrument-coverage`)
 - #100460 (Update the minimum external LLVM to 13)
 - #100567 (Add missing closing quote)
 - #100590 (Suggest adding an array length if possible)
 - #100600 (Rename Machine memory hooks to suggest when they run)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

22 months agoRollup merge of #100600 - saethlin:rename-memory-hooks, r=RalfJung
Matthias Krüger [Tue, 16 Aug 2022 04:06:00 +0000 (06:06 +0200)]
Rollup merge of #100600 - saethlin:rename-memory-hooks, r=RalfJung

Rename Machine memory hooks to suggest when they run

Some of the other memory hooks start with `before_` or `after_` to indicate that they run before or after a certain operation. These don't, so I was a bit confused as to when they are supposed to run.

`memory_read` can be read two ways in English, "memory was read" or "this is a memory read" so without the prefix this was especially ambiguous.

22 months agoRollup merge of #100590 - TaKO8Ki:suggest-adding-array-length, r=compiler-errors
Matthias Krüger [Tue, 16 Aug 2022 04:05:59 +0000 (06:05 +0200)]
Rollup merge of #100590 - TaKO8Ki:suggest-adding-array-length, r=compiler-errors

Suggest adding an array length if possible

fixes #100448

22 months agoRollup merge of #100567 - Rageking8:fix-100563, r=wesleywiser
Matthias Krüger [Tue, 16 Aug 2022 04:05:58 +0000 (06:05 +0200)]
Rollup merge of #100567 - Rageking8:fix-100563, r=wesleywiser

Add missing closing quote

fixes #100563

22 months agoRollup merge of #100460 - cuviper:drop-llvm-12, r=nagisa
Matthias Krüger [Tue, 16 Aug 2022 04:05:57 +0000 (06:05 +0200)]
Rollup merge of #100460 - cuviper:drop-llvm-12, r=nagisa

Update the minimum external LLVM to 13

With this change, we'll have stable support for LLVM 13 through 15 (pending release).
For reference, the previous increase to LLVM 12 was #90175.

r? `@nagisa`

22 months agoRollup merge of #100384 - ridwanabdillahi:instr_profile_output, r=wesleywiser
Matthias Krüger [Tue, 16 Aug 2022 04:05:56 +0000 (06:05 +0200)]
Rollup merge of #100384 - ridwanabdillahi:instr_profile_output, r=wesleywiser

Add support for generating unique profraw files by default when using `-C instrument-coverage`

Currently, enabling the rustc flag `-C instrument-coverage` instruments the given crate and by default uses the naming scheme `default.profraw` for any instrumented profile files generated during the execution of a binary linked against this crate. This leads to multiple binaries being executed overwriting one another and causing only the last executable run to contain actual coverage results.

This can be overridden by manually setting the environment variable `LLVM_PROFILE_FILE` to use a unique naming scheme.

This PR adds a change to add support for a reasonable default for rustc to use when enabling coverage instrumentation similar to how the Rust compiler treats generating these same `profraw` files when PGO is enabled.

The new naming scheme is set to `default_%m_%p.profraw` to ensure the uniqueness of each file being generated using [LLVMs special pattern strings](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html#running-the-instrumented-program).

Today the compiler sets the default for PGO `profraw` files to `default_%m.profraw` to ensure a unique file for each run. The same can be done for the instrumented profile files generated via the `-C instrument-coverage` flag as well which LLVM has API support for.

Linked Issue: https://github.com/rust-lang/rust/issues/100381

r? `@wesleywiser`

22 months agoRollup merge of #100338 - lyming2007:issue-100285-fix, r=petrochenkov
Matthias Krüger [Tue, 16 Aug 2022 04:05:55 +0000 (06:05 +0200)]
Rollup merge of #100338 - lyming2007:issue-100285-fix, r=petrochenkov

when there are 3 or more return statements in the loop

emit the first 3 errors and duplicated diagnostic information
modified:   compiler/rustc_typeck/src/check/coercion.rs
new file:   src/test/ui/typeck/issue-100285.rs
new file:   src/test/ui/typeck/issue-100285.stderr

22 months agoRename some things related to literals.
Nicholas Nethercote [Mon, 1 Aug 2022 06:46:08 +0000 (16:46 +1000)]
Rename some things related to literals.

- Rename `ast::Lit::token` as `ast::Lit::token_lit`, because its type is
  `token::Lit`, which is not a token. (This has been confusing me for a
  long time.)
  reasonable because we have an `ast::token::Lit` inside an `ast::Lit`.
- Rename `LitKind::{from,to}_lit_token` as
  `LitKind::{from,to}_token_lit`, to match the above change and
  `token::Lit`.

22 months agoAdd some more AST node size assertions.
Nicholas Nethercote [Tue, 16 Aug 2022 02:18:34 +0000 (12:18 +1000)]
Add some more AST node size assertions.

There is some redundancy here, but the extra assertions make it easier
to keep track of relative things, e.g. `ExprKind` is the biggest part
of `Expr`.

22 months agoExtend invalid floating point literal suffix suggestion
yukang [Tue, 16 Aug 2022 02:50:04 +0000 (10:50 +0800)]
Extend invalid floating point literal suffix suggestion

22 months agoAuto merge of #100237 - cjgillot:no-special-hash-hir, r=nagisa
bors [Tue, 16 Aug 2022 02:32:47 +0000 (02:32 +0000)]
Auto merge of #100237 - cjgillot:no-special-hash-hir, r=nagisa

Remove manual implementations of HashStable for hir::Expr and hir::Ty.

We do not need to force hashing HIR bodies inside those nodes. The contents of bodies are not accessible from the `hir_owner` query which used `hash_without_bodies`. When the content of a body is required, the access is still done using `hir_owner_nodes`, which continues hashing HIR bodies.

22 months agoAvoid unnecessary cloning in `Parser::get_ident_from_generic_arg`.
Nicholas Nethercote [Tue, 16 Aug 2022 02:14:52 +0000 (12:14 +1000)]
Avoid unnecessary cloning in `Parser::get_ident_from_generic_arg`.

22 months agoRemove `{ast,hir}::WhereEqPredicate::id`.
Nicholas Nethercote [Fri, 29 Jul 2022 00:16:25 +0000 (10:16 +1000)]
Remove `{ast,hir}::WhereEqPredicate::id`.

These fields are unused.

22 months agoRemove usages of opt_remap_env_constness
Miguel Guarniz [Mon, 15 Aug 2022 18:36:03 +0000 (14:36 -0400)]
Remove usages of opt_remap_env_constness

Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
22 months agoCorrect meaning of two UI tests
Michael Goulet [Sat, 30 Jul 2022 09:44:22 +0000 (09:44 +0000)]
Correct meaning of two UI tests

22 months agoFix error message with non-tupled bare fn trait
Michael Goulet [Sat, 30 Jul 2022 09:41:19 +0000 (09:41 +0000)]
Fix error message with non-tupled bare fn trait

22 months agoMake `ExtCtxt::expr_lit` non-`pub`.
Nicholas Nethercote [Mon, 1 Aug 2022 07:14:55 +0000 (17:14 +1000)]
Make `ExtCtxt::expr_lit` non-`pub`.

By using `expr_str` more and adding `expr_{char,byte_str}`.

22 months agoAvoid code duplication in `{MetaItem,MetaItemKind}::value_str`.
Nicholas Nethercote [Mon, 1 Aug 2022 06:32:42 +0000 (16:32 +1000)]
Avoid code duplication in `{MetaItem,MetaItemKind}::value_str`.

The two methods are almost identical.

22 months agoShrink `ast::Attribute`.
Nicholas Nethercote [Thu, 11 Aug 2022 11:06:11 +0000 (21:06 +1000)]
Shrink `ast::Attribute`.

22 months agoAuto merge of #100007 - ChrisDenton:dtor-inline-never, r=michaelwoerister
bors [Mon, 15 Aug 2022 23:57:44 +0000 (23:57 +0000)]
Auto merge of #100007 - ChrisDenton:dtor-inline-never, r=michaelwoerister

Never inline Windows dtor access

Inlining can cause problem If used in a Rust dylib. See #44391.

r? `@Mark-Simulacrum`

22 months agoRename Machine memory hooks to suggest when they run
Ben Kimock [Mon, 15 Aug 2022 22:06:06 +0000 (18:06 -0400)]
Rename Machine memory hooks to suggest when they run

22 months agowhen there are 3 or more return statements in the loop
Yiming Lei [Tue, 9 Aug 2022 18:27:04 +0000 (11:27 -0700)]
when there are 3 or more return statements in the loop
emit the first 3 errors and duplicated diagnostic information
using take of iterator for the first third return
modified:   compiler/rustc_typeck/src/check/coercion.rs
new file:   src/test/ui/typeck/issue-100285.rs
new file:   src/test/ui/typeck/issue-100285.stderr

22 months agouse `span_suggestion` instead of `span_suggestion_verbose`
Takayuki Maeda [Mon, 15 Aug 2022 18:42:58 +0000 (03:42 +0900)]
use `span_suggestion` instead of `span_suggestion_verbose`

22 months agoAuto merge of #100595 - matthiaskrgr:rollup-f1zur58, r=matthiaskrgr
bors [Mon, 15 Aug 2022 18:27:37 +0000 (18:27 +0000)]
Auto merge of #100595 - matthiaskrgr:rollup-f1zur58, r=matthiaskrgr

Rollup of 10 pull requests

Successful merges:

 - #100031 (improve "try ignoring the field" diagnostic)
 - #100325 (Rustdoc-Json: Don't remove impls for items imported from private modules)
 - #100377 (Replace - with _ in fluent slugs to improve developer workflows)
 - #100458 (Adjust span of fn argument declaration)
 - #100514 (Delay span bug when failing to normalize negative coherence impl subject due to other malformed impls)
 - #100528 (Support 1st group of RISC-V Bitmanip backend target features)
 - #100559 (Parser simplifications)
 - #100568 (Fix STD build for ESP-IDF)
 - #100582 ([rustdoc] Fix handling of stripped enum variant in JSON output format)
 - #100586 (Reland changes replacing num_cpus with available_parallelism )

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

22 months agoFix #95079 by adding help and suggestion for missing move in nested closure
Yan Chen [Fri, 22 Jul 2022 16:53:39 +0000 (09:53 -0700)]
Fix #95079 by adding help and suggestion for missing move in nested closure

22 months agoRollup merge of #100586 - the8472:available_parallelism_2, r=jyn514
Matthias Krüger [Mon, 15 Aug 2022 18:11:41 +0000 (20:11 +0200)]
Rollup merge of #100586 - the8472:available_parallelism_2, r=jyn514

Reland changes replacing num_cpus with available_parallelism

Since #97925 added cgroupv1 support the problem in #97549 which lead to the previous revert should be addressed now.

Cargo has reapplied the replacement too https://github.com/rust-lang/cargo/pull/10969

Reverts 1ae4b258267462da0b1aae1badcf83578153c799 (part of #97911)
Relands #94524

22 months agoRollup merge of #100582 - GuillaumeGomez:rustdoc-json-stripped-enum-variant, r=notriddle
Matthias Krüger [Mon, 15 Aug 2022 18:11:40 +0000 (20:11 +0200)]
Rollup merge of #100582 - GuillaumeGomez:rustdoc-json-stripped-enum-variant, r=notriddle

[rustdoc] Fix handling of stripped enum variant in JSON output format

Fixes https://github.com/rust-lang/rust/issues/100529.

cc ``@aDotInTheVoid`` ``@Enselic``
r? ``@notriddle``

22 months agoRollup merge of #100568 - ivmarkov:master, r=Mark-Simulacrum
Matthias Krüger [Mon, 15 Aug 2022 18:11:39 +0000 (20:11 +0200)]
Rollup merge of #100568 - ivmarkov:master, r=Mark-Simulacrum

Fix STD build for ESP-IDF

We have accidentally broken the STD build for the Tier 3 `target_os="espidf"` (only) by pushing non-buildable changes to `libc` which ended up in version 0.2.229.

`libc` [was fixed](https://github.com/rust-lang/libc/commit/d0e3ff01a808d429baf925bf0e6e5f2273de1ac0) from V0.2.230 onwards. This PR is only upgrading the `libc` dependency in `Cargo.lock` to latest (V0.2.231).

`Cargo.lock` was modified by using `cargo update -p libc`.

22 months agoRollup merge of #100559 - nnethercote:parser-simplifications, r=compiler-errors
Matthias Krüger [Mon, 15 Aug 2022 18:11:38 +0000 (20:11 +0200)]
Rollup merge of #100559 - nnethercote:parser-simplifications, r=compiler-errors

Parser simplifications

Best reviewed one commit at a time.

r? ``@compiler-errors``

22 months agoRollup merge of #100528 - tux3:riscv-bitmanip-features, r=davidtwco
Matthias Krüger [Mon, 15 Aug 2022 18:11:37 +0000 (20:11 +0200)]
Rollup merge of #100528 - tux3:riscv-bitmanip-features, r=davidtwco

Support 1st group of RISC-V Bitmanip backend target features

These target features use the same names as LLVM and `is_riscv_feature_detected!`, they are:
- zba (address generation instructions)
- zbb (basic bit manipulation)
- zbc (carry-less multiplication)
- zbs (single-bit manipulation)

The extension is frozen and ratified, and I don't think we should expect LLVM to change those feature names in the future.
For reference, the specification for the B extension can be found here: https://github.com/riscv/riscv-bitmanip/releases/download/1.0.0/bitmanip-1.0.0-38-g865e7a7.pdf)

On my current project, I see a 7.6% reduction in binary size with these features on, so I have some incentive to try to silence the "unknown feature" warning from `-Ctarget-feature` =)

22 months agoRollup merge of #100514 - compiler-errors:issue-100191, r=spastorino
Matthias Krüger [Mon, 15 Aug 2022 18:11:36 +0000 (20:11 +0200)]
Rollup merge of #100514 - compiler-errors:issue-100191, r=spastorino

Delay span bug when failing to normalize negative coherence impl subject due to other malformed impls

Fixes #100191

r? ``@spastorino``

22 months agoRollup merge of #100458 - compiler-errors:fn-argument-span, r=estebank
Matthias Krüger [Mon, 15 Aug 2022 18:11:35 +0000 (20:11 +0200)]
Rollup merge of #100458 - compiler-errors:fn-argument-span, r=estebank

Adjust span of fn argument declaration

Span of a fn argument declaration goes from:

```
fn foo(i : i32 , ...)
       ^^^^^^^^
```

to:

```
fn foo(i : i32 , ...)
       ^^^^^^^
```

That is, we don't include the extra spacing up to the trailing comma, which I think is more correct.

cc https://github.com/rust-lang/rust/pull/99646#discussion_r944568074
r? ``@estebank``

---

The two tests that had dramatic changes in their rendering I think actually are improved, though they are kinda poor spans both before and after the changes. :shrug: Thoughts?

22 months agoRollup merge of #100377 - est31:fluent_grepability, r=davidtwco
Matthias Krüger [Mon, 15 Aug 2022 18:11:34 +0000 (20:11 +0200)]
Rollup merge of #100377 - est31:fluent_grepability, r=davidtwco

Replace - with _ in fluent slugs to improve developer workflows

This is a proposal to smoothen the compiler contribution experience in the face of the move to fluent.

## Context

The fluent project has introduced a layer of abstraction to compiler errors. Previously, people would write down error messages directly in the same file the code was located to emit them. Now, there is a slug that connects the code in the compiler to the error message in the ftl file.

You can look at 7ef610c003f8072ec4ca4ecf195922a9a44e48dd to see an example of the changes:

Old:
```Rust
let msg = format!(
    "bounds on `{}` are most likely incorrect, consider instead \
        using `{}` to detect whether a type can be trivially dropped",
    predicate,
    cx.tcx.def_path_str(needs_drop)
);
lint.build(&msg).emit();
```
New (Rust side):
```Rust
lint.build(fluent::lint::drop_trait_constraints)
    .set_arg("predicate", predicate)
    .set_arg("needs_drop", cx.tcx.def_path_str(needs_drop))
    .emit();
```
New (Fluent side):
```fluent
lint-drop-trait-constraints =
    bounds on `{$predicate}` are most likely incorrect, consider instead using `{$needs_drop}` to detect whether a type can be trivially dropped
```

You will note that in the ftl file, the slug is slightly different from the slug in the Rust file: The ftl slug uses `-` (e.g. `lint-drop-trait-constraints`) while the rust slug uses `::` and `_` (e.g. `lint::drop_trait_constraints`). This choice was probably done due to:

* Rust not accepting `-` in identifiers (as it is an operator)
* fluent not supporting the `:` character in slug names (parse error upon attempts)
* all official fluent documentation using `-` instead of `_`

## The problem

The two different types of slugs, one with `-`, and one with `_`, cause difficulties for contributors. Imagine you don't have perfect knowledge of where stuff is in the compiler (i would say this is most people), and you encounter an error for which you think there is something you could improve that is not just a rewording.

So you want to find out where in the compiler's code that error is being emitted. The best way is via grepping.

1. you grep for the message in the compiler's source code. You discover the ftl file and find out the slug for that error.
2. That slug however contains `-` instead of `_`, so you have to manually translate the `-`'s into `_`s, and furthermore either remove the leading module name, or replace the first `-` with a `::`.
3. you do a second grep to get to the emitting location in the compiler's code.

This translation difficulty in step 2 appears also in the other direction when you want to figure out what some code in the compiler is doing and use error messages to help your understanding. Comments and variable names are way less exposed to users so [are more likely going to lie](https://github.com/rust-lang/rust/commit/cc3c5d2700481bae497d6cde825c1d48e79c776a) than error messages.

I think that at least the `-`→`_` translation which makes up most of step 2 can be removed at low cost.

## The solution

If you look closely, the practice of fluent to use `-` is only a stylistic choice and it is not enforced by fluent implementations, neither the playground nor the one the rust compiler uses, that slugs may not contain `_`. Thus, we can in fact migrate the ftl side to `_`. So now we'll have slugs like  `lint_drop_trait_constraints` on the ftl side. You only have to do one replacement now to get to the Rust slug: remove the first `_` and place a `::` in its stead. I would argue that this change is in fact useful as it allows you to control whether you want to look at the rust side of things or the ftl side of things via changing the query string only: with an increased number of translations checked into the repository, grepping for raw slugs will return the slug in many ftl files, so an explicit step to look for the source code is always useful. In the other direction (rust to fluent), you don't need a translation at all any more, as you can just take the final piece of the slug (e.g. `drop_trait_constraints`) and grep for that. The PR also adds enforcement to forbid usage of `_` in slug names. Internal slug names (those leading with a `-`) are exempt from that enforcement.

As another workflow that benefits from this change, people who add new errors don't have to do that `-` conversion either.

| Before/After | Fluent slug | Rust slug (no change) |
|--|--|--|
| Before | `lint-drop-trait-constraints` | `lint::drop_trait_constraints`|
| After | `lint_drop_trait_constraints` | `lint::drop_trait_constraints`|

Note that I've suggested this previously in the translation thread on zulip. I think it's important to think about non-translator contribution impact of fluent. I have certainly plans for more improvements, but this is a good first step.

``@rustbot`` label A-diagnostics

22 months agoRollup merge of #100325 - aDotInTheVoid:rdj-import-impl, r=GuillaumeGomez
Matthias Krüger [Mon, 15 Aug 2022 18:11:33 +0000 (20:11 +0200)]
Rollup merge of #100325 - aDotInTheVoid:rdj-import-impl, r=GuillaumeGomez

Rustdoc-Json: Don't remove impls for items imported from private modules

After #99287, items in private modules may still be in the json output, if a public import accesses them. To reflect this, items that are imported need to be marked as retained in the `Stripper` pass, so their impls arn't removed by `ImplStripper`.

[More context on zulip](https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/Populating.20cache.2Eimpls), thanks to @ jyn514 for helping debug this.

``@rustbot`` modify labels: +A-rustdoc-json +T-rustdoc

r? ``@GuillaumeGomez``

Fixes #100252
Fixes #100242

22 months agoRollup merge of #100031 - GoldsteinE:try-removing-the-field, r=michaelwoerister
Matthias Krüger [Mon, 15 Aug 2022 18:11:32 +0000 (20:11 +0200)]
Rollup merge of #100031 - GoldsteinE:try-removing-the-field, r=michaelwoerister

improve "try ignoring the field" diagnostic

Closes #95795

22 months agoRemove opt_remap_env_constness from rustc_query_impl
Miguel Guarniz [Sun, 7 Aug 2022 17:54:01 +0000 (13:54 -0400)]
Remove opt_remap_env_constness from rustc_query_impl

Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
22 months agorustdoc: Mark imported items as retained
Nixon Enraght-Moony [Tue, 9 Aug 2022 14:52:18 +0000 (15:52 +0100)]
rustdoc: Mark imported items as retained

Fixes a bug where impl of items that were imported from a private module
would be striped

Fixes #100252
Fixes #100242

22 months agoAuto merge of #100569 - matthiaskrgr:rollup-9450lzs, r=matthiaskrgr
bors [Mon, 15 Aug 2022 15:25:31 +0000 (15:25 +0000)]
Auto merge of #100569 - matthiaskrgr:rollup-9450lzs, r=matthiaskrgr

Rollup of 6 pull requests

Successful merges:

 - #100211 (Refuse to codegen an upstream static.)
 - #100277 (Simplify format_args builtin macro implementation.)
 - #100483 (Point to generic or arg if it's the self type of unsatisfied projection predicate)
 - #100506 (change `InlineAsmCtxt` to not talk about `FnCtxt`)
 - #100534 (Make code slightly more uniform)
 - #100566 (Use `create_snapshot_for_diagnostic` instead of `clone` for `Parser`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

22 months agosuggest adding an array length if possible
Takayuki Maeda [Mon, 15 Aug 2022 15:16:14 +0000 (00:16 +0900)]
suggest adding an array length if possible

22 months agoAdd regression test for stripped enum variant fields
Guillaume Gomez [Mon, 15 Aug 2022 12:41:23 +0000 (14:41 +0200)]
Add regression test for stripped enum variant fields

22 months agoHandle correctly stripped enum variant fields
Guillaume Gomez [Mon, 15 Aug 2022 12:41:06 +0000 (14:41 +0200)]
Handle correctly stripped enum variant fields

22 months agoRevert "Revert "Remove num_cpus dependency from bootstrap, build-manifest and rustc_s...
The 8472 [Mon, 15 Aug 2022 14:24:07 +0000 (16:24 +0200)]
Revert "Revert "Remove num_cpus dependency from bootstrap, build-manifest and rustc_session""

This reverts commit 1ae4b258267462da0b1aae1badcf83578153c799.

22 months agoAuto merge of #98393 - michaelwoerister:new-cpp-like-enum-debuginfo, r=wesleywiser
bors [Mon, 15 Aug 2022 12:59:53 +0000 (12:59 +0000)]
Auto merge of #98393 - michaelwoerister:new-cpp-like-enum-debuginfo, r=wesleywiser

debuginfo: Generalize C++-like encoding for enums.

The updated encoding should be able to handle niche layouts where more than one variant has fields (as introduced in https://github.com/rust-lang/rust/pull/94075).

The new encoding is more uniform as there is no structural difference between direct-tag, niche-tag, and no-tag layouts anymore. The only difference between those cases is that the "dataful" variant in a niche-tag enum will have a `(start, end)` pair denoting the tag range instead of a single value.

The new encoding now also supports 128-bit tags, which occur in at least some standard library types. These tags are represented as `u64` pairs so that debuggers (which don't always have support for 128-bit integers) can reliably deal with them. The downside is that this adds quite a bit of complexity to the encoding and especially to the corresponding NatVis.

The new encoding seems to increase the size of (x86_64-pc-windows-msvc) debuginfo by 10-15%. The size of binaries is not affected (release builds were built with `-Cdebuginfo=2`, numbers are in kilobytes):

EXE | before | after | relative
-- | -- | -- | --
cargo (debug) | 40453 | 40450 | +0%
ripgrep (debug) | 10275 | 10273 | +0%
cargo (release) | 16186 | 16185 | +0%
ripgrep (release) | 4727 | 4726 | +0%

PDB | before | after | relative
-- | -- | -- | --
cargo (debug) | 236524 | 261412 | +11%
ripgrep (debug) | 53140 | 59060 | +11%
cargo (release) | 148516 | 169620 | +14%
ripgrep (release) | 10676 | 11804 | +11%

Given that the new encoding is more general, this is to be expected. Only platforms using C++-like debuginfo are affected -- which currently is only `*-pc-windows-msvc`.

*TODO*
- [x] Properly update documentation
- [x] Add regression tests for new optimized enum layouts as introduced by #94075.

r? `@wesleywiser`

22 months agotriagebot: autolabel `A-translation`
David Wood [Fri, 12 Aug 2022 08:14:40 +0000 (09:14 +0100)]
triagebot: autolabel `A-translation`

Instruct triagebot to autolabel pull requests that modify the
translation sources with the `A-translation` label.

Signed-off-by: David Wood <david.wood@huawei.com>
22 months agotriagebot: add mention groups for diag translation
David Wood [Wed, 10 Aug 2022 16:13:18 +0000 (17:13 +0100)]
triagebot: add mention groups for diag translation

Add mention groups to `triagebot.toml` for diagnostic derive macros and
diagnostic translation sources/resources.

Signed-off-by: David Wood <david.wood@huawei.com>
22 months agoerrors: move translation logic into module
David Wood [Wed, 10 Aug 2022 16:30:47 +0000 (17:30 +0100)]
errors: move translation logic into module

Just moving code around so that triagebot can ping relevant parties when
translation logic is modified.

Signed-off-by: David Wood <david.wood@huawei.com>
22 months ago[debuginfo] Fix msvc-pretty-enums debuginfo test for i686.
Michael Woerister [Mon, 15 Aug 2022 08:50:09 +0000 (10:50 +0200)]
[debuginfo] Fix msvc-pretty-enums debuginfo test for i686.

22 months agoRollup merge of #100566 - TaKO8Ki:use-create-snapshot-for-diagnostic, r=cjgillot
Matthias Krüger [Mon, 15 Aug 2022 08:28:14 +0000 (10:28 +0200)]
Rollup merge of #100566 - TaKO8Ki:use-create-snapshot-for-diagnostic, r=cjgillot

Use `create_snapshot_for_diagnostic` instead of `clone` for `Parser`

follow-up to #98020

22 months agoRollup merge of #100534 - Rageking8:Rageking8-refactor1, r=compiler-errors
Matthias Krüger [Mon, 15 Aug 2022 08:28:13 +0000 (10:28 +0200)]
Rollup merge of #100534 - Rageking8:Rageking8-refactor1, r=compiler-errors

Make code slightly more uniform

22 months agoRollup merge of #100506 - lcnr:fnctxt-yeet, r=compiler-errors
Matthias Krüger [Mon, 15 Aug 2022 08:28:12 +0000 (10:28 +0200)]
Rollup merge of #100506 - lcnr:fnctxt-yeet, r=compiler-errors

change `InlineAsmCtxt` to not talk about `FnCtxt`

wip for https://github.com/rust-lang/compiler-team/issues/529. this currently uses both the `FnCtxt` and is used by `check_mod_item_types`. This should be the only thing blocking that MCP afaict.

I am still unsure whether `rustc_hir_typeck` should depend on `rustc_hir_analysis` to use the `InlineAsmCtxt`. I think that's the best solution for now, so that's what I will go for

r? `@compiler-errors`

22 months agoRollup merge of #100483 - compiler-errors:point-to-projection-too, r=jyn514
Matthias Krüger [Mon, 15 Aug 2022 08:28:11 +0000 (10:28 +0200)]
Rollup merge of #100483 - compiler-errors:point-to-projection-too, r=jyn514

Point to generic or arg if it's the self type of unsatisfied projection predicate

We do this for `TraitPredicate`s in `point_at_type_arg_instead_of_call_if_possible` and `point_at_arg_instead_of_call_if_possible`, so also do it for `ProjectionPredicate`.

Improves spans for a lot of unit tests.

22 months agoRollup merge of #100277 - m-ou-se:format-args-1, r=compiler-errors
Matthias Krüger [Mon, 15 Aug 2022 08:28:10 +0000 (10:28 +0200)]
Rollup merge of #100277 - m-ou-se:format-args-1, r=compiler-errors

Simplify format_args builtin macro implementation.

Instead of a FxHashMap<Symbol, (usize, Span)> for the named arguments, this now includes the name and span in the elements of the Vec<FormatArg> directly. The FxHashMap still exists to look up the index, but no longer contains the span. Looking up the name or span of an argument is now trivial and does not need the map anymore.

22 months agoRollup merge of #100211 - cjgillot:ctfe-mir-available, r=michaelwoerister
Matthias Krüger [Mon, 15 Aug 2022 08:28:09 +0000 (10:28 +0200)]
Rollup merge of #100211 - cjgillot:ctfe-mir-available, r=michaelwoerister

Refuse to codegen an upstream static.

Fixes https://github.com/rust-lang/rust/issues/85401

22 months agoAdd missing closing quote
Rageking8 [Mon, 15 Aug 2022 07:57:55 +0000 (15:57 +0800)]
Add missing closing quote

fixes #100563

22 months agoFix STD build for ESP-IDF
Ivan Markov [Mon, 15 Aug 2022 07:45:58 +0000 (07:45 +0000)]
Fix STD build for ESP-IDF

22 months agouse `create_snapshot_for_diagnostic` instead of `clone` for `Parser`
Takayuki Maeda [Mon, 15 Aug 2022 07:42:58 +0000 (16:42 +0900)]
use `create_snapshot_for_diagnostic` instead of `clone` for `Parser`

22 months agoAuto merge of #96745 - ehuss:even-more-attribute-validation, r=cjgillot
bors [Mon, 15 Aug 2022 05:50:54 +0000 (05:50 +0000)]
Auto merge of #96745 - ehuss:even-more-attribute-validation, r=cjgillot

Visit attributes in more places.

This adds 3 loosely related changes (I can split PRs if desired):

- Attribute checking on pattern struct fields.
- Attribute checking on struct expression fields.
- Lint level visiting on pattern struct fields, struct expression fields, and generic parameters.

There are still some lints which ignore lint levels in various positions. This is a consequence of how the lints themselves are implemented. For example, lint levels on associated consts don't work with `unused_braces`.

22 months agoSimplify attribute handling in `parse_bottom_expr`.
Nicholas Nethercote [Sun, 14 Aug 2022 23:58:38 +0000 (09:58 +1000)]
Simplify attribute handling in `parse_bottom_expr`.

`Parser::parse_bottom_expr` currently constructs an empty `attrs` and
then passes it to a large number of other functions. This makes the code
harder to read than it should be, because it's not clear that many
`attrs` arguments are always empty.

This commit removes `attrs` and the passing, simplifying a lot of
functions. The commit also renames `Parser::mk_expr` (which takes an
`attrs` argument) as `mk_expr_with_attrs`, and introduces a new
`mk_expr` which creates an expression with no attributes, which is the
more common case.

22 months agoAuto merge of #96350 - austinabell:skip_optimization, r=Mark-Simulacrum
bors [Mon, 15 Aug 2022 03:09:20 +0000 (03:09 +0000)]
Auto merge of #96350 - austinabell:skip_optimization, r=Mark-Simulacrum

fix(iter::skip): Optimize `next` and `nth` implementations of `Skip`

This avoids calling nth/next or nth/nth to first skip elements and then get the next one (unless necessary due to usize overflow).

22 months agoAuto merge of #100510 - compiler-errors:as-a-treat, r=jackh726
bors [Mon, 15 Aug 2022 00:22:38 +0000 (00:22 +0000)]
Auto merge of #100510 - compiler-errors:as-a-treat, r=jackh726

make `TypeError` impl `Copy`

r? `@ghost`

22 months agoStreamline `parse_path_start_expr`.
Nicholas Nethercote [Sun, 14 Aug 2022 23:13:03 +0000 (09:13 +1000)]
Streamline `parse_path_start_expr`.

Let-chaining avoids some code duplication.

22 months agoAuto merge of #100540 - matthiaskrgr:rollup-734hkpt, r=matthiaskrgr
bors [Sun, 14 Aug 2022 21:35:16 +0000 (21:35 +0000)]
Auto merge of #100540 - matthiaskrgr:rollup-734hkpt, r=matthiaskrgr

Rollup of 6 pull requests

Successful merges:

 - #100249 (Fix HorizonOS regression in FileTimes)
 - #100253 (Recover from mutable variable declaration where `mut` is placed before `let`)
 - #100482 (Add Duration rounding change to release note)
 - #100523 ([rustdoc] remove Clean trait)
 - #100524 (Impl `Debug` for some structs of rustbuild)
 - #100526 (Add tests for the drop behavior of some control flow constructs)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

22 months agoUpdate the minimum external LLVM to 13
Josh Stone [Fri, 12 Aug 2022 17:22:38 +0000 (10:22 -0700)]
Update the minimum external LLVM to 13

22 months agoAlso do it for generics
Michael Goulet [Sat, 13 Aug 2022 07:14:54 +0000 (07:14 +0000)]
Also do it for generics

22 months agoPoint to argument if it's self type of unsatisfied projection predicate
Michael Goulet [Sat, 13 Aug 2022 07:09:08 +0000 (07:09 +0000)]
Point to argument if it's self type of unsatisfied projection predicate

22 months agoTypeError can be Copy
Michael Goulet [Sat, 13 Aug 2022 20:43:31 +0000 (20:43 +0000)]
TypeError can be Copy

22 months agoRollup merge of #100526 - Nilstrieb:tests!, r=Mark-Simulacrum
Matthias Krüger [Sun, 14 Aug 2022 18:16:03 +0000 (20:16 +0200)]
Rollup merge of #100526 - Nilstrieb:tests!, r=Mark-Simulacrum

Add tests for the drop behavior of some control flow constructs

In #100513 it was shown that the drop behaviour of let_chains is not correct currently. Since drop behaviour is something pretty subtle, this adds explicit tests for the drop behavior of `if`, `if let` and `match` to make sure that it does not regress in the future.

The `println!`s were left in to make debugging easier in case something goes wrong, but they are not required for the test.

22 months agoRollup merge of #100524 - ohno418:impl-debug-for-some-rustbuild-structs, r=Mark-Simul...
Matthias Krüger [Sun, 14 Aug 2022 18:16:03 +0000 (20:16 +0200)]
Rollup merge of #100524 - ohno418:impl-debug-for-some-rustbuild-structs, r=Mark-Simulacrum

Impl `Debug` for some structs of rustbuild

A small patch to impl `Debug` for some structs of rustbuild to make debugging easier.

(I was trying to impl `Debug` for the `Config` struct, but found to have a bit more things to do. So gave up for now.)

22 months agoRollup merge of #100523 - GuillaumeGomez:remove-clean-impls, r=Dylan-DPC
Matthias Krüger [Sun, 14 Aug 2022 18:16:02 +0000 (20:16 +0200)]
Rollup merge of #100523 - GuillaumeGomez:remove-clean-impls, r=Dylan-DPC

[rustdoc] remove Clean trait

Follow-up of https://github.com/rust-lang/rust/pull/99638.

This is (finally!) the last part.

r? `@Dylan-DPC`

22 months agoRollup merge of #100482 - youknowone:patch-1, r=Mark-Simulacrum
Matthias Krüger [Sun, 14 Aug 2022 18:16:01 +0000 (20:16 +0200)]
Rollup merge of #100482 - youknowone:patch-1, r=Mark-Simulacrum

Add Duration rounding change to release note

one of possible fix of #100480

fixes https://github.com/rust-lang/rust/issues/100480

22 months agoRollup merge of #100253 - obeis:issue-100197, r=cjgillot
Matthias Krüger [Sun, 14 Aug 2022 18:16:00 +0000 (20:16 +0200)]
Rollup merge of #100253 - obeis:issue-100197, r=cjgillot

Recover from mutable variable declaration where `mut` is placed before `let`

Closes #100197

22 months agoRollup merge of #100249 - Meziu:master, r=joshtriplett
Matthias Krüger [Sun, 14 Aug 2022 18:16:00 +0000 (20:16 +0200)]
Rollup merge of #100249 - Meziu:master, r=joshtriplett

Fix HorizonOS regression in FileTimes

The changes in #98246 caused a regression for multiple Newlib-based systems. This is just a fix including HorizonOS to the list of  targets which require a workaround.

``@AzureMarker`` ``@ian-h-chamberlain``
r? ``@nagisa``