]> git.lizzy.rs Git - rust.git/log
rust.git
3 years agoAuto merge of #76035 - tiagolam:master, r=pietroalbini
bors [Fri, 28 Aug 2020 20:58:49 +0000 (20:58 +0000)]
Auto merge of #76035 - tiagolam:master, r=pietroalbini

Build dist-x86_64-musl with --enable-profiler.

Trying to build a Rust project with `-Zprofile` for target
x86_64-unknown-linux-musl using rustc 1.46.0-nightly (346aec9b0
2020-07-11), installed with rustup, results in the following error.
```
        export RUSTFLAGS="-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort"export CARGO_INCREMENTAL=0$ cargo build --target=x86_64-unknown-linux-muslCompiling hello_world v0.1.0 (…)error[E0463]: can't find crate for `profiler_builtins`
        |
         = note: the compiler may have been built without the profiler runtime

        error: aborting due to previous error

        For more information about this error, try `rustc --explain E0463`.error: could not compile `hello_world`.

        To learn more, run the command again with --verbose.
```

`-Zprofile` is required here to enable grcov profiling.

This is similar in nature to issue
https://github.com/rust-lang/rust/issues/57257, which has been fixed in
asimilar way at https://github.com/rust-lang/rust/pull/60476 .

A fix for Android has also landed not long ago:
https://github.com/rust-lang/rust/pull/70054 .

Signed-off-by: Tiago Lam <tiagol@hadean.com>
3 years agoBuild dist-x86_64-musl with --enable-profiler.
Tiago Lam [Fri, 28 Aug 2020 17:23:20 +0000 (18:23 +0100)]
Build dist-x86_64-musl with --enable-profiler.

Trying to build a Rust project with `-Zprofile` for target
x86_64-unknown-linux-musl using rustc 1.46.0-nightly (346aec9b0
2020-07-11), installed with rustup, results in the following error.
```
        export RUSTFLAGS="-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort"export CARGO_INCREMENTAL=0$ cargo build --target=x86_64-unknown-linux-muslCompiling hello_world v0.1.0 (…)error[E0463]: can't find crate for `profiler_builtins`
        |
         = note: the compiler may have been built without the profiler runtime

        error: aborting due to previous error

        For more information about this error, try `rustc --explain E0463`.error: could not compile `hello_world`.

        To learn more, run the command again with --verbose.
```

`-Zprofile` is required here to enable grcov profiling.

This is similar in nature to issue
https://github.com/rust-lang/rust/issues/57257, which has been fixed in
asimilar way at https://github.com/rust-lang/rust/pull/60476 .

A fix for Android has also landed not long ago:
https://github.com/rust-lang/rust/pull/70054 .

Signed-off-by: Tiago Lam <tiagol@hadean.com>
3 years agoAuto merge of #76018 - pietroalbini:ci-left-fallible-finish-2, r=Mark-Simulacrum
bors [Fri, 28 Aug 2020 17:14:04 +0000 (17:14 +0000)]
Auto merge of #76018 - pietroalbini:ci-left-fallible-finish-2, r=Mark-Simulacrum

Run cancel-outdated-builds after fully setting up the env

This PR fixes #75995 not working as expected.

Due to GitHub Actions limitations the environment variables set in the build matrix definition are not added by the GHA runner, but by the `setup-environment.sh` script. Before this PR the `cancel-outdated-builds` action was started before that script, so it was never able to detect the "suppression" variable added in #75995. This PR reorders the jobs to make sure `setup-environment.sh` runs before the action.

r? @Mark-Simulacrum

3 years agoAuto merge of #76019 - pietroalbini:rollup-1tkgdnd, r=pietroalbini
bors [Fri, 28 Aug 2020 10:16:03 +0000 (10:16 +0000)]
Auto merge of #76019 - pietroalbini:rollup-1tkgdnd, r=pietroalbini

Rollup of 12 pull requests

Successful merges:

 - #75330 (Improve rendering of crate features via doc(cfg))
 - #75927 (Use intra-doc links in `core::macros`)
 - #75941 (Clean up E0761 explanation)
 - #75943 (Fix potential UB in align_offset doc examples)
 - #75946 (Error use explicit intra-doc link and fix text)
 - #75955 (Use intra-doc links in `core::future::future` and `core::num::dec2flt`)
 - #75967 (Fix typo in `std::hint::black_box` docs)
 - #75972 (Fix ICE due to carriage return w/ multibyte char)
 - #75989 (Rename rustdoc/test -> rustdoc/doctest)
 - #75996 (fix wording in release notes)
 - #75998 (Add InstrProfilingPlatformFuchsia.c to profiler_builtins)
 - #76000 (Adds --bless support to test/run-make-fulldeps)

Failed merges:

r? @ghost

3 years agoRollup merge of #76000 - richkadel:llvm-coverage-map-gen-6b.2, r=wesleywiser
Pietro Albini [Fri, 28 Aug 2020 08:24:12 +0000 (10:24 +0200)]
Rollup merge of #76000 - richkadel:llvm-coverage-map-gen-6b.2, r=wesleywiser

Adds --bless support to test/run-make-fulldeps

The ability to "bless" output for some of these tests is critical to
making it practical to adapt tests to unrelated changes.

This is needed for new coverage tests, as shown in PR #76004 .

r? @tmandry
FYI: @wesleywiser

3 years agoRollup merge of #75998 - richkadel:llvm-coverage-map-gen-6b.1, r=wesleywiser
Pietro Albini [Fri, 28 Aug 2020 08:24:11 +0000 (10:24 +0200)]
Rollup merge of #75998 - richkadel:llvm-coverage-map-gen-6b.1, r=wesleywiser

Add InstrProfilingPlatformFuchsia.c to profiler_builtins

All other Platform files included in `llvm-project/compiler-rt` were
present, except Fuchsia.

Now that there is a functional end-to-end version of
`-Zinstrument-coverage`, I need to start building and testing
coverage-enabled Rust programs on Fuchsia, and this file is required.

r? @tmandry
FYI, @wesleywiser

3 years agoRollup merge of #75996 - tinaun:patch-2, r=jonas-schievink
Pietro Albini [Fri, 28 Aug 2020 08:24:09 +0000 (10:24 +0200)]
Rollup merge of #75996 - tinaun:patch-2, r=jonas-schievink

fix wording in release notes

C-like enums are still allowed to impl drop, you just can't cast them to numbers

3 years agoRollup merge of #75989 - matklad:renamerustdoctest, r=GuillaumeGomez
Pietro Albini [Fri, 28 Aug 2020 08:24:07 +0000 (10:24 +0200)]
Rollup merge of #75989 - matklad:renamerustdoctest, r=GuillaumeGomez

Rename rustdoc/test -> rustdoc/doctest

This modules contains the implementation of doctests, and not the
tests of rustdoc itself. This name is confusing, so let's rename it to
doctest for clarity.

3 years agoRollup merge of #75972 - JulianKnodt:i70381, r=rollup
Pietro Albini [Fri, 28 Aug 2020 08:24:06 +0000 (10:24 +0200)]
Rollup merge of #75972 - JulianKnodt:i70381, r=rollup

Fix ICE due to carriage return w/ multibyte char

Based off of this [commit](https://github.com/kfitch/rust/commit/972560b83f80e1219b5735ff3d751c034115b08e)

Fixes #70381

CC: @Dylan-DPC
3 years agoRollup merge of #75967 - aticu:blackbox_typo, r=Dylan-DPC
Pietro Albini [Fri, 28 Aug 2020 08:24:04 +0000 (10:24 +0200)]
Rollup merge of #75967 - aticu:blackbox_typo, r=Dylan-DPC

Fix typo in `std::hint::black_box` docs

3 years agoRollup merge of #75955 - camelid:intra-doc-links-for-future-and-dec2flt, r=jyn514
Pietro Albini [Fri, 28 Aug 2020 08:24:02 +0000 (10:24 +0200)]
Rollup merge of #75955 - camelid:intra-doc-links-for-future-and-dec2flt, r=jyn514

Use intra-doc links in `core::future::future` and `core::num::dec2flt`

Part of #75080.

@rustbot modify labels: A-intra-doc-links T-doc

3 years agoRollup merge of #75946 - pickfire:patch-8, r=jyn514
Pietro Albini [Fri, 28 Aug 2020 08:24:00 +0000 (10:24 +0200)]
Rollup merge of #75946 - pickfire:patch-8, r=jyn514

Error use explicit intra-doc link and fix text

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

r? @jyn514

3 years agoRollup merge of #75943 - elichai:2020-align_offset-docs, r=RalfJung
Pietro Albini [Fri, 28 Aug 2020 08:23:59 +0000 (10:23 +0200)]
Rollup merge of #75943 - elichai:2020-align_offset-docs, r=RalfJung

Fix potential UB in align_offset doc examples

Currently it takes a pointer only to the first element in the array, this changes the code to take a pointer to the whole array.
miri can't catch this right now because it later calls `x.len()` which re-tags the pointer for the whole array.

https://github.com/rust-lang/miri/issues/1526#issuecomment-680897144

3 years agoRollup merge of #75941 - GuillaumeGomez:cleanup-e0761, r=Dylan-DPC
Pietro Albini [Fri, 28 Aug 2020 08:23:57 +0000 (10:23 +0200)]
Rollup merge of #75941 - GuillaumeGomez:cleanup-e0761, r=Dylan-DPC

Clean up E0761 explanation

r? @Dylan-DPC

3 years agoRollup merge of #75927 - camelid:intra-doc-links-for-core-macros, r=jyn514
Pietro Albini [Fri, 28 Aug 2020 08:23:55 +0000 (10:23 +0200)]
Rollup merge of #75927 - camelid:intra-doc-links-for-core-macros, r=jyn514

Use intra-doc links in `core::macros`

Part of #75080.

Also cleaned up some things.

@rustbot modify labels: A-intra-doc-links T-doc T-rustdoc

3 years agoRollup merge of #75330 - Nemo157:improve-doc-cfg-features, r=GuillaumeGomez
Pietro Albini [Fri, 28 Aug 2020 08:23:53 +0000 (10:23 +0200)]
Rollup merge of #75330 - Nemo157:improve-doc-cfg-features, r=GuillaumeGomez

Improve rendering of crate features via doc(cfg)

The current rendering of crate features with `doc(cfg(feature = ".."))` is verbose and unwieldy for users, `doc(cfg(target_feature = ".."))` is special-cased to make it render nicely, and a similar rendering can be applied to `doc(cfg(feature))` to make it easier for users to read.

I also added special casing of `all`/`any` cfgs consisting of just `feature`/`target-feature` to remove the repetitive "target/crate feature" prefix.

The downside of this current rendering is that there is no distinction between `feature` and `target_feature` in the shorthand display. IMO this is ok, or if anything `target_feature` should have a more verbose shorthand, because `doc(cfg(feature = ".."))` usage is going to vastly outstrip `doc(cfg(target_feature = ".."))` usage in non-stdlib crates when it eventually stabilizes (or even before that given the number of crates using `cfg_attr(docsrs)` like constructs).

## Previously

<img width="259" alt="Screenshot 2020-08-09 at 13 32 42" src="https://user-images.githubusercontent.com/81079/89731110-d090c000-da44-11ea-96fa-56adc6339123.png">
<img width="438" alt="image" src="https://user-images.githubusercontent.com/81079/89731116-d7b7ce00-da44-11ea-87c6-022d192d6eca.png">
<img width="765" alt="image" src="https://user-images.githubusercontent.com/81079/89731152-24030e00-da45-11ea-9552-1c270bff2729.png">
<img width="671" alt="image" src="https://user-images.githubusercontent.com/81079/89731158-28c7c200-da45-11ea-8acb-97d8a4ce00eb.png">

## Now

<img width="216" alt="image" src="https://user-images.githubusercontent.com/81079/89731123-e1d9cc80-da44-11ea-82a8-5900bd9448a5.png">
<img width="433" alt="image" src="https://user-images.githubusercontent.com/81079/89731127-e8684400-da44-11ea-9d18-572fd810f19f.png">
<img width="606" alt="image" src="https://user-images.githubusercontent.com/81079/89731162-2feed000-da45-11ea-98d2-8a88c364d903.png">
<img width="669" alt="image" src="https://user-images.githubusercontent.com/81079/89731991-ccb46c00-da4b-11ea-9416-cd20a3193826.png">

cc #43781

3 years agoci: run cancel-outdated-builds after fully setting up the env
Pietro Albini [Fri, 28 Aug 2020 08:09:08 +0000 (10:09 +0200)]
ci: run cancel-outdated-builds after fully setting up the env

3 years agoRemove unnecessary intra-doc link
Camelid [Fri, 28 Aug 2020 02:42:23 +0000 (19:42 -0700)]
Remove unnecessary intra-doc link

Co-authored-by: Joshua Nelson <joshua@yottadb.com>
3 years agoAuto merge of #70212 - Amanieu:catch_foreign, r=Mark-Simulacrum
bors [Fri, 28 Aug 2020 01:20:17 +0000 (01:20 +0000)]
Auto merge of #70212 - Amanieu:catch_foreign, r=Mark-Simulacrum

Abort when foreign exceptions are caught by catch_unwind

Prior to this PR, foreign exceptions were not caught by catch_unwind, and instead passed through invisibly. This represented a painful soundness hole in some libraries ([take_mut](https://github.com/Sgeo/take_mut/blob/master/src/lib.rs#L37)), which relied on `catch_unwind` to handle all possible exit paths from a closure.

With this PR, foreign exceptions are now caught by `catch_unwind` and will trigger an abort since catching foreign exceptions is currently UB according to the latest proposals by the FFI unwind project group.

cc @rust-lang/wg-ffi-unwind

3 years agoAuto merge of #75995 - pietroalbini:ci-let-fallible-finish, r=Mark-Simulacrum
bors [Thu, 27 Aug 2020 23:22:34 +0000 (23:22 +0000)]
Auto merge of #75995 - pietroalbini:ci-let-fallible-finish, r=Mark-Simulacrum

Disable cancel-outdated-builds for auto-fallible

`cancel-outdated-builds` doesn't need to be enabled on fallible jobs, and it's actually making it harder for us to see if https://github.com/rust-lang/rust/issues/71988 is fixed. This adds some temporary code to avoid `auto-fallible` jobs from being cancelled by our tooling.

r? @Mark-Simulacrum

3 years agoAuto merge of #75976 - GuillaumeGomez:help-popup, r=jyn514
bors [Thu, 27 Aug 2020 21:30:32 +0000 (21:30 +0000)]
Auto merge of #75976 - GuillaumeGomez:help-popup, r=jyn514

Improve help popup

Fixes #75623.

The second commit is just a slight improvement: the help popup won't be created until someone presses "?" or ESC. Not a big improvement in itself but considering the low amount of code required, I think it was worth the shot.

r? @jyn514

3 years agoAbort when catch_unwind catches a foreign exception
Amanieu d'Antras [Sat, 21 Mar 2020 07:50:38 +0000 (07:50 +0000)]
Abort when catch_unwind catches a foreign exception

3 years agoAdds --bless support to test/run-make-fulldeps
Rich Kadel [Thu, 27 Aug 2020 19:27:18 +0000 (12:27 -0700)]
Adds --bless support to test/run-make-fulldeps

The ability to "bless" output for some of these tests is critical to
making it practical to adapt tests to unrelated changes.

This is needed for new coverage tests, as shown in PR #75828 (or its
derivative).

3 years agoAdd InstrProfilingPlatformFuchsia.c to profiler_builtins
Rich Kadel [Thu, 27 Aug 2020 18:52:36 +0000 (11:52 -0700)]
Add InstrProfilingPlatformFuchsia.c to profiler_builtins

All other Platform files included in `llvm-project/compiler-rt` were
present, except Fuchsia.

Now that there is a functional end-to-end version of
`-Zinstrument-coverage`, I need to start building and testing
coverage-enabled Rust programs on Fuchsia, and this file is required.

3 years agofix wording in release notes
tinaun [Thu, 27 Aug 2020 18:41:18 +0000 (14:41 -0400)]
fix wording in release notes

C-like enums are still allowed to impl drop, you just can't cast them to numbers

3 years agoUse intra-doc links in `core::num::dec2flt`
Camelid [Wed, 26 Aug 2020 19:26:26 +0000 (12:26 -0700)]
Use intra-doc links in `core::num::dec2flt`

3 years agoUse intra-doc links in `core::future::future`
Camelid [Wed, 26 Aug 2020 19:25:19 +0000 (12:25 -0700)]
Use intra-doc links in `core::future::future`

3 years agoci: disable cancel-outdated-builds for auto-fallible
Pietro Albini [Thu, 27 Aug 2020 18:07:06 +0000 (20:07 +0200)]
ci: disable cancel-outdated-builds for auto-fallible

3 years agoAuto merge of #75933 - Aaron1011:feature/closure-move-err, r=oli-obk
bors [Thu, 27 Aug 2020 17:48:23 +0000 (17:48 +0000)]
Auto merge of #75933 - Aaron1011:feature/closure-move-err, r=oli-obk

Point to a move-related span when pointing to closure upvars

Fixes #75904

When emitting move/borrow errors, we may point into a closure to
indicate why an upvar is used in the closure. However, we use the
'upvar span', which is just an arbitrary usage of the upvar. If the
upvar is used in multiple places (e.g. a borrow and a move), we may end
up pointing to the borrow. If the overall error is a move error, this
can be confusing.

This PR tracks the span that caused an upvar to become captured by-value
instead of by-ref (assuming that it's not a `move` closure). We use this
span instead of the 'upvar' span when we need to point to an upvar usage
during borrow checking.

3 years agoRename rustdoc/test -> rustdoc/doctest
Aleksey Kladov [Thu, 27 Aug 2020 16:20:15 +0000 (18:20 +0200)]
Rename rustdoc/test -> rustdoc/doctest

This modules contains the implementation of doctests, and not the
tests of rustdoc itself. This name is confusing, so let's rename it to
doctest for clarity.

3 years agoAuto merge of #74941 - dylanmckay:replace-broken-avr-unknown-unknown-target, r=oli-obk
bors [Thu, 27 Aug 2020 15:48:56 +0000 (15:48 +0000)]
Auto merge of #74941 - dylanmckay:replace-broken-avr-unknown-unknown-target, r=oli-obk

[AVR] Replace broken 'avr-unknown-unknown' target with 'avr-unknown-gnu-atmega328' target

The `avr-unknown-unknown` target has never worked correctly, always trying to invoke
the host linker and failing. It aimed to be a mirror of AVR-GCC's
default handling of the `avr-unknown-unknown' triple (assume bare
minimum chip features, silently skip linking runtime libraries, etc).
This behaviour is broken-by-default as it will cause a miscompiled executable
when flashed.

This patch improves the AVR builtin target specifications to instead
expose only a 'avr-unknown-gnu-atmega328' target. This target system is
`gnu`, as it uses the AVR-GCC frontend along with avr-binutils. The
target triple ABI is 'atmega328'.

In the future, it should be possible to replace the dependency on
AVR-GCC and binutils by using the in-progress AVR LLD and compiler-rt support.
Perhaps at that point it would make sense to add an
'avr-unknown-unknown-atmega328' target as a better default when
implemented.

There is no current intention to add in-tree AVR target specifications for other
AVR microcontrollers - this one can serve as a reference implementation
for other devices via `rustc --print target-spec-json
avr-unknown-gnu-atmega328p`.

There should be no users of the existing 'avr-unknown-unknown' Rust
target as a custom target specification JSON has always been
recommended, and the avr-unknown-unknown target could never pass the
linking step anyway.

3 years agoReduce duplicate doc link in error
Ivan Tham [Thu, 27 Aug 2020 15:30:15 +0000 (23:30 +0800)]
Reduce duplicate doc link in error

Co-authored-by: Joshua Nelson <joshua@yottadb.com>
3 years agoDelay help popup creation to when it's needed
Guillaume Gomez [Thu, 27 Aug 2020 11:34:35 +0000 (13:34 +0200)]
Delay help popup creation to when it's needed

3 years agoImprove helper wording
Guillaume Gomez [Thu, 27 Aug 2020 10:56:43 +0000 (12:56 +0200)]
Improve helper wording

3 years agoAuto merge of #75947 - pietroalbini:bootstrap-update, r=Mark-Simulacrum
bors [Thu, 27 Aug 2020 09:24:51 +0000 (09:24 +0000)]
Auto merge of #75947 - pietroalbini:bootstrap-update, r=Mark-Simulacrum

Bump version to 1.48 and update cfg(bootstrap)s

r? @Mark-Simulacrum

3 years agoforgot to remove a cfg(not(bootstrap))
Pietro Albini [Thu, 27 Aug 2020 08:58:34 +0000 (10:58 +0200)]
forgot to remove a cfg(not(bootstrap))

3 years agoAuto merge of #72784 - csmoe:issue-61076, r=estebank
bors [Thu, 27 Aug 2020 07:26:32 +0000 (07:26 +0000)]
Auto merge of #72784 - csmoe:issue-61076, r=estebank

Await on mismatched future types

Closes #61076
This PR suggests to `await` on:
1. `async_fn().bar() => async_fn().await.bar()`
2. `async_fn().field => async_fn().await.field`
3. ` if let x = async() {} => if let x = async().await {}`

r? @tmandry @estebank

3 years agoAuto merge of #75879 - pietroalbini:update-relnotes, r=Mark-Simulacrum
bors [Thu, 27 Aug 2020 05:29:43 +0000 (05:29 +0000)]
Auto merge of #75879 - pietroalbini:update-relnotes, r=Mark-Simulacrum

Include last-minute compatibility notes for 1.46.0

This cherry-picks the relnotes update of https://github.com/rust-lang/rust/pull/75878 on master.

r? @Mark-Simulacrum

3 years agoadd projection_ty_from_predicates query
csmoe [Thu, 27 Aug 2020 04:09:34 +0000 (12:09 +0800)]
add projection_ty_from_predicates query

3 years agoFix ICE due to carriage return w/ multibyte char
kadmin [Thu, 27 Aug 2020 02:18:38 +0000 (02:18 +0000)]
Fix ICE due to carriage return w/ multibyte char

Based off of
https://github.com/kfitch/rust/commit/972560b83f80e1219b5735ff3d751c034115b08e

3 years agoAuto merge of #75842 - camelid:highlight-crate-links, r=jyn514
bors [Thu, 27 Aug 2020 02:51:01 +0000 (02:51 +0000)]
Auto merge of #75842 - camelid:highlight-crate-links, r=jyn514

Highlight crate links like normal links

Fixes #75823.

Cc @jyn514

3 years agoAuto merge of #75966 - Dylan-DPC:rollup-srfpces, r=Dylan-DPC
bors [Thu, 27 Aug 2020 00:25:52 +0000 (00:25 +0000)]
Auto merge of #75966 - Dylan-DPC:rollup-srfpces, r=Dylan-DPC

Rollup of 10 pull requests

Successful merges:

 - #74730 (Hexagon libstd: update type defs)
 - #75758 (Fixes for VxWorks)
 - #75780 (Unconfuse Unpin docs a bit)
 - #75806 (Prevent automatic page change when using history)
 - #75818 (Update docs for SystemTime Windows implementation)
 - #75837 (Fix font color for help button in ayu and dark themes)
 - #75870 (Unify theme choices border color in ayu theme)
 - #75875 (Shorten liballoc vec resize intra-doc link)
 - #75953 (Fix swapped stability attributes for rustdoc lints)
 - #75958 (Avoid function-scoping global variables)

Failed merges:

r? @ghost

3 years agoFix typo in `std::hint::black_box` docs
aticu [Wed, 26 Aug 2020 23:16:18 +0000 (01:16 +0200)]
Fix typo in `std::hint::black_box` docs

3 years agoRollup merge of #75958 - Mark-Simulacrum:fix-toolstate, r=kennytm
Dylan DPC [Wed, 26 Aug 2020 23:14:20 +0000 (01:14 +0200)]
Rollup merge of #75958 - Mark-Simulacrum:fix-toolstate, r=kennytm

Avoid function-scoping global variables

In 2e6f2e885506ee4, we added a main function to the publish_toolstate.py script.
Unfortunately, we missed that the Python program implicitly declares global
variables in that code, which means that adding a function changes variable
scoping and breaks other code.

This commit avoids introducing that function and adds a warning to future
editors of the code.

3 years agoRollup merge of #75953 - jyn514:missing-lints, r=Manishearth
Dylan DPC [Wed, 26 Aug 2020 23:14:18 +0000 (01:14 +0200)]
Rollup merge of #75953 - jyn514:missing-lints, r=Manishearth

Fix swapped stability attributes for rustdoc lints

This fixes a regression introduced in https://github.com/rust-lang/rust/pull/74855. Previously, `missing_doc_code_examples` would be run on stable and `private_doc_tests` would only be run on nightly. Now, it correctly does the reverse.
Closes https://github.com/rust-lang/rust/issues/75951.
r? @ehuss

3 years agoRollup merge of #75875 - pickfire:patch-4, r=jyn514
Dylan DPC [Wed, 26 Aug 2020 23:14:17 +0000 (01:14 +0200)]
Rollup merge of #75875 - pickfire:patch-4, r=jyn514

Shorten liballoc vec resize intra-doc link

r? @jyn514

3 years agoRollup merge of #75870 - GuillaumeGomez:unify-border-color-theme-ayu, r=pickfire
Dylan DPC [Wed, 26 Aug 2020 23:14:15 +0000 (01:14 +0200)]
Rollup merge of #75870 - GuillaumeGomez:unify-border-color-theme-ayu, r=pickfire

Unify theme choices border color in ayu theme

There was a slight color difference in the theme choice menu borders:

![Screenshot from 2020-08-24 10-37-05](https://user-images.githubusercontent.com/3050060/91022913-22654880-e5f6-11ea-8165-302b2d4e701e.png)
![Screenshot from 2020-08-24 10-37-58](https://user-images.githubusercontent.com/3050060/91022918-242f0c00-e5f6-11ea-989a-e26a28196d09.png)

r? @Cldfire

3 years agoRollup merge of #75837 - GuillaumeGomez:fix-font-color-help-button, r=Cldfire
Dylan DPC [Wed, 26 Aug 2020 23:14:13 +0000 (01:14 +0200)]
Rollup merge of #75837 - GuillaumeGomez:fix-font-color-help-button, r=Cldfire

Fix font color for help button in ayu and dark themes

A nice before/after:

![Screenshot from 2020-08-23 14-47-07](https://user-images.githubusercontent.com/3050060/90979230-0dd07400-e554-11ea-85f7-046dfca65e8e.png)

![Screenshot from 2020-08-23 14-47-03](https://user-images.githubusercontent.com/3050060/90979233-145eeb80-e554-11ea-8e63-1864c3f2699b.png)

For the ayu theme, the change is very "light", the font color was already close to white, so I unified the color with the pictures of the other buttons:

![Screenshot from 2020-08-23 15-20-45](https://user-images.githubusercontent.com/3050060/90979281-5e47d180-e554-11ea-9993-8595057481ab.png)
![Screenshot from 2020-08-23 15-20-50](https://user-images.githubusercontent.com/3050060/90979279-5daf3b00-e554-11ea-8d39-beb57091aba7.png)

3 years agoRollup merge of #75818 - ollie27:doc_systemtime_windows, r=retep998
Dylan DPC [Wed, 26 Aug 2020 23:14:11 +0000 (01:14 +0200)]
Rollup merge of #75818 - ollie27:doc_systemtime_windows, r=retep998

Update docs for SystemTime Windows implementation

Windows now uses `GetSystemTimePreciseAsFileTime` (since #69858) on versions of Windows that support it.

3 years agoRollup merge of #75806 - GuillaumeGomez:prevent-automatic-page-change-history, r...
Dylan DPC [Wed, 26 Aug 2020 23:14:08 +0000 (01:14 +0200)]
Rollup merge of #75806 - GuillaumeGomez:prevent-automatic-page-change-history, r=pickfire

Prevent automatic page change when using history

Fixes #75774.

3 years agoRollup merge of #75780 - matklad:unconfuseunpindocs, r=KodrAus
Dylan DPC [Wed, 26 Aug 2020 23:14:06 +0000 (01:14 +0200)]
Rollup merge of #75780 - matklad:unconfuseunpindocs, r=KodrAus

Unconfuse Unpin docs a bit

* Don't say that Unpin is used to prevent moves, because it is used
  to *allow* moves
* Be more precise about kindedness of things, it is
  `Pin<Pointer<Data>>`, rather than just `Pin<Pointer>`.

3 years agoRollup merge of #75758 - bpangWR:master, r=Mark-Simulacrum
Dylan DPC [Wed, 26 Aug 2020 23:14:04 +0000 (01:14 +0200)]
Rollup merge of #75758 - bpangWR:master, r=Mark-Simulacrum

Fixes for VxWorks

r? @alexcrichton

3 years agoRollup merge of #74730 - androm3da:fix_libstd_hexlinux_01, r=dtolnay
Dylan DPC [Wed, 26 Aug 2020 23:14:02 +0000 (01:14 +0200)]
Rollup merge of #74730 - androm3da:fix_libstd_hexlinux_01, r=dtolnay

Hexagon libstd: update type defs

3 years agoAuto merge of #75898 - lcnr:variant-def-recovered, r=petrochenkov
bors [Wed, 26 Aug 2020 22:28:48 +0000 (22:28 +0000)]
Auto merge of #75898 - lcnr:variant-def-recovered, r=petrochenkov

VariantDef: move `recovered` into `VariantFlags`

3 years agoAvoid function-scoping global variables
Mark Rousskov [Wed, 26 Aug 2020 21:22:13 +0000 (17:22 -0400)]
Avoid function-scoping global variables

In 2e6f2e885506ee4, we added a main function to the publish_toolstate.py script.
Unfortunately, we missed that the Python program implicitly declares global
variables in that code, which means that adding a function changes variable
scoping and breaks other code.

This commit avoids introducing that function and adds a warning to future
editors of the code.

3 years agoAuto merge of #75944 - jumbatm:issue-75924-clashing-extern-decl-ice, r=spastorino
bors [Wed, 26 Aug 2020 20:31:44 +0000 (20:31 +0000)]
Auto merge of #75944 - jumbatm:issue-75924-clashing-extern-decl-ice, r=spastorino

Fix ICE on unwrap of unknown layout in ClashingExternDeclarations.

Fixes #75924.

3 years agoFix swapped stability attributes
Joshua Nelson [Wed, 26 Aug 2020 19:13:57 +0000 (15:13 -0400)]
Fix swapped stability attributes

This fixes a regression introduced in
https://github.com/rust-lang/rust/pull/74855.

3 years agoAuto merge of #75912 - scottmcm:manuallydrop-vs-forget, r=Mark-Simulacrum
bors [Wed, 26 Aug 2020 18:40:51 +0000 (18:40 +0000)]
Auto merge of #75912 - scottmcm:manuallydrop-vs-forget, r=Mark-Simulacrum

Suggest `mem::forget` if `mem::ManuallyDrop::new` isn't used

I think this communicates the intent more idiomatically, and is shorter anyway.

Inspired because [it came up on URLO](https://users.rust-lang.org/t/validity-of-memory-area-after-std-forget/47730/7?u=scottmcm), and it turns out that std had done it too in one spot:
![image](https://user-images.githubusercontent.com/18526288/91203819-e19f2980-e6f2-11ea-9112-835f3b22ce05.png)

3 years agoAuto merge of #75903 - jyn514:lint-refactor, r=GuillaumeGomez
bors [Wed, 26 Aug 2020 16:38:58 +0000 (16:38 +0000)]
Auto merge of #75903 - jyn514:lint-refactor, r=GuillaumeGomez

Warn about unknown or renamed lints in rustdoc

Fixes https://github.com/rust-lang/rust/issues/75884.
This is best reviewed one commit at a time.
r? @GuillaumeGomez

Originally I tried to do a much broader refactoring that got rid of `init_lints` altogether. My reasoning is that now the lints aren't being run anymore (after https://github.com/rust-lang/rust/pull/73566), there's no need to ignore them explicitly. But it seems there are still some lints that aren't affected by setting `lint_mod` to a no-op:

```
deny(pub_use_of_private_extern_crate)
deny(const_err)
warn(unused_imports)
```

(there are possibly more, these are just the ones that failed in the rustdoc test suite).

Some of these seem like we really should be warning about, but that's a much larger change and I don't propose to make it here. So for the time being, this just adds the `unknown_lints` and `renamed_or_removed_lints` passes to the list of lints rustdoc warns about.

3 years agoUse [xxx()] rather than the [xxx] function
Ivan Tham [Wed, 26 Aug 2020 15:21:44 +0000 (23:21 +0800)]
Use [xxx()] rather than the [xxx] function

Co-authored-by: Joshua Nelson <joshua@yottadb.com>
3 years agoError use explicit intra-doc link and fix text
Ivan Tham [Wed, 26 Aug 2020 14:41:56 +0000 (22:41 +0800)]
Error use explicit intra-doc link and fix text

3 years agoFix ICE on unwrap of unknown layout.
jumbatm [Wed, 26 Aug 2020 13:32:57 +0000 (23:32 +1000)]
Fix ICE on unwrap of unknown layout.

3 years agoFix potential UB in align_offset docs
Elichai Turkel [Wed, 26 Aug 2020 14:02:24 +0000 (17:02 +0300)]
Fix potential UB in align_offset docs

3 years agoAuto merge of #75893 - Dylan-DPC:fix/offset-to-u64, r=oli-obk
bors [Wed, 26 Aug 2020 13:10:42 +0000 (13:10 +0000)]
Auto merge of #75893 - Dylan-DPC:fix/offset-to-u64, r=oli-obk

change offset from u32 to u64

References #71696

r? @oli-obk

(closed the earlier pr because the rebase got messed up)

3 years agoClean up E0761 explanation
Guillaume Gomez [Wed, 26 Aug 2020 12:51:02 +0000 (14:51 +0200)]
Clean up E0761 explanation

3 years agoAuto merge of #75687 - TimDiekmann:realloc-align, r=Amanieu
bors [Wed, 26 Aug 2020 10:44:28 +0000 (10:44 +0000)]
Auto merge of #75687 - TimDiekmann:realloc-align, r=Amanieu

Allow reallocation to different alignment in `AllocRef`

The allocator-wg [has decided](https://github.com/rust-lang/wg-allocators/issues/5#issuecomment-672591112) to support reallocating to a different alignment in `AllocRef`. For more details please see the linked issue.

r? @Amanieu

closes https://github.com/rust-lang/wg-allocators/issues/5

3 years agosuggest await on unexpected types
csmoe [Thu, 20 Aug 2020 10:42:08 +0000 (18:42 +0800)]
suggest await on unexpected types

3 years agoapply bootstrap cfgs
Pietro Albini [Wed, 26 Aug 2020 08:17:31 +0000 (10:17 +0200)]
apply bootstrap cfgs

3 years agobump version to 1.48
Pietro Albini [Wed, 26 Aug 2020 08:16:59 +0000 (10:16 +0200)]
bump version to 1.48

3 years agoPoint to a move-related span when pointing to closure upvars
Aaron Hill [Wed, 26 Aug 2020 03:58:58 +0000 (23:58 -0400)]
Point to a move-related span when pointing to closure upvars

Fixes #75904

When emitting move/borrow errors, we may point into a closure to
indicate why an upvar is used in the closure. However, we use the
'upvar span', which is just an arbitrary usage of the upvar. If the
upvar is used in multiple places (e.g. a borrow and a move), we may end
up pointing to the borrow. If the overall error is a move error, this
can be confusing.

This PR tracks the span that caused an upvar to become captured by-value
instead of by-ref (assuming that it's not a `move` closure). We use this
span instead of the 'upvar' span when we need to point to an upvar usage
during borrow checking.

3 years agoAuto merge of #75843 - hermitcore:devel, r=nagisa
bors [Wed, 26 Aug 2020 03:47:07 +0000 (03:47 +0000)]
Auto merge of #75843 - hermitcore:devel, r=nagisa

HermitCore switchs to relocatable binaries

- switch to relocatbale binaries to realize ASLR
- remove all dependencies to gcc

3 years agoUse intra-doc links in `core::macros`
Camelid [Tue, 25 Aug 2020 23:53:33 +0000 (16:53 -0700)]
Use intra-doc links in `core::macros`

Also cleaned up some things and added a few more links.

3 years agoAuto merge of #75811 - ecstatic-morse:better-dlerror, r=nagisa
bors [Wed, 26 Aug 2020 01:40:26 +0000 (01:40 +0000)]
Auto merge of #75811 - ecstatic-morse:better-dlerror, r=nagisa

Refactor dynamic library error checking on *nix

The old code was checking `dlerror` more often than necessary, since (unlike `dlsym`) checking the return value of [`dlopen`](https://www.man7.org/linux/man-pages/man3/dlopen.3.html) is enough to indicate whether an error occurred. In the first commit, I've refactored the code to minimize the number of system calls needed. It should be strictly better than the old version.

The second commit is an optional addendum which fixes the issue observed on illumos in #74469, a PR I reviewed that was ultimately closed due to inactivity. I'm not sure how hard we try to work around platform-specific bugs like this, and I believe that, due to the way that `dlerror` is specified in the POSIX standard, libc implementations that want to run on conforming systems cannot call `dlsym` in multi-threaded programs.

3 years agoAuto merge of #75302 - Aaron1011:feature/partial-move-diag, r=estebank
bors [Tue, 25 Aug 2020 20:54:59 +0000 (20:54 +0000)]
Auto merge of #75302 - Aaron1011:feature/partial-move-diag, r=estebank

Be consistent when describing a move as a 'partial' in diagnostics

When an error occurs due to a partial move, we would use the world
"partial" in some parts of the error message, but not in others. This
commit ensures that we use the word 'partial' in either all or none of
the diagnostic messages.

Additionally, we no longer describe a move out of a `Box` via `*` as
a 'partial move'. This was a pre-existing issue, but became more
noticable when the word 'partial' is used in more places.

3 years agoExplicitly pass `RTLD_LOCAL` to `dlopen`
Dylan MacKenzie [Tue, 25 Aug 2020 19:11:30 +0000 (12:11 -0700)]
Explicitly pass `RTLD_LOCAL` to `dlopen`

This happens to be the default on Linux, but the default is unspecified
in the POSIX standard. Also switches to `cast` to keep line lengths in
check.

3 years agoFor VxWorks:
Pang, Baoshan [Fri, 7 Aug 2020 23:55:15 +0000 (16:55 -0700)]
For VxWorks:
fix building errors
use wr-c++ as linker

3 years agoAlways treat `dlsym` returning NULL as an error
Dylan MacKenzie [Tue, 25 Aug 2020 19:02:21 +0000 (12:02 -0700)]
Always treat `dlsym` returning NULL as an error

This simplifies the code somewhat. Also updates comments to reflect
notes from reviw about thread-safety of `dlerror`.

3 years agoAuto merge of #74275 - wesleywiser:break_up_partitioning_rs, r=pnkfelix
bors [Tue, 25 Aug 2020 18:52:11 +0000 (18:52 +0000)]
Auto merge of #74275 - wesleywiser:break_up_partitioning_rs, r=pnkfelix

Refactor the partitioning module to make it easier to introduce new algorithms

I've split the `librustc_mir::monomorphize::partitioning` module into a few files and introduced a `Partitioner` trait which allows us to decouple the partitioning algorithm from the code which integrates it into the query system. This should allow us to introduce new partitioning algorithms much more easily. I've also gone ahead and added a `-Z` flag to control which algorithm is used (currently there is only the `default`).

I left a few comments in places where things might be improved further.

r? @pnkfelix cc @rust-lang/wg-incr-comp

3 years agoSuggest `mem::forget` if `mem::ManuallyDrop::new` isn't used
Scott McMurray [Tue, 25 Aug 2020 16:40:53 +0000 (09:40 -0700)]
Suggest `mem::forget` if `mem::ManuallyDrop::new` isn't used

I think this communicates the intent better, and is shorter anyway.

3 years agoAuto merge of #75908 - pietroalbini:ci-bump-llvm, r=Mark-Simulacrum
bors [Tue, 25 Aug 2020 15:44:03 +0000 (15:44 +0000)]
Auto merge of #75908 - pietroalbini:ci-bump-llvm, r=Mark-Simulacrum

Bump LLVM on CI to 10.0.0

This PR bumps the LLVM version we use on our macOS and Windows CI to 10.0.0, fixing a breakage we noticed today:

```
2020-08-25T14:24:28.5939568Z FAILED: lib/Support/CMakeFiles/LLVMSupport.dir/AMDGPUMetadata.cpp.obj
2020-08-25T14:24:28.5940317Z D:\a\rust\rust\build\bootstrap\debug\sccache-plus-cl.exe  /nologo -TP -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Ilib\Support -ID:\a\rust\rust\src\llvm-project\llvm\lib\Support -Iinclude -ID:\a\rust\rust\src\llvm-project\llvm\include -nologo -MT -Brepro --target=x86_64-pc-windows-msvc /Zc:inline /Zc:strictStrings /Oi /Zc:rvalueCast /Brepro /W4  -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wno-noexcept-type -Wno-comment /Gw /MT /O2 /Ob2 -UNDEBUG -std:c++14  /EHs-c- /GR- /showIncludes /Folib\Support\CMakeFiles\LLVMSupport.dir\AMDGPUMetadata.cpp.obj /Fdlib\Support\CMakeFiles\LLVMSupport.dir\LLVMSupport.pdb -c D:\a\rust\rust\src\llvm-project\llvm\lib\Support\AMDGPUMetadata.cpp
2020-08-25T14:24:28.5940861Z clang-cl: warning: argument unused during compilation: '-Brepro' [-Wunused-command-line-argument]
2020-08-25T14:24:28.5941076Z clang-cl: warning: argument unused during compilation: '-Brepro' [-Wunused-command-line-argument]
2020-08-25T14:24:28.5941321Z In file included from D:\a\rust\rust\src\llvm-project\llvm\lib\Support\AMDGPUMetadata.cpp:15:
2020-08-25T14:24:28.5941545Z In file included from D:\a\rust\rust\src\llvm-project\llvm\include\llvm/ADT/Twine.h:12:
2020-08-25T14:24:28.5941774Z In file included from D:\a\rust\rust\src\llvm-project\llvm\include\llvm/ADT/SmallVector.h:16:
2020-08-25T14:24:28.5942016Z In file included from D:\a\rust\rust\src\llvm-project\llvm\include\llvm/ADT/iterator_range.h:21:
2020-08-25T14:24:28.5942257Z In file included from C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\include\iterator:9:
2020-08-25T14:24:28.5942542Z C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\include\yvals_core.h(494,2): error: STL1000: Unexpected compiler version, expected Clang 10.0.0 or newer.
```

I uploaded both the new tarballs to our mirrors bucket.

3 years agoci: fix macOS target name for LLVM 10
Pietro Albini [Tue, 25 Aug 2020 15:41:50 +0000 (17:41 +0200)]
ci: fix macOS target name for LLVM 10

3 years agoci: bump LLVM source tarball on Linux to 10.0.0
Pietro Albini [Tue, 25 Aug 2020 15:27:43 +0000 (17:27 +0200)]
ci: bump LLVM source tarball on Linux to 10.0.0

3 years agoci: bump prebuilt LLVM on macOS and Windows to 10.0.0
Pietro Albini [Tue, 25 Aug 2020 15:19:41 +0000 (17:19 +0200)]
ci: bump prebuilt LLVM on macOS and Windows to 10.0.0

3 years agoDon't special case `warnings`
Joshua Nelson [Tue, 25 Aug 2020 14:42:24 +0000 (10:42 -0400)]
Don't special case `warnings`

3 years agoWarn about unknown or renamed lints
Joshua Nelson [Tue, 25 Aug 2020 14:02:16 +0000 (10:02 -0400)]
Warn about unknown or renamed lints

Originally I tried to do a much broader refactoring that got rid of `init_lints` altogether. My reasoning is that now the lints aren't being run anymore (after https://github.com/rust-lang/rust/pull/73566), there's no need to ignore them explicitly. But it seems there are still some lints that aren't affected by setting `lint_mod` to a no-op:

```
deny(pub_use_of_private_extern_crate)
deny(const_err)
warn(unused_imports)
```

(there are possibly more, these are just the ones that failed in the rustdoc test suite).

Some of these seem like we really should be warning about, but that's a much larger change and I don't propose to make it here. So for the time being, this just adds the `unknown_lints` and `renamed_or_removed_lints` passes to the list of lints rustdoc warns about.

3 years agoRename debugging_options -> debugging_opts to match rustc
Joshua Nelson [Tue, 25 Aug 2020 13:22:26 +0000 (09:22 -0400)]
Rename debugging_options -> debugging_opts to match rustc

This way the rustdoc field names are the same as the rustc field names.

3 years agoMinor refactors
Joshua Nelson [Tue, 25 Aug 2020 13:18:57 +0000 (09:18 -0400)]
Minor refactors

3 years agoAuto merge of #75838 - mati865:profiler-atomics, r=Amanieu
bors [Tue, 25 Aug 2020 11:53:07 +0000 (11:53 +0000)]
Auto merge of #75838 - mati865:profiler-atomics, r=Amanieu

Profiler: reenable atomics after #65214

3 years agoVariantDef: move recovered into VariantFlags
Bastian Kauschke [Tue, 25 Aug 2020 09:50:36 +0000 (11:50 +0200)]
VariantDef: move recovered into VariantFlags

3 years agoAuto merge of #75773 - matklad:snapshot-tests, r=Mark-Simulacrum
bors [Tue, 25 Aug 2020 09:36:23 +0000 (09:36 +0000)]
Auto merge of #75773 - matklad:snapshot-tests, r=Mark-Simulacrum

Introduce expect snapshot testing library into rustc

Snapshot testing is a technique for writing maintainable unit tests.
Unlike usual `assert_eq!` tests, snapshot tests allow
to *automatically* upgrade expected values on test failure.
In a sense, snapshot tests are inline-version of our beloved
UI-tests.

Example:

![expect](https://user-images.githubusercontent.com/1711539/90888810-3bcc8180-e3b7-11ea-9626-d06e89e1a0bb.gif)

A particular library we use, `expect_test` provides an `expect!`
macro, which creates a sort of self-updating string literal (by using
`file!` macro). Self-update is triggered by setting `UPDATE_EXPECT`
environmental variable (this info is printed during the test failure).
This library was extracted from rust-analyzer, where we use it for
most of our tests.

There are some other, more popular snapshot testing libraries:

* https://github.com/mitsuhiko/insta
* https://github.com/aaronabramov/k9

The main differences of `expect` are:

* first-class snapshot objects (so, tests can be written as functions,
  rather than as macros)
* focus on inline-snapshots (but file snapshots are also supported)
* restricted feature set (only `assert_eq` and `assert_debug_eq`)
* no extra runtime (ie, no `cargo insta`)

See rust-analyzer/rust-analyzer#5101 for a
an extended comparison.

It is unclear if this testing style will stick with rustc in the long
run. At the moment, rustc is mainly tested via integrated UI tests.
But in the library-ified world, unit-tests will become somewhat more
important (that's why use use `rustc_lexer` library-ified library as
an example in this PR). Given that the cost of removal shouldn't be
too high, it probably makes sense to just see if this flies!

3 years agoAuto merge of #75364 - rylev:libpanic-abort-failfast, r=alexcrichton
bors [Tue, 25 Aug 2020 07:36:52 +0000 (07:36 +0000)]
Auto merge of #75364 - rylev:libpanic-abort-failfast, r=alexcrichton

Call into fastfail on abort in libpanic_abort on Windows x86(_64)

This partially resolves #73215 though this is only for x86 targets. This code is directly lifted from [libstd](https://github.com/rust-lang/rust/blob/13290e83a6e20f3b408d177a9d64d8cf98fe4615/library/std/src/sys/windows/mod.rs#L315). `__fastfail` is the preferred way to abort a process on Windows as it will hook into debugger toolchains.

Other platforms expose a `_rust_abort` symbol which wraps `std::sys::abort_internal`. This would also work on Windows, but is a slightly largely change as we'd need to make sure that the symbol is properly exposed to the linker. I'm inlining the call to the `__fastfail`, but the indirection through `rust_abort` might be a cleaner approach.

 A different instruction must be used on ARM architectures. I'd like to verify this works first before tackling ARM.

3 years agosuggest await before method
csmoe [Thu, 20 Aug 2020 07:34:08 +0000 (15:34 +0800)]
suggest await before method

3 years agosuggest await on field access
csmoe [Sun, 16 Aug 2020 12:25:22 +0000 (20:25 +0800)]
suggest await on field access

3 years agoappend more test cases for issue 61076
csmoe [Sat, 30 May 2020 14:57:12 +0000 (22:57 +0800)]
append more test cases for issue 61076

3 years agoAuto merge of #75132 - scottmcm:stabilize-range-is-empty, r=dtolnay
bors [Tue, 25 Aug 2020 05:24:30 +0000 (05:24 +0000)]
Auto merge of #75132 - scottmcm:stabilize-range-is-empty, r=dtolnay

Stabilize Range[Inclusive]::is_empty

I would like to propose these two simple methods for stabilization:
- Knowing that a range is exhausted isn't otherwise trivial
- Clippy would like to suggest them, but had to do extra work to disable that path <https://github.com/rust-lang/rust-clippy/issues/3807> because they're unstable
- These work on `PartialOrd`, consistently with the stable `contains` method, and are thus more general than iterator-based approaches that need `Step`
- They've been unchanged for some time, and have picked up uses in the compiler
- Stabilizing them doesn't block any future iterator-based `is_empty` plans, as these inherent ones are preferred in name resolution

https://doc.rust-lang.org/nightly/std/ops/struct.Range.html#method.is_empty
https://doc.rust-lang.org/nightly/std/ops/struct.RangeInclusive.html#method.is_empty

Closes #48111

3 years agoAuto merge of #75764 - workingjubilee:tidy-up-cargo-metadata, r=Mark-Simulacrum
bors [Tue, 25 Aug 2020 03:33:10 +0000 (03:33 +0000)]
Auto merge of #75764 - workingjubilee:tidy-up-cargo-metadata, r=Mark-Simulacrum

bump tidy to cargo_metadata 0.11

Updates cargo_metadata in tidy's Cargo.toml from 0.9.1 to 0.11
Real version change 0.9.11 -> 0.11.1
https://github.com/oli-obk/cargo_metadata/compare/v0.9.1...v0.11.1

3 years agotidy
DPC [Tue, 25 Aug 2020 01:21:31 +0000 (03:21 +0200)]
tidy

3 years agoAuto merge of #75666 - davidtwco:tidy-lang-items, r=varkor
bors [Tue, 25 Aug 2020 01:06:16 +0000 (01:06 +0000)]
Auto merge of #75666 - davidtwco:tidy-lang-items, r=varkor

hir: consistent use and naming of lang items

This PR adjusts the naming of various lang items so that they are consistent and don't include prefixes containing the target or "LangItem". In addition, lang item variants are no longer exported from the `lang_items` module.

This is certainly subjective and while I think this is an improvement, if many in the team don't then we can just close this.

3 years agocleanup
DPC [Tue, 25 Aug 2020 01:00:27 +0000 (03:00 +0200)]
cleanup

3 years agoUnbreak the clippy test
Scott McMurray [Mon, 24 Aug 2020 21:28:01 +0000 (14:28 -0700)]
Unbreak the clippy test