]> git.lizzy.rs Git - rust.git/log
rust.git
3 years agorustc_ast/comments: Modernize some enum reexports
Vadim Petrochenkov [Wed, 22 Jul 2020 08:42:36 +0000 (11:42 +0300)]
rustc_ast/comments: Modernize some enum reexports

3 years agorustc_ast: Stop using "string typing" for doc comment tokens
Vadim Petrochenkov [Tue, 21 Jul 2020 19:16:19 +0000 (22:16 +0300)]
rustc_ast: Stop using "string typing" for doc comment tokens

Explicitly store their kind and style retrieved during lexing in the token

3 years agoAuto merge of #75086 - lzutao:u32const, r=oli-obk
bors [Thu, 6 Aug 2020 14:21:48 +0000 (14:21 +0000)]
Auto merge of #75086 - lzutao:u32const, r=oli-obk

Use u32::from_ne_bytes to fix a FIXME and add comment about that

`u32::from_ne_bytes` has been const stable since 1.44.

3 years agoAuto merge of #74889 - JohnTitor:hrtb-tests, r=nikomatsakis
bors [Thu, 6 Aug 2020 12:12:59 +0000 (12:12 +0000)]
Auto merge of #74889 - JohnTitor:hrtb-tests, r=nikomatsakis

Add HRTB-related regression test

Closes #59311 and cc #71546
This closes the former but the test is taken from https://github.com/rust-lang/rust/issues/71546#issuecomment-620638437 since it seems they have the same cause and it's simplified.

3 years agoAuto merge of #75008 - eddyb:rmeta-indexed-trait-impls, r=nikomatsakis
bors [Thu, 6 Aug 2020 03:23:57 +0000 (03:23 +0000)]
Auto merge of #75008 - eddyb:rmeta-indexed-trait-impls, r=nikomatsakis

rustc_metadata: track the simplified Self type for every trait impl.

For the `traits_impls_of` query, we index the impls by `fast_reject::SimplifiedType` (a "shallow type"), which allows some simple cases like `impl Trait<..> for Foo<..>` to be efficiently iterated over, by e.g. `for_each_relevant_impl`.

This PR encodes the `fast_reject::SimplifiedType` cross-crate to avoid needing to deserialize the `Self` type of every `impl` in order to simplify it - the simplification itself should be cheap, but the deserialization is less so.

We could go further from here and make loading the list of impls lazy, for a given simplified `Self` type, but that would have more complicated implications for performance, and this PR doesn't do anything in that regard.

r? @nikomatsakis cc @Mark-Simulacrum

3 years agoAdd a FIXME comment
Yuki Okushi [Wed, 5 Aug 2020 20:21:03 +0000 (05:21 +0900)]
Add a FIXME comment

3 years agoAuto merge of #75166 - JulianKnodt:i64494, r=lcnr
bors [Wed, 5 Aug 2020 20:20:56 +0000 (20:20 +0000)]
Auto merge of #75166 - JulianKnodt:i64494, r=lcnr

Add regression test for #64494

Add regression test to indicate if this compilation ever succeeds.
Fixes #64494

r? @lcnr

3 years agoAuto merge of #75005 - adamreichold:limit-vector-count, r=Amanieu
bors [Wed, 5 Aug 2020 17:58:55 +0000 (17:58 +0000)]
Auto merge of #75005 - adamreichold:limit-vector-count, r=Amanieu

Limit I/O vector count on Unix

Unix systems enforce limits on the vector count when performing vectored I/O via the readv and writev system calls and return EINVAL when these limits are exceeded. This changes the standard library to handle those limits as short reads and writes to avoid forcing its users to query these limits using platform specific mechanisms.

Fixes #68042

3 years agoAuto merge of #75194 - Aaron1011:feature/macro-backtrace-numbers, r=eddyb
bors [Wed, 5 Aug 2020 16:08:53 +0000 (16:08 +0000)]
Auto merge of #75194 - Aaron1011:feature/macro-backtrace-numbers, r=eddyb

Show backtrace numbers in backtrace whenever more than one is involved

Previously, we only displayed 'frame' numbers in a macro backtrace when more
than two frames were involved. This commit should help make backtrace
more readable, since these kinds of messages can quickly get confusing.

3 years agoAdd fallback for cfg(unix) targets that do not define libc::_SC_IOV_MAX.
Adam Reichold [Wed, 5 Aug 2020 14:56:51 +0000 (16:56 +0200)]
Add fallback for cfg(unix) targets that do not define libc::_SC_IOV_MAX.

3 years agoShow backtrace numbers in backtrace whenever more than one is involved
Aaron Hill [Wed, 5 Aug 2020 15:02:25 +0000 (11:02 -0400)]
Show backtrace numbers in backtrace whenever more than one is involved

Previously, we only displayed 'frame' numbers in a macro backtrace when more
than two frames were involved. This commit should help make backtrace
more readable, since these kinds of messages can quickly get confusing.

3 years agoRely only on POSIX semantics for I/O vector count
Adam Reichold [Sat, 1 Aug 2020 14:06:00 +0000 (16:06 +0200)]
Rely only on POSIX semantics for I/O vector count

All #[cfg(unix)] platforms follow the POSIX standard and define _SC_IOV_MAX so
that we rely purely on POSIX semantics to determine the limits on I/O vector
count.

3 years agoReduce synchronization overhead of I/O vector count memoization
Adam Reichold [Sat, 1 Aug 2020 13:38:08 +0000 (15:38 +0200)]
Reduce synchronization overhead of I/O vector count memoization

3 years agoMemoize the I/O vector count limit
Adam Reichold [Sat, 1 Aug 2020 12:29:42 +0000 (14:29 +0200)]
Memoize the I/O vector count limit

Keep the I/O vector count limit in a `SyncOnceCell` to avoid the overhead of
repeatedly calling `sysconf` as these limits are guaranteed to not change during
the lifetime of a process by POSIX.

3 years agoQuery maximum vector count on Linux and macOS
Adam Reichold [Sat, 1 Aug 2020 12:18:11 +0000 (14:18 +0200)]
Query maximum vector count on Linux and macOS

Both Linux and MacOS enforce limits on the vector count when performing vectored
I/O via the readv and writev system calls and return EINVAL when these limits
are exceeded. This changes the standard library to handle those limits as short
reads and writes to avoid forcing its users to query these limits using
platform specific mechanisms.

3 years agoAuto merge of #75165 - JulianKnodt:i72787, r=lcnr
bors [Wed, 5 Aug 2020 14:00:00 +0000 (14:00 +0000)]
Auto merge of #75165 - JulianKnodt:i72787, r=lcnr

Add regression test for #72787

Add regression test for Issue #72787
Fixes #72787

~~Still waiting on running tests locally to bless the error output~~

r? @lcnr

3 years agoAuto merge of #75169 - ehuss:update-cargo, r=ehuss
bors [Wed, 5 Aug 2020 11:17:36 +0000 (11:17 +0000)]
Auto merge of #75169 - ehuss:update-cargo, r=ehuss

Update cargo

8 commits in 2d5c2381e4e50484bf281fc1bfe19743aa9eb37a..1653f354644834073d6d2541e27fae94588e685e
2020-07-31 21:56:08 +0000 to 2020-08-04 23:14:37 +0000
- Fix close_output test. (rust-lang/cargo#8587)
- clippy fixes, use matches! macro in more places (rust-lang/cargo#8575)
- Display embedded man pages for built-in commands. (rust-lang/cargo#8456)
- Add mdman for generating man pages. (rust-lang/cargo#8577)
- Fix typo 'more then' -&gt; 'more than' in error and comments (rust-lang/cargo#8581)
- cargo login: make login message less ambiguous (rust-lang/cargo#8579)
- Fix broken link in Build Cache chapter. (rust-lang/cargo#8578)
- Fix intra-doc tests for renamed lint. (rust-lang/cargo#8576)

3 years agoAuto merge of #75124 - nnethercote:clean-up-rustdoc-main, r=oli-obk
bors [Wed, 5 Aug 2020 09:09:17 +0000 (09:09 +0000)]
Auto merge of #75124 - nnethercote:clean-up-rustdoc-main, r=oli-obk

Clean up rustdoc's `main()`

It can be simplified and made more similar to rustc's `main()`.

r? @oli-obk

3 years agoAuto merge of #75155 - davidtwco:polymorphization-incr-comp-optimisations, r=lcnr
bors [Wed, 5 Aug 2020 06:55:42 +0000 (06:55 +0000)]
Auto merge of #75155 - davidtwco:polymorphization-incr-comp-optimisations, r=lcnr

polymorphization: various improvements

This PR includes a handful of polymorphisation-related changes:

- @Mark-Simulacrum's suggestions [from this comment](https://github.com/rust-lang/rust/pull/74633#issuecomment-668684433):
    - Use a `FiniteBitSet<u32>` over a `FiniteBitSet<u64>` as most functions won't have 64 generic parameters.
    - Don't encode polymorphisation results in metadata when every parameter is used (in this case, just invoking polymorphisation will probably be quicker).
- @lcnr's suggestion [from this comment](https://github.com/rust-lang/rust/pull/74717#discussion_r463690015).
    - Add an debug assertion in `ensure_monomorphic_enough` to make sure that polymorphisation did what we expect.

r? @lcnr

3 years agoAuto merge of #75037 - richkadel:llvm-coverage-map-gen-5.2, r=wesleywiser
bors [Wed, 5 Aug 2020 05:08:19 +0000 (05:08 +0000)]
Auto merge of #75037 - richkadel:llvm-coverage-map-gen-5.2, r=wesleywiser

Completes support for coverage in external crates

Follow-up to #74959 :

The prior PR corrected for errors encountered when trying to generate
the coverage map on source code inlined from external crates (including
macros and generics) by avoiding adding external DefIds to the coverage
map.

This made it possible to generate a coverage report including external
crates, but the external crate coverage was incomplete (did not include
coverage for the DefIds that were eliminated.

The root issue was that the coverage map was converting Span locations
to source file and locations, using the SourceMap for the current crate,
and this would not work for spans from external crates (compliled with a
different SourceMap).

The solution was to convert the Spans to filename and location during
MIR generation instead, so precompiled external crates would already
have the correct source code locations embedded in their MIR, when
imported into another crate.

@wesleywiser FYI
r? @tmandry

3 years agoAuto merge of #75174 - JohnTitor:rollup-z9djftk, r=JohnTitor
bors [Wed, 5 Aug 2020 03:04:21 +0000 (03:04 +0000)]
Auto merge of #75174 - JohnTitor:rollup-z9djftk, r=JohnTitor

Rollup of 5 pull requests

Successful merges:

 - #75139 (Remove log alias from librustdoc)
 - #75140 (Clean up E0745)
 - #75149 (Correct a typo in interpret/memory.rs)
 - #75152 (Replace `Memoryblock` with `NonNull<[u8]>`)
 - #75168 (Update books)

Failed merges:

r? @ghost

3 years agoUse u32::from_ne_bytes to fix a FIXME
Lzu Tao [Wed, 5 Aug 2020 02:49:26 +0000 (02:49 +0000)]
Use u32::from_ne_bytes to fix a FIXME

Co-authored-by: Weiyi Wang <wwylele@gmail.com>
Co-authored-by: Adam Reichold <adam.reichold@t-online.de>
Co-authored-by: Josh Stone <cuviper@gmail.com>
Co-authored-by: Scott McMurray <scottmcm@users.noreply.github.com>
Co-authored-by: tmiasko <tomasz.miasko@gmail.com>
3 years agoRollup merge of #75168 - ehuss:update-books, r=ehuss
Yuki Okushi [Wed, 5 Aug 2020 02:40:11 +0000 (11:40 +0900)]
Rollup merge of #75168 - ehuss:update-books, r=ehuss

Update books

## reference

7 commits in b329ce37424874ad4db94f829a55807c6e21d2cb..c9b2736a059469043177e1e4ed41a55d7c63ac28
2020-07-20 08:54:08 -0700 to 2020-08-03 03:34:03 -0700
- Fix documented build output path. (rust-lang-nursery/reference#870)
- Update token usage table. (rust-lang-nursery/reference#868)
- Allow trait inner attributes (rust-lang-nursery/reference#864)
- patterns.md - add word "underscore" to _ paragraph (rust-lang-nursery/reference#865)
- Drive-by mention unsafe fn closure coercion (rust-lang-nursery/reference#802)
- grammar: Change "For awhile" to "For a while" (rust-lang-nursery/reference#857)
- Added Unpin to list of Auto Traits (rust-lang-nursery/reference#854)

## book

7 commits in a914f2c7e5cdb771fa465de142381a51c53b580e..363293c1c5ce9e84ea3935a5e29ce8624801208a
2020-07-21 09:20:05 -0500 to 2020-08-03 15:56:30 -0500
- replace commas with m-dashes to improve readability of chapter 4.1 (rust-lang/book#2419)
- Update TOML link to official website (rust-lang/book#2411)
- Add github repo link (rust-lang/book#2265)
- Remove the version number entirely so we can stop updating it
- Add link to the `Vec&lt;T&gt;` API documentation (rust-lang/book#2249)
- link to stdlib atomic docs (rust-lang/book#2361)
- mdbook version used is now 0.4.x (rust-lang/book#2410)

## rust-by-example

1 commits in 229c6945a26a53a751ffa4f9cb418388c00029d3..2e9271981adc32613365810f3428334c07095215
2020-07-06 10:13:15 -0300 to 2020-07-27 13:39:16 -0500
- Replaced "princess" with "royal" (rust-lang/rust-by-example#1363)

## embedded-book

1 commits in 94d9ea8460bcbbbfef1877b47cb930260b5849a7..b5256448a2a4c1bec68b93c0847066f92f2ff5a9
2020-07-05 14:17:40 +0000 to 2020-07-24 23:09:29 +0000
- Update c-with-rust.md  (rust-embedded/book#256)

3 years agoRollup merge of #75152 - TimDiekmann:replace_memblock, r=Amanieu
Yuki Okushi [Wed, 5 Aug 2020 02:40:10 +0000 (11:40 +0900)]
Rollup merge of #75152 - TimDiekmann:replace_memblock, r=Amanieu

Replace `Memoryblock` with `NonNull<[u8]>`

Closes rust-lang/wg-allocators#61

r? @Amanieu

3 years agoRollup merge of #75149 - felixonmars:patch-1, r=wesleywiser
Yuki Okushi [Wed, 5 Aug 2020 02:40:08 +0000 (11:40 +0900)]
Rollup merge of #75149 - felixonmars:patch-1, r=wesleywiser

Correct a typo in interpret/memory.rs

3 years agoRollup merge of #75140 - GuillaumeGomez:cleanup-e0745, r=pickfire
Yuki Okushi [Wed, 5 Aug 2020 02:40:07 +0000 (11:40 +0900)]
Rollup merge of #75140 - GuillaumeGomez:cleanup-e0745, r=pickfire

Clean up E0745

r? @Dylan-DPC

3 years agoRollup merge of #75139 - pickfire:librustdoc-import, r=jyn514
Yuki Okushi [Wed, 5 Aug 2020 02:40:05 +0000 (11:40 +0900)]
Rollup merge of #75139 - pickfire:librustdoc-import, r=jyn514

Remove log alias from librustdoc

r? @jyn514

3 years agoBe smarter about error handling in `run()`.
Nicholas Nethercote [Wed, 5 Aug 2020 01:25:57 +0000 (11:25 +1000)]
Be smarter about error handling in `run()`.

`run()` returns `Result<(), String>`. But on failure it always returns
an empty string, and then `wrap_return()` treats an empty string
specially, by not reporting the error.

It turns out we already have the `ErrorReported` type for this sort of
behaviour. This commit changes `run()` to use it.

3 years agoAuto merge of #75130 - lcnr:array_chunks, r=ecstatic-morse
bors [Wed, 5 Aug 2020 01:13:19 +0000 (01:13 +0000)]
Auto merge of #75130 - lcnr:array_chunks, r=ecstatic-morse

forbid `#[track_caller]` on main

fixes #75125

cc @anp

3 years agoRemove `setup_callbacks_and_run_in_default_thread_pool_with_globals()`.
Nicholas Nethercote [Mon, 3 Aug 2020 23:42:14 +0000 (09:42 +1000)]
Remove `setup_callbacks_and_run_in_default_thread_pool_with_globals()`.

It's a very thin wrapper around
`setup_callbacks_and_run_in_thread_pool_with_globals()` and it has a
single call site.

3 years agoAvoid an unnecessary thread creation at rustdoc startup.
Nicholas Nethercote [Mon, 3 Aug 2020 09:37:22 +0000 (19:37 +1000)]
Avoid an unnecessary thread creation at rustdoc startup.

rustdoc's `main()` immediately spawns a thread, M, with a large stack
(16MiB or 32MiB) on which it runs `main_args()`. `main_args()` does a
small amount of options processing and then calls
`setup_callbacks_and_run_in_default_thread_pool_with_globals()`, which
spawns it own thread, and M is not used further.

So, thread M seems unnecessary. However, it does serve a purpose: if the
options processing in `main_args()` panics, that panic is caught when M
is joined. So M can't simply be removed.

However, `main_options()`, which is called by `main_args()`, has a
`catch_fatal_errors()` call within it. We can move that call to `main()`
and change it to the very similar `catch_with_exit_code()`. With that in
place, M can be removed, and panics from options processing will still
be caught appropriately.

Even better, this makes rustdoc's `main()` match rustc's `main()`, which
also uses `catch_with_exit_code()`.

(Also note that the use of a 16MiB/32MiB stack was eliminated from rustc
in #55617.)

3 years agoUpdate cargo
Eric Huss [Wed, 5 Aug 2020 00:08:47 +0000 (17:08 -0700)]
Update cargo

3 years agoUpdate books
Eric Huss [Tue, 4 Aug 2020 23:45:19 +0000 (16:45 -0700)]
Update books

3 years agoAdd regression test
kadmin [Tue, 4 Aug 2020 23:07:04 +0000 (23:07 +0000)]
Add regression test

3 years agoAdd regression test
kadmin [Tue, 4 Aug 2020 22:14:27 +0000 (22:14 +0000)]
Add regression test

As well as matching error outputs

3 years agoAuto merge of #75161 - sunfishcode:wasm-no-threads, r=alexcrichton
bors [Tue, 4 Aug 2020 22:21:05 +0000 (22:21 +0000)]
Auto merge of #75161 - sunfishcode:wasm-no-threads, r=alexcrichton

Remove the `--no-threads` workaround for wasm targets.

Remove `--no-threads` from the wasm-ld command-line, which was a
workaround for [an old bug] which was fixed in LLVM 9.0, and is
no longer needed.

Also, the `--no-threads` option has been [removed upstream].

[an old bug]: https://bugs.llvm.org/show_bug.cgi?id=41508
[removed upstream]: https://reviews.llvm.org/D76885

r? @alexcrichton

3 years agoRemove the `--no-threads` workaround for wasm targets.
Dan Gohman [Tue, 4 Aug 2020 20:31:08 +0000 (13:31 -0700)]
Remove the `--no-threads` workaround for wasm targets.

Remove `--no-threads` from the wasm-ld command-line, which was a
workaround for [an old bug] which was fixed in LLVM 9.0, and is
no longer needed.

Also, the `--no-threads` option has been [removed upstream].

[an old bug]: https://bugs.llvm.org/show_bug.cgi?id=41508
[removed upstream]: https://reviews.llvm.org/D76885

3 years agoAuto merge of #75136 - JohnTitor:unsizing-casts-non-null, r=oli-obk
bors [Tue, 4 Aug 2020 19:37:01 +0000 (19:37 +0000)]
Auto merge of #75136 - JohnTitor:unsizing-casts-non-null, r=oli-obk

Forbid non-derefable types explicitly in unsizing casts

Fixes #75118
r? @oli-obk

3 years agotweak error message
Bastian Kauschke [Tue, 4 Aug 2020 19:36:21 +0000 (21:36 +0200)]
tweak error message

3 years agomir: add debug assertion to check polymorphization
David Wood [Tue, 4 Aug 2020 17:18:27 +0000 (18:18 +0100)]
mir: add debug assertion to check polymorphization

This commit adds some debug assertions to `ensure_monomorphic_enough`
which checks that unused generic parameters have been replaced with a
parameter.

Signed-off-by: David Wood <david@davidtw.co>
3 years agometadata: skip empty polymorphization bitset
David Wood [Tue, 4 Aug 2020 17:16:39 +0000 (18:16 +0100)]
metadata: skip empty polymorphization bitset

This commit skips encoding empty polymorphization results - while
polymorphization is disabled, this should be every polymorphization
result; but when polymorphization is re-enabled, this would help with
non-generic functions and those which do use all their parameters (most
functions).

Signed-off-by: David Wood <david@davidtw.co>
3 years agoCompletes support for coverage in external crates
Rich Kadel [Sun, 2 Aug 2020 03:03:59 +0000 (20:03 -0700)]
Completes support for coverage in external crates

The prior PR corrected for errors encountered when trying to generate
the coverage map on source code inlined from external crates (including
macros and generics) by avoiding adding external DefIds to the coverage
map.

This made it possible to generate a coverage report including external
crates, but the external crate coverage was incomplete (did not include
coverage for the DefIds that were eliminated.

The root issue was that the coverage map was converting Span locations
to source file and locations, using the SourceMap for the current crate,
and this would not work for spans from external crates (compliled with a
different SourceMap).

The solution was to convert the Spans to filename and location during
MIR generation instead, so precompiled external crates would already
have the correct source code locations embedded in their MIR, when
imported into another crate.

3 years agomir: use `FiniteBitSet<u32>` in polymorphization
David Wood [Tue, 4 Aug 2020 17:11:57 +0000 (18:11 +0100)]
mir: use `FiniteBitSet<u32>` in polymorphization

This commit changes polymorphization to return a `FiniteBitSet<u32>`
rather than a `FiniteBitSet<u64>` because most functions do not use
anywhere near sixty-four generic parameters so keeping a `u64` around is
unnecessary in most cases.

Signed-off-by: David Wood <david@davidtw.co>
3 years agoRevert missing "memory block"
Tim Diekmann [Tue, 4 Aug 2020 17:24:08 +0000 (19:24 +0200)]
Revert missing "memory block"

3 years agoRevert renaming of "memory block"
Tim Diekmann [Tue, 4 Aug 2020 17:15:48 +0000 (19:15 +0200)]
Revert renaming of "memory block"

3 years agoAuto merge of #75133 - nnethercote:rm-SubstFolder-fields, r=matthewjasper
bors [Tue, 4 Aug 2020 17:07:40 +0000 (17:07 +0000)]
Auto merge of #75133 - nnethercote:rm-SubstFolder-fields, r=matthewjasper

Remove two fields from `SubstFolder`.

They're only used in error messages printed if there's an internal
compiler error, and the cost of maintaining them is high enough to show
up in profiles.

r? @matthewjasper

3 years agoReplace `Memoryblock` with `NonNull<[u8]>`
Tim Diekmann [Tue, 4 Aug 2020 16:03:34 +0000 (18:03 +0200)]
Replace `Memoryblock` with `NonNull<[u8]>`

3 years agoCorrect a typo in interpret/memory.rs
Felix Yan [Tue, 4 Aug 2020 15:01:32 +0000 (23:01 +0800)]
Correct a typo in interpret/memory.rs

3 years agoAuto merge of #74850 - TimDiekmann:remove-in-place-alloc, r=Amanieu
bors [Tue, 4 Aug 2020 11:22:45 +0000 (11:22 +0000)]
Auto merge of #74850 - TimDiekmann:remove-in-place-alloc, r=Amanieu

Remove in-place allocation and revert to separate methods for zeroed allocations

closes rust-lang/wg-allocators#58

3 years agoClean up E0745
Guillaume Gomez [Tue, 4 Aug 2020 11:09:15 +0000 (13:09 +0200)]
Clean up E0745

3 years agoRemove log alias from librustdoc
Ivan Tham [Tue, 4 Aug 2020 09:57:35 +0000 (17:57 +0800)]
Remove log alias from librustdoc

3 years agoAuto merge of #75095 - pietroalbini:fallible-fast-fail, r=Mark-Simulacrum
bors [Tue, 4 Aug 2020 09:18:22 +0000 (09:18 +0000)]
Auto merge of #75095 - pietroalbini:fallible-fast-fail, r=Mark-Simulacrum

ci: disable fast-fail on auto-fallible

The purpose of the auto-fallible job is to run builders that are likely to fail on CI without gating on them. Having fast-fail enabled there kinda defeats the purpose, as if one of them fails we can't monitor the outcome of the other ones.

This was prompted by the aarch64-gnu builder consistently failing due to a broken test, preventing us from seeing if the macOS spurious failure is fixed.

r? @Mark-Simulacrum

3 years agoci: disable fail-fast on auto-fallible
Pietro Albini [Mon, 3 Aug 2020 08:32:47 +0000 (10:32 +0200)]
ci: disable fail-fast on auto-fallible

The purpose of the auto-fallible job is to run builders that are likely
to fail on CI without gating on them. Having fail-fast enabled there
kinda defeats the purpose, as if one of them fails we can't monitor the
outcome of the other ones.

This was prompted by the aarch64-gnu builder consistently failing due to
a broken test, preventing us from seeing if the macOS spurious failure
is fixed.

3 years agoForbid non-derefable types explicitly in unsizing casts
Yuki Okushi [Tue, 4 Aug 2020 08:46:10 +0000 (17:46 +0900)]
Forbid non-derefable types explicitly in unsizing casts

3 years agoRemove two fields from `SubstFolder`.
Nicholas Nethercote [Tue, 4 Aug 2020 04:23:56 +0000 (14:23 +1000)]
Remove two fields from `SubstFolder`.

They're only used in error messages printed if there's an internal
compiler error, and the cost of maintaining them is high enough to show
up in profiles.

3 years agoAuto merge of #75111 - mati865:use-lld-option, r=Mark-Simulacrum
bors [Tue, 4 Aug 2020 05:37:44 +0000 (05:37 +0000)]
Auto merge of #75111 - mati865:use-lld-option, r=Mark-Simulacrum

Make rust.use-lld config option work with non MSVC targets

Builds fine and passes tests on Linux.
Not overriding `use-lld` by `linker` makes sense on those platforms since very old GCC versions don't understand `-fuse-ld=lld`. This allows pointing to newer GCC or Clang that will know how to call LLD.

3 years agoforbid `#[track_caller]` on main
Bastian Kauschke [Tue, 4 Aug 2020 05:30:04 +0000 (07:30 +0200)]
forbid `#[track_caller]` on main

3 years agoAuto merge of #75058 - ssomers:btree_cleanup_insert_2, r=Mark-Simulacrum
bors [Tue, 4 Aug 2020 03:48:48 +0000 (03:48 +0000)]
Auto merge of #75058 - ssomers:btree_cleanup_insert_2, r=Mark-Simulacrum

Clarify reuse of a BTreeMap insert support function and treat split support likewise

r? @Mark-Simulacrum

3 years agoAuto merge of #75126 - JohnTitor:rollup-aejluzx, r=JohnTitor
bors [Tue, 4 Aug 2020 01:48:32 +0000 (01:48 +0000)]
Auto merge of #75126 - JohnTitor:rollup-aejluzx, r=JohnTitor

Rollup of 8 pull requests

Successful merges:

 - #74759 (add `unsigned_abs` to signed integers)
 - #75043 (rustc_ast: `(Nested)MetaItem::check_name` -> `has_name`)
 - #75056 (Lint path statements to suggest using drop when the type needs drop)
 - #75081 (Fix logging for rustdoc)
 - #75083 (Do not trigger `unused_braces` for `while let`)
 - #75084 (Stabilize Ident::new_raw)
 - #75103 (Disable building rust-analyzer on riscv64)
 - #75106 (Enable docs on in the x86_64-unknown-linux-musl manifest)

Failed merges:

r? @ghost

3 years agoRollup merge of #75106 - etherealist:docs_manifest, r=Mark-Simulacrum
Yuki Okushi [Tue, 4 Aug 2020 00:27:10 +0000 (09:27 +0900)]
Rollup merge of #75106 - etherealist:docs_manifest, r=Mark-Simulacrum

Enable docs on in the x86_64-unknown-linux-musl manifest

Add the rust-docs component to toolchain x86_64-unknown-linux-musl, which allows people using rustup on their musl-based linux distribution to download the rust-docs.

Generating and uploading the docs was enabled in b5d143b (#74871).

In #75102 @Mark-Simulacrum found that we are uploading the docs, but the correct manifest is missing.

* The relevant call to build-manifest seems to be [in bootstrap](https://github.com/rust-lang/rust/blob/c058a8b8dc5dea0ed9b33e14da9e317e2749fcd7/src/bootstrap/dist.rs#L2334)

* The manifest is then used in [promote-release crontab](https://github.com/rust-lang/rust-central-station/blob/master/crontab)

3 years agoRollup merge of #75103 - Mark-Simulacrum:no-ra-for-riscv64, r=matklad
Yuki Okushi [Tue, 4 Aug 2020 00:27:08 +0000 (09:27 +0900)]
Rollup merge of #75103 - Mark-Simulacrum:no-ra-for-riscv64, r=matklad

Disable building rust-analyzer on riscv64

riscv64 has an LLVM bug that makes rust-analyzer not build. Should permit future rust-analyzer ups (e.g., https://github.com/rust-lang/rust/pull/74813) to land.

3 years agoRollup merge of #75084 - Aaron1011:stabilize/ident-new-raw, r=petrochenkov
Yuki Okushi [Tue, 4 Aug 2020 00:27:06 +0000 (09:27 +0900)]
Rollup merge of #75084 - Aaron1011:stabilize/ident-new-raw, r=petrochenkov

Stabilize Ident::new_raw

Tracking issue: #54723

This is a continuation of PR #59002

3 years agoRollup merge of #75083 - JohnTitor:follow-up-unused-braces, r=lcnr
Yuki Okushi [Tue, 4 Aug 2020 00:27:04 +0000 (09:27 +0900)]
Rollup merge of #75083 - JohnTitor:follow-up-unused-braces, r=lcnr

Do not trigger `unused_braces` for `while let`

Follow-up for #75031
r? @lcnr

3 years agoRollup merge of #75081 - jyn514:fix-logging, r=Mark-Simulacrum
Yuki Okushi [Tue, 4 Aug 2020 00:27:03 +0000 (09:27 +0900)]
Rollup merge of #75081 - jyn514:fix-logging, r=Mark-Simulacrum

Fix logging for rustdoc

https://github.com/rust-lang/rust/pull/74726#issuecomment-667765557

3 years agoRollup merge of #75056 - Veykril:path_statements_lint, r=oli-obk
Yuki Okushi [Tue, 4 Aug 2020 00:27:01 +0000 (09:27 +0900)]
Rollup merge of #75056 - Veykril:path_statements_lint, r=oli-obk

Lint path statements to suggest using drop when the type needs drop

Fixes #48852. With this change the current lint description doesn't really fit entirely anymore I think.

3 years agoRollup merge of #75043 - petrochenkov:hasname, r=nnethercote
Yuki Okushi [Tue, 4 Aug 2020 00:26:59 +0000 (09:26 +0900)]
Rollup merge of #75043 - petrochenkov:hasname, r=nnethercote

rustc_ast: `(Nested)MetaItem::check_name` -> `has_name`

For consistency with `Attribute::has_name` which doesn't mark the attribute as used either.

Replace all uses of `check_name` with `has_name` outside of rustc, only rustc needs to mark attributes as used.

cc https://github.com/rust-lang/rust/pull/74932
r? @nnethercote

3 years agoRollup merge of #74759 - carbotaniuman:uabs, r=shepmaster
Yuki Okushi [Tue, 4 Aug 2020 00:26:58 +0000 (09:26 +0900)]
Rollup merge of #74759 - carbotaniuman:uabs, r=shepmaster

add `unsigned_abs` to signed integers

Mentioned on rust-lang/rfcs#2914

This PR simply adds an `unsigned_abs` to signed integers function which returns the correct absolute value as a unsigned integer.

3 years agoAuto merge of #74695 - alexcrichton:more-wasm-float-cast-fixes, r=nagisa
bors [Mon, 3 Aug 2020 23:57:50 +0000 (23:57 +0000)]
Auto merge of #74695 - alexcrichton:more-wasm-float-cast-fixes, r=nagisa

rustc: Improving safe wasm float->int casts

This commit improves code generation for WebAssembly targets when
translating floating to integer casts. This improvement is only relevant
when the `nontrapping-fptoint` feature is not enabled, but the feature
is not enabled by default right now. Additionally this improvement only
affects safe casts since unchecked casts were improved in #74659.

Some more background for this issue is present on #73591, but the
general gist of the issue is that in LLVM the `fptosi` and `fptoui`
instructions are defined to return an `undef` value if they execute on
out-of-bounds values; they notably do not trap. To implement these
instructions for WebAssembly the LLVM backend must therefore generate
quite a few instructions before executing `i32.trunc_f32_s` (for
example) because this WebAssembly instruction traps on out-of-bounds
values. This codegen into wasm instructions happens very late in the
code generator, so what ends up happening is that rustc inserts its own
codegen to implement Rust's saturating semantics, and then LLVM also
inserts its own codegen to make sure that the `fptosi` instruction
doesn't trap. Overall this means that a function like this:

    #[no_mangle]
    pub unsafe extern "C" fn cast(x: f64) -> u32 {
        x as u32
    }

will generate this WebAssembly today:

    (func $cast (type 0) (param f64) (result i32)
      (local i32 i32)
      local.get 0
      f64.const 0x1.fffffffep+31 (;=4.29497e+09;)
      f64.gt
      local.set 1
      block  ;; label = @1
        block  ;; label = @2
          local.get 0
          f64.const 0x0p+0 (;=0;)
          local.get 0
          f64.const 0x0p+0 (;=0;)
          f64.gt
          select
          local.tee 0
          f64.const 0x1p+32 (;=4.29497e+09;)
          f64.lt
          local.get 0
          f64.const 0x0p+0 (;=0;)
          f64.ge
          i32.and
          i32.eqz
          br_if 0 (;@2;)
          local.get 0
          i32.trunc_f64_u
          local.set 2
          br 1 (;@1;)
        end
        i32.const 0
        local.set 2
      end
      i32.const -1
      local.get 2
      local.get 1
      select)

This PR improves the situation by updating the code generation for
float-to-int conversions in rustc, specifically only for WebAssembly
targets and only for some situations (float-to-u8 still has not great
codegen). The fix here is to use basic blocks and control flow to avoid
speculatively executing `fptosi`, and instead LLVM's raw intrinsic for
the WebAssembly instruction is used instead. This effectively extends
the support added in #74659 to checked casts. After this commit the
codegen for the above Rust function looks like:

    (func $cast (type 0) (param f64) (result i32)
      (local i32)
      block  ;; label = @1
        local.get 0
        f64.const 0x0p+0 (;=0;)
        f64.ge
        local.tee 1
        i32.const 1
        i32.xor
        br_if 0 (;@1;)
        local.get 0
        f64.const 0x1.fffffffep+31 (;=4.29497e+09;)
        f64.le
        i32.eqz
        br_if 0 (;@1;)
        local.get 0
        i32.trunc_f64_u
        return
      end
      i32.const -1
      i32.const 0
      local.get 1
      select)

For reference, in Rust 1.44, which did not have saturating
float-to-integer casts, the codegen LLVM would emit is:

    (func $cast (type 0) (param f64) (result i32)
      block  ;; label = @1
        local.get 0
        f64.const 0x1p+32 (;=4.29497e+09;)
        f64.lt
        local.get 0
        f64.const 0x0p+0 (;=0;)
        f64.ge
        i32.and
        i32.eqz
        br_if 0 (;@1;)
        local.get 0
        i32.trunc_f64_u
        return
      end
      i32.const 0)

So we're relatively close to the original codegen, although it's
slightly different because the semantics of the function changed where
we're emulating the `i32.trunc_sat_f32_s` instruction rather than always
replacing out-of-bounds values with zero.

There is still work that could be done to improve casts such as `f32` to
`u8`. That form of cast still uses the `fptosi` instruction which
generates lots of branch-y code. This seems less important to tackle now
though. In the meantime this should take care of most use cases of
floating-point conversion and as a result I'm going to speculate that
this...

Closes #73591

3 years agoApply suggestions from code review
Tim Diekmann [Mon, 3 Aug 2020 22:21:05 +0000 (00:21 +0200)]
Apply suggestions from code review

Co-authored-by: Amanieu d'Antras <amanieu@gmail.com>
3 years agoAuto merge of #74526 - erikdesjardins:reftrack, r=Mark-Simulacrum
bors [Mon, 3 Aug 2020 21:43:27 +0000 (21:43 +0000)]
Auto merge of #74526 - erikdesjardins:reftrack, r=Mark-Simulacrum

Add track_caller to RefCell::{borrow, borrow_mut}

So panic messages point at the offending borrow.

Fixes #74472

3 years agorustc_ast: More detailed docs for `Attribute::check_name`
Vadim Petrochenkov [Mon, 3 Aug 2020 21:33:56 +0000 (00:33 +0300)]
rustc_ast: More detailed docs for `Attribute::check_name`

3 years agorustc_ast: `(Nested)MetaItem::check_name` -> `has_name`
Vadim Petrochenkov [Sun, 2 Aug 2020 10:17:20 +0000 (13:17 +0300)]
rustc_ast: `(Nested)MetaItem::check_name` -> `has_name`

For consistency with `Attribute::has_name` which doesn't mark the attribute as used either.

Replace all uses of `check_name` with `has_name` outside of rustc

3 years agoStabilize Ident::new_raw
Aaron Hill [Mon, 3 Aug 2020 03:53:41 +0000 (23:53 -0400)]
Stabilize Ident::new_raw

Tracking issue: #54723

This is a continuation of PR #59002

3 years agoMake rust.use-lld config option work with non MSVC targets
Mateusz Mikuła [Mon, 3 Aug 2020 13:39:09 +0000 (15:39 +0200)]
Make rust.use-lld config option work with non MSVC targets

3 years agoAuto merge of #74827 - ssomers:btree_cleanup_insert, r=Mark-Simulacrum
bors [Mon, 3 Aug 2020 15:46:02 +0000 (15:46 +0000)]
Auto merge of #74827 - ssomers:btree_cleanup_insert, r=Mark-Simulacrum

Move bulk of BTreeMap::insert method down to new method on handle

Adjust the boundary between the map and node layers for insertion: do more in the node layer, keep root manipulation and pointer dereferencing separate. No change in undefined behaviour or performance.

r? @Mark-Simulacrum

3 years agoDisable building rust-analyzer on riscv64
Mark Rousskov [Mon, 3 Aug 2020 14:11:30 +0000 (10:11 -0400)]
Disable building rust-analyzer on riscv64

riscv64 has an LLVM bug that makes rust-analyzer not build.

3 years agoEnable docs on in the x86_64-unknown-linux-musl manifest
David Sonder [Mon, 3 Aug 2020 14:02:20 +0000 (16:02 +0200)]
Enable docs on in the x86_64-unknown-linux-musl manifest

Add the rust-docs component to toolchain x86_64-unknown-linux-musl, which allows
people using rustup on their musl-based linux distribution to download the
rust-docs.

Generating and uploading the docs was enabled in b5d143b.

3 years agoAuto merge of #75092 - kennytm:fix-75009, r=pietroalbini
bors [Mon, 3 Aug 2020 09:34:06 +0000 (09:34 +0000)]
Auto merge of #75092 - kennytm:fix-75009, r=pietroalbini

Fix broken git commit in stdarch

Follow-up on #75009, point to the real master commit.

3 years agofix broken git commit in stdarch
kennytm [Mon, 3 Aug 2020 07:52:30 +0000 (15:52 +0800)]
fix broken git commit in stdarch

3 years agoAuto merge of #75076 - tmiasko:simplify-goto, r=oli-obk
bors [Mon, 3 Aug 2020 07:20:21 +0000 (07:20 +0000)]
Auto merge of #75076 - tmiasko:simplify-goto, r=oli-obk

Fix change detection in CfgSimplifier::collapse_goto_chain

Check that the old target is different from the new collapsed one, before concluding that anything changed.

Fixes #75074
Fixes #75051

3 years agoAuto merge of #75068 - petrochenkov:ignore-debinfo, r=Mark-Simulacrum
bors [Mon, 3 Aug 2020 05:25:03 +0000 (05:25 +0000)]
Auto merge of #75068 - petrochenkov:ignore-debinfo, r=Mark-Simulacrum

tests: Ignore src/test/debuginfo/rc_arc.rs on Windows

It requires loading pretty-printers (`src\etc\gdb_load_rust_pretty_printers.py`), but GDB doesn't load them on Windows.

Not sure how this passes through CI, due to an old GDB version perhaps?

3 years agoAuto merge of #75055 - cjgillot:clean-cache, r=oli-obk
bors [Mon, 3 Aug 2020 03:37:33 +0000 (03:37 +0000)]
Auto merge of #75055 - cjgillot:clean-cache, r=oli-obk

Introduce an abstraction for EvaluationCache and SelectionCache

The small duplicated code has been moved to librustc_query_system.

The remaining changes are some cleanups of structural impls.

3 years agoDo not trigger `unused_braces` for `while let`
Yuki Okushi [Mon, 3 Aug 2020 03:18:10 +0000 (12:18 +0900)]
Do not trigger `unused_braces` for `while let`

3 years agoFix logging for rustdoc
Joshua Nelson [Mon, 3 Aug 2020 02:24:54 +0000 (22:24 -0400)]
Fix logging for rustdoc

3 years agoAuto merge of #74969 - nnethercote:rm-GCX_PTR, r=Mark-Simulacrum
bors [Mon, 3 Aug 2020 01:50:25 +0000 (01:50 +0000)]
Auto merge of #74969 - nnethercote:rm-GCX_PTR, r=Mark-Simulacrum

Remove `GCX_PTR`.

We store an `ImplicitCtxt` pointer in a thread-local value (TLV). This allows
implicit access to a `GlobalCtxt` and some other things.

We also store a `GlobalCtxt` pointer in `GCX_PTR`. This is always the same
`GlobalCtxt` as the one within the `ImplicitCtxt` pointer in TLV. `GCX_PTR`
is only used in the parallel compiler's `handle_deadlock()` function.

This commit does the following.
- It removes `GCX_PTR`.
- It also adds `ImplicitCtxt::new()`, which constructs an `ImplicitCtxt` from a
  `GlobalCtxt`. `ImplicitCtxt::new()` + `tls::enter_context()` is now
  equivalent to the old `tls::enter_global()`.
- Makes `tls::get_tlv()` public for the parallel compiler, because it's
  now used in `handle_deadlock()`.

r? @petrochenkov

3 years agoMerge branch 'master' into remove-in-place-alloc
Tim Diekmann [Mon, 3 Aug 2020 00:18:20 +0000 (02:18 +0200)]
Merge branch 'master' into remove-in-place-alloc

3 years agoAuto merge of #74948 - lzutao:stalize-result-as-deref, r=dtolnay
bors [Sun, 2 Aug 2020 23:55:12 +0000 (23:55 +0000)]
Auto merge of #74948 - lzutao:stalize-result-as-deref, r=dtolnay

Stabilize `Result::as_deref` and `as_deref_mut`

FCP completed in https://github.com/rust-lang/rust/issues/50264#issuecomment-645681400.

This PR stabilizes two new APIs for `std::result::Result`:
```rust
fn as_deref(&self) -> Result<&T::Target, &E> where T: Deref;
fn as_deref_mut(&mut self) -> Result<&mut T::Target, &mut E> where T: DerefMut;
```

This PR also removes two rarely used unstable APIs from `Result`:
```rust
fn as_deref_err(&self) -> Result<&T, &E::Target> where E: Deref;
fn as_deref_mut_err(&mut self) -> Result<&mut T, &mut E::Target> where E: DerefMut;
```

Closes #50264

3 years agoUse more appropriate `tls::with_*` methods in some places.
Nicholas Nethercote [Fri, 31 Jul 2020 06:38:32 +0000 (16:38 +1000)]
Use more appropriate `tls::with_*` methods in some places.

3 years agoRemove `GCX_PTR`.
Nicholas Nethercote [Fri, 31 Jul 2020 03:01:29 +0000 (13:01 +1000)]
Remove `GCX_PTR`.

We store an `ImplicitCtxt` pointer in a thread-local value (TLV). This allows
implicit access to a `GlobalCtxt` and some other things.

We also store a `GlobalCtxt` pointer in `GCX_PTR`. This is always the same
`GlobalCtxt` as the one within the `ImplicitCtxt` pointer in TLV. `GCX_PTR`
is only used in the parallel compiler's `handle_deadlock()` function.

This commit does the following.
- It removes `GCX_PTR`.
- It also adds `ImplicitCtxt::new()`, which constructs an `ImplicitCtxt` from a
  `GlobalCtxt`. `ImplicitCtxt::new()` + `tls::enter_context()` is now
  equivalent to the old `tls::enter_global()`.
- Makes `tls::get_tlv()` public for the parallel compiler, because it's
  now used in `handle_deadlock()`.

3 years agoRemove redundant assignment from CfgSimplifier
Tomasz Miąsko [Mon, 3 Aug 2020 00:00:00 +0000 (00:00 +0000)]
Remove redundant assignment from CfgSimplifier

3 years agoFix change detection in CfgSimplifier::collapse_goto_chain
Tomasz Miąsko [Mon, 3 Aug 2020 00:00:00 +0000 (00:00 +0000)]
Fix change detection in CfgSimplifier::collapse_goto_chain

Check that the old target is different from the new collapsed one,
before concluding that anything changed.

3 years agoAuto merge of #75070 - Manishearth:rollup-2kgcaw5, r=Manishearth
bors [Sun, 2 Aug 2020 22:07:32 +0000 (22:07 +0000)]
Auto merge of #75070 - Manishearth:rollup-2kgcaw5, r=Manishearth

Rollup of 5 pull requests

Successful merges:

 - #74980 (pprust: adjust mixed comment printing and add regression test for #74745)
 - #75009 (Document the discrepancy in the mask type for _mm_shuffle_ps)
 - #75031 (Do not trigger `unused_{braces,parens}` lints with `yield`)
 - #75059 (fix typos)
 - #75064 (compiletest: Support ignoring tests requiring missing LLVM components)

Failed merges:

r? @ghost

3 years agoRollup merge of #75064 - petrochenkov:llvmtarg, r=Mark-Simulacrum
Manish Goregaokar [Sun, 2 Aug 2020 20:08:48 +0000 (13:08 -0700)]
Rollup merge of #75064 - petrochenkov:llvmtarg, r=Mark-Simulacrum

compiletest: Support ignoring tests requiring missing LLVM components

This PR implements a more principled solution to the problem described in https://github.com/rust-lang/rust/pull/66084.

Builds of LLVM backends take a lot of time and disk space.
So it usually makes sense to build rustc with
```toml
[llvm]
targets = "X86"
experimental-targets = ""
```
unless you are working on some target-specific tasks.

A few tests, however, require non-x86 backends to be built.
A new test directive `// needs-llvm-components: component1 component2 component3` makes such tests to be automatically ignored if one of the listed components is missing in the provided LLVM (this is determined through `llvm-config --components`).

As a result, the test suite now fully passes with LLVM built only with the x86 backend. The component list in this case is
```
aggressiveinstcombine all all-targets analysis asmparser asmprinter binaryformat bitreader bitstreamreader bitwriter cfguard codegen core coroutines coverage debuginfocodeview debuginfodwarf debuginfogsym debuginfomsf debuginfopdb demangle dlltooldriver dwarflinker engine executionengine frontendopenmp fuzzmutate globalisel instcombine instrumentation interpreter ipo irreader jitlink libdriver lineeditor linker lto mc mca mcdisassembler mcjit mcparser mirparser native nativecodegen objcarcopts object objectyaml option orcerror orcjit passes profiledata remarks runtimedyld scalaropts selectiondag support symbolize tablegen target textapi transformutils vectorize windowsmanifest x86 x86asmparser x86codegen x86desc x86disassembler x86info x86utils xray
```

(With the default target list it's much larger.)
```
aarch64 aarch64asmparser aarch64codegen aarch64desc aarch64disassembler aarch64info aarch64utils aggressiveinstcombine all all-targets analysis arm armasmparser armcodegen armdesc armdisassembler arminfo armutils asmparser asmprinter avr avrasmparser avrcodegen avrdesc avrdisassembler avrinfo binaryformat bitreader bitstreamreader bitwriter cfguard codegen core coroutines coverage debuginfocodeview debuginfodwarf debuginfogsym debuginfomsf debuginfopdb demangle dlltooldriver dwarflinker engine executionengine frontendopenmp fuzzmutate globalisel hexagon hexagonasmparser hexagoncodegen hexagondesc hexagondisassembler hexagoninfo instcombine instrumentation interpreter ipo irreader jitlink libdriver lineeditor linker lto mc mca mcdisassembler mcjit mcparser mips mipsasmparser mipscodegen mipsdesc mipsdisassembler mipsinfo mirparser msp430 msp430asmparser msp430codegen msp430desc msp430disassembler msp430info native nativecodegen nvptx nvptxcodegen nvptxdesc nvptxinfo objcarcopts object objectyaml option orcerror orcjit passes powerpc powerpcasmparser powerpccodegen powerpcdesc powerpcdisassembler powerpcinfo profiledata remarks riscv riscvasmparser riscvcodegen riscvdesc riscvdisassembler riscvinfo riscvutils runtimedyld scalaropts selectiondag sparc sparcasmparser sparccodegen sparcdesc sparcdisassembler sparcinfo support symbolize systemz systemzasmparser systemzcodegen systemzdesc systemzdisassembler systemzinfo tablegen target textapi transformutils vectorize webassembly webassemblyasmparser webassemblycodegen webassemblydesc webassemblydisassembler webassemblyinfo windowsmanifest x86 x86asmparser x86codegen x86desc x86disassembler x86info x86utils xray
```

https://github.com/rust-lang/rust/pull/66084 is also reverted now.

r? @Mark-Simulacrum

3 years agoRollup merge of #75059 - shengsheng:typos, r=Dylan-DPC
Manish Goregaokar [Sun, 2 Aug 2020 20:08:47 +0000 (13:08 -0700)]
Rollup merge of #75059 - shengsheng:typos, r=Dylan-DPC

fix typos

Fix common misspellings with https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines

3 years agoRollup merge of #75031 - JohnTitor:unused-parens-braces-yield, r=lcnr
Manish Goregaokar [Sun, 2 Aug 2020 20:08:45 +0000 (13:08 -0700)]
Rollup merge of #75031 - JohnTitor:unused-parens-braces-yield, r=lcnr

Do not trigger `unused_{braces,parens}` lints with `yield`

Fixes #74883
r? @lcnr

3 years agoRollup merge of #75009 - georgio:master, r=kennytm
Manish Goregaokar [Sun, 2 Aug 2020 20:08:43 +0000 (13:08 -0700)]
Rollup merge of #75009 - georgio:master, r=kennytm

Document the discrepancy in the mask type for _mm_shuffle_ps

This Pull Request updates the `stdarch` submodule in order to resolve #62490

3 years agoRollup merge of #74980 - davidtwco:issue-74745-pprust-regression-test, r=petrochenkov
Manish Goregaokar [Sun, 2 Aug 2020 20:08:42 +0000 (13:08 -0700)]
Rollup merge of #74980 - davidtwco:issue-74745-pprust-regression-test, r=petrochenkov

pprust: adjust mixed comment printing and add regression test for #74745

Fixes #74745.

This PR adds a regression test for #74745. While a `ignore-tidy-trailing-lines` header is required, this doesn't stop the test from reproducing, so long as there is no newline at the end of the file.

However, adding the header comments made the test fail due to a bug in pprust - so this PR also  adjusts the pretty printing of mixed comments so that the initial zero-break isn't emitted at the beginning of the line. Through this, the `block-comment-wchar` test can have the `pp-exact` file removed, as it no longer converges from pretty printing of the source.

3 years agoAuto merge of #74826 - matklad:mbe-fragment, r=petrochenkov
bors [Sun, 2 Aug 2020 19:48:44 +0000 (19:48 +0000)]
Auto merge of #74826 - matklad:mbe-fragment, r=petrochenkov

Introduce NonterminalKind for more type-safe mbe parsing

It encapsulate the (part of) the interface between the parser and
macro by example (macro_rules) parser.

The second bit is somewhat more general `parse_ast_fragment`, which is
the reason why we keep some `parse_xxx` functions as public.

3 years agoSeparate off a leafy insert function instead of lying, and split split similarly
Stein Somers [Tue, 28 Jul 2020 12:25:30 +0000 (14:25 +0200)]
Separate off a leafy insert function instead of lying, and split split similarly

3 years agotests: Ignore src/test/debuginfo/rc_arc.rs on Windows
Vadim Petrochenkov [Sun, 2 Aug 2020 19:20:48 +0000 (22:20 +0300)]
tests: Ignore src/test/debuginfo/rc_arc.rs on Windows

It requires loading pretty-printers, but GDB doesn't load them on Windows