]> git.lizzy.rs Git - rust.git/log
rust.git
3 years agoRollup merge of #84740 - r00ster91:patch-6, r=GuillaumeGomez
Yuki Okushi [Sat, 1 May 2021 09:32:35 +0000 (18:32 +0900)]
Rollup merge of #84740 - r00ster91:patch-6, r=GuillaumeGomez

Reset the docs' copy path button after 1 second

I like that this copy path button on the top next to the type/module's name changes to a check mark when you successfully clicked and copied the path but I find it really weird how the icon stays that check mark forever after the first time of clicking it. Imagine you leave that documentation tab open and come back after 2 hours and you still see that check mark in that box because you copied the path 2 hours ago. You will probably be confused and you might've forgotten what that button even does (even more so currently where this is a new feature, or when you simply don't use it often), so I really think at some point it should go back to the ⎘ icon which, at least to me, pretty clearly indicates copying, whereas the check mark (if it stays there for so long) could falsely look like a verification mark indicating "this module is verified" or something like that.
I believe after a longer period of time it's not logical to still tell the user "yes you've copied this successful".

In addition to this timeout, maybe it could be made so that you can't copy again until this cooldown of 1 second is over, but I'm not sure how useful or user-friendly that feature would be so maybe it's fine the way it is now.
Also the timeout is cleared every time you click again so if you constantly click it, it won't reset during that.

3 years agoRollup merge of #84724 - MaskRay:sys-fs, r=petrochenkov
Yuki Okushi [Sat, 1 May 2021 09:32:34 +0000 (18:32 +0900)]
Rollup merge of #84724 - MaskRay:sys-fs, r=petrochenkov

Replace llvm::sys::fs::F_None with llvm::sys::fs::OF_None

The former is deprecated.
OF_None has been available in LLVM since 2018-06.

-----

OF_None (https://reviews.llvm.org/rG1f67a3cba9b09636c56e2109d8a35ae96dc15782) exists in LLVM 9.
https://reviews.llvm.org/D101506 may drop `F_None` support.

3 years agoRollup merge of #84704 - joshtriplett:platform-support-target-tier-policy, r=pietroalbini
Yuki Okushi [Sat, 1 May 2021 09:32:33 +0000 (18:32 +0900)]
Rollup merge of #84704 - joshtriplett:platform-support-target-tier-policy, r=pietroalbini

platform-support.md: Update for consistency with Target Tier Policy

Split into five sections to match the tiers: "Tier 1 with Host Tools",
"Tier 1", "Tier 2 with Host Tools", "Tier 2", and "Tier 3". Explain each
tier briefly in prose, and link to the corresponding section of the
policy for full requirements.

Drop the `host` columns from the first four, since the different
sections distinguish that. (Keep the `host` column for "Tier 3", since
it's a single list and the `host` column just indicates if host tools
are expected to work.)

Targets with host tools always have full support for std, so drop the
`std` column from those.

Move the explanations of the `std` column next to the appropriate
tables, and drop the unknown/WIP case for tier 2 targets.

Use "target" terminology consistently throughout.

Sort each table by target name.

3 years agoRollup merge of #84601 - tdelabro:rustdoc-get-rid-of-cache-extern_locations, r=jyn514
Yuki Okushi [Sat, 1 May 2021 09:32:31 +0000 (18:32 +0900)]
Rollup merge of #84601 - tdelabro:rustdoc-get-rid-of-cache-extern_locations, r=jyn514

rustdoc: Only store locations in Cache::extern_locations and calculate the other info on-demand

 help #84588

3 years agoAuto merge of #84463 - jyn514:refactor-impl, r=CraftSpider
bors [Sat, 1 May 2021 02:53:55 +0000 (02:53 +0000)]
Auto merge of #84463 - jyn514:refactor-impl, r=CraftSpider

rustdoc: Remove unnecessary `provided_trait_methods` field from Impl

It can be calculated on-demand.

Helps with https://github.com/rust-lang/rust/issues/76382.

3 years agoRemove unnecessary `provided_trait_methods` field from Impl
Joshua Nelson [Fri, 23 Apr 2021 01:02:21 +0000 (21:02 -0400)]
Remove unnecessary `provided_trait_methods` field from Impl

It can be calculated on-demand.

3 years agoAuto merge of #84747 - pietroalbini:bump-version, r=pietroalbini
bors [Sat, 1 May 2021 00:31:56 +0000 (00:31 +0000)]
Auto merge of #84747 - pietroalbini:bump-version, r=pietroalbini

Bump version to 1.54.0

cc `@Mark-Simulacrum`
r? `@ghost`

3 years agoAuto merge of #84719 - Mark-Simulacrum:reduce-query-impl, r=davidtwco
bors [Fri, 30 Apr 2021 22:21:07 +0000 (22:21 +0000)]
Auto merge of #84719 - Mark-Simulacrum:reduce-query-impl, r=davidtwco

Move iter_results to dyn FnMut rather than a generic

This means that we're no longer generating the iteration/locking code for each invocation site of iter_results, rather just once per query (roughly), which seems much better: this is a 15% win in instruction counts when compiling the rustc_query_impl crate. The code where this is used also is pretty cold, I suspect; the old solution didn't fully monomorphize either.

3 years agoAuto merge of #84753 - hyd-dev:update-miri, r=RalfJung
bors [Fri, 30 Apr 2021 19:55:47 +0000 (19:55 +0000)]
Auto merge of #84753 - hyd-dev:update-miri, r=RalfJung

Update Miri

To include rust-lang/miri#1783, hence fixes #84741.

r? `@RalfJung`

3 years agoAuto merge of #84654 - alexcrichton:update-llvm-, r=cuviper
bors [Fri, 30 Apr 2021 14:39:27 +0000 (14:39 +0000)]
Auto merge of #84654 - alexcrichton:update-llvm-, r=cuviper

Update LLVM for more wasm simd updates

This fixes the temporary regression introduced in #84339 where the wasm
target uses `fpto{s,u}i` intrinsics but the codegen for those intrinsics
with the `+nontrapping-fptoint` LLVM feature wasn't very good (aka it
didn't use the wasm instruction). The fixes brought in here fix that and
also implement the second-to-last simd instruction in LLVM.

3 years agoUpdate LLVM submodule
Amanieu d'Antras [Thu, 29 Apr 2021 00:16:53 +0000 (01:16 +0100)]
Update LLVM submodule

Fixes #84025

3 years agoUpdate LLVM for more wasm simd updates
Alex Crichton [Wed, 28 Apr 2021 14:19:49 +0000 (07:19 -0700)]
Update LLVM for more wasm simd updates

This fixes the temporary regression introduced in #84339 where the wasm
target uses `fpto{s,u}i` intrinsics but the codegen for those intrinsics
with the `+nontrapping-fptoint` LLVM feature wasn't very good (aka it
didn't use the wasm instruction). The fixes brought in here fix that and
also implement the second-to-last simd instruction in LLVM.

3 years agoUpdate Miri
hyd-dev [Fri, 30 Apr 2021 14:22:35 +0000 (22:22 +0800)]
Update Miri

3 years agobump version to 1.54.0
Pietro Albini [Fri, 30 Apr 2021 13:24:00 +0000 (15:24 +0200)]
bump version to 1.54.0

3 years agoAuto merge of #84716 - joshtriplett:chroot, r=dtolnay
bors [Fri, 30 Apr 2021 12:19:37 +0000 (12:19 +0000)]
Auto merge of #84716 - joshtriplett:chroot, r=dtolnay

Add std::os::unix::fs::chroot to change the root directory of the current process

This is a straightforward wrapper that uses the existing helpers for C
string handling and errno handling.

Having this available is convenient for UNIX utility programs written in
Rust, and avoids having to call the unsafe `libc::chroot` directly and
handle errors manually, in a program that may otherwise be entirely safe
code.

3 years ago`copy_path` -> `window.copy_path` + add semicolon
r00ster [Fri, 30 Apr 2021 10:06:15 +0000 (12:06 +0200)]
`copy_path` -> `window.copy_path` + add semicolon

3 years agoAuto merge of #84522 - CDirkx:cmath, r=yaahc
bors [Fri, 30 Apr 2021 09:52:32 +0000 (09:52 +0000)]
Auto merge of #84522 - CDirkx:cmath, r=yaahc

Reuse `sys::unix::cmath` on other platforms

Reuse `sys::unix::cmath` on all non-`windows` platforms.

`unix` is chosen as the canonical location instead of `unsupported` or `common` because `unsupported` doesn't make sense semantically and `common` is reserved for code that is supported on all platforms. Also `unix` is already the home of some non-`windows` code that is technically not exclusive to `unix` like `unix::path`.

3 years agoApply suggestions
r00ster [Fri, 30 Apr 2021 09:42:07 +0000 (11:42 +0200)]
Apply suggestions

3 years agoReset the docs' copy path button after 1 second
r00ster [Fri, 30 Apr 2021 08:18:14 +0000 (10:18 +0200)]
Reset the docs' copy path button after 1 second

3 years agoAdd std::os::unix::fs::chroot to change the root directory of the current process
Josh Triplett [Thu, 29 Apr 2021 20:47:28 +0000 (13:47 -0700)]
Add std::os::unix::fs::chroot to change the root directory of the current process

This is a straightforward wrapper that uses the existing helpers for C
string handling and errno handling.

Having this available is convenient for UNIX utility programs written in
Rust, and avoids having to call the unsafe `libc::chroot` directly and
handle errors manually, in a program that may otherwise be entirely safe
code.

3 years agoAuto merge of #84401 - crlf0710:impl_main_by_path, r=petrochenkov
bors [Fri, 30 Apr 2021 06:59:37 +0000 (06:59 +0000)]
Auto merge of #84401 - crlf0710:impl_main_by_path, r=petrochenkov

Implement RFC 1260 with feature_name `imported_main`.

This is the second extraction part of #84062 plus additional adjustments.
This (mostly) implements RFC 1260.

However there's still one test case failure in the extern crate case. Maybe `LocalDefId` doesn't work here? I'm not sure.

cc https://github.com/rust-lang/rust/issues/28937
r? `@petrochenkov`

3 years agoAuto merge of #84729 - jackh726:rollup-dnm8kg5, r=jackh726
bors [Thu, 29 Apr 2021 23:28:28 +0000 (23:28 +0000)]
Auto merge of #84729 - jackh726:rollup-dnm8kg5, r=jackh726

Rollup of 10 pull requests

Successful merges:

 - #84451 (Use flex more consistently)
 - #84590 (Point out that behavior might be switched on 2015 and 2018 too one day)
 - #84682 (Don't rebind in `transitive_bounds_that_define_assoc_type`)
 - #84683 (Minor grammar tweaks for readability to btree internals)
 - #84688 (Remove unnecessary CSS rules for search results)
 - #84690 (Remove unneeded bottom margin on search results)
 - #84692 (Link between std::env::{var, var_os} and std::env::{vars, vars_os})
 - #84705 (make feature recommendations optional)
 - #84706 (Drop alias `reduce` for `fold` - we have a `reduce` function)
 - #84713 (Fix labels for regression issue template)

Failed merges:

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

3 years agoRollup merge of #84713 - camelid:fix-regression-issue-template, r=Mark-Simulacrum
Jack Huey [Thu, 29 Apr 2021 23:27:27 +0000 (19:27 -0400)]
Rollup merge of #84713 - camelid:fix-regression-issue-template, r=Mark-Simulacrum

Fix labels for regression issue template

Each label needs to be separated by a comma (see the ICE issue template
for an example of correct usage).

As a result of this problem, the `regression-untriaged` label has not
been automatically added to issues opened with this template.

See c127530be76bd8aebc7b61f3b4a54f1be577f74c for another example of this.

r? `````@Mark-Simulacrum`````

3 years agoRollup merge of #84706 - joshtriplett:reduce-aliases, r=m-ou-se
Jack Huey [Thu, 29 Apr 2021 23:27:27 +0000 (19:27 -0400)]
Rollup merge of #84706 - joshtriplett:reduce-aliases, r=m-ou-se

Drop alias `reduce` for `fold` - we have a `reduce` function

Searching for "reduce" currently puts the `reduce` alias for `fold`
above the actual `reduce` function. The `reduce` function already has a
cross-reference for `fold`, and vice versa.

3 years agoRollup merge of #84705 - lcnr:const_generics-rec, r=joshtriplett
Jack Huey [Thu, 29 Apr 2021 23:27:26 +0000 (19:27 -0400)]
Rollup merge of #84705 - lcnr:const_generics-rec, r=joshtriplett

make feature recommendations optional

this is what we're already doing for other feature gates, so it's better to be consistent

3 years agoRollup merge of #84692 - r00ster91:var-var_os-vars, r=joshtriplett
Jack Huey [Thu, 29 Apr 2021 23:27:25 +0000 (19:27 -0400)]
Rollup merge of #84692 - r00ster91:var-var_os-vars, r=joshtriplett

Link between std::env::{var, var_os} and std::env::{vars, vars_os}

In #84551 I linked between `std::env::{args, args_os}` and this PR does the same but for `std::env::{var, var_os}` and `std::env::{vars, vars_os}`. Now all of `std::env::{var, var_os, vars, vars_os, args, args_os}` should each mention their `_os` or non-`_os` equivalent in the docs so that you can easily navigate between them.

3 years agoRollup merge of #84690 - GuillaumeGomez:unneeded-bottom-margin-search-results, r...
Jack Huey [Thu, 29 Apr 2021 23:27:24 +0000 (19:27 -0400)]
Rollup merge of #84690 - GuillaumeGomez:unneeded-bottom-margin-search-results, r=Nemo157

Remove unneeded bottom margin on search results

As you can see, there is still more than enough space at the bottom:

![Screenshot from 2021-04-29 11-26-57](https://user-images.githubusercontent.com/3050060/116530090-ea797800-a8dd-11eb-8eef-2288cf68e0d2.png)

r? ``````@Nemo157``````

3 years agoRollup merge of #84688 - GuillaumeGomez:remove-unnecessary-css-for-search-results...
Jack Huey [Thu, 29 Apr 2021 23:27:24 +0000 (19:27 -0400)]
Rollup merge of #84688 - GuillaumeGomez:remove-unnecessary-css-for-search-results, r=Nemo157

Remove unnecessary CSS rules for search results

Discovered that this was useless when working on https://github.com/rust-lang/docs.rs/issues/1382.

r? ````````@Nemo157````````

3 years agoRollup merge of #84683 - Ben-Lichtman:grammar, r=jonas-schievink
Jack Huey [Thu, 29 Apr 2021 23:27:23 +0000 (19:27 -0400)]
Rollup merge of #84683 - Ben-Lichtman:grammar, r=jonas-schievink

Minor grammar tweaks for readability to btree internals

I was reading through the btree implementation and I noticed some grammar that could be improved in Node.rs so here is what I think would be a minor improvement.

3 years agoRollup merge of #84682 - jackh726:transitive_bounds_rebind, r=nikomatsakis
Jack Huey [Thu, 29 Apr 2021 23:27:22 +0000 (19:27 -0400)]
Rollup merge of #84682 - jackh726:transitive_bounds_rebind, r=nikomatsakis

Don't rebind in `transitive_bounds_that_define_assoc_type`

Fixes #83737
Fixes #84604

Also fixes another issue that I don't have a test for, popped up in [zulip](https://rust-lang.zulipchat.com/#narrow/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604/near/236570445)

r? `````@nikomatsakis`````

3 years agoRollup merge of #84590 - est31:array_into_iter, r=nikomatsakis
Jack Huey [Thu, 29 Apr 2021 23:27:21 +0000 (19:27 -0400)]
Rollup merge of #84590 - est31:array_into_iter, r=nikomatsakis

Point out that behavior might be switched on 2015 and 2018 too one day

Reword documentation to make it clear that behaviour can be switched on older editions too, one day in the future. It doesn't *have* to be switched, but I think it's good to have it as an option and re-evaluate it a few months/years down the line when e.g. the crates that showed up in crater were broken by different changes in the language already.

cc #25725, #65819, #66145, #84147 , and https://github.com/rust-lang/rust/issues/84133#issuecomment-818005314

3 years agoRollup merge of #84451 - torhovland:flex, r=jsha
Jack Huey [Thu, 29 Apr 2021 23:27:20 +0000 (19:27 -0400)]
Rollup merge of #84451 - torhovland:flex, r=jsha

Use flex more consistently

Builds on #84376, related to #84354.

- Fully replaces `float: right` with `flex` on `.content .out-of-band`.
- Uses `flex` more consistently with existing usage (on `h3`, `h4`, etc.).

Tested on various widths to make sure the pages behave as before.

3 years agoReplace llvm::sys::fs::F_None with llvm::sys::fs::OF_None
Fangrui Song [Thu, 29 Apr 2021 22:25:17 +0000 (15:25 -0700)]
Replace llvm::sys::fs::F_None with llvm::sys::fs::OF_None

The former is deprecated.
OF_None has been available in LLVM since 2018-06.

3 years agoMove iter_results to dyn FnMut rather than a generic
Mark Rousskov [Thu, 29 Apr 2021 14:23:17 +0000 (10:23 -0400)]
Move iter_results to dyn FnMut rather than a generic

This means that we're no longer generating the iteration/locking code for each
invocation site of iter_results, rather just once per query.

This is a 15% win in instruction counts when compiling the rustc_query_impl crate.

3 years agoFix labels for regression issue template
Camelid [Thu, 29 Apr 2021 20:13:28 +0000 (13:13 -0700)]
Fix labels for regression issue template

Each label needs to be separated by a comma (see the ICE issue template
for an example of correct usage).

As a result of this problem, the `regression-untriaged` label has not
been automatically added to issues opened with this template.

See c127530be76bd8aebc7b61f3b4a54f1be577f74c for another example of this.

3 years agoAuto merge of #84708 - pnkfelix:revert-77885-everywhere, r=Mark-Simulacrum
bors [Thu, 29 Apr 2021 20:06:07 +0000 (20:06 +0000)]
Auto merge of #84708 - pnkfelix:revert-77885-everywhere, r=Mark-Simulacrum

Revert PR 77885 everywhere

Change to probe-stack=call (instead of inline-or-call) everywhere again, for now.

We had already reverted the change on stable back in PR #83412.

Since then, we've had some movement on issue #83139, but not a 100% fix.

But also since then, we had bug reported, issue #84667, that looks like outright codegen breakage, rather than problems confined to debuginfo issues.    So we are reverting PR #77885 on stable and beta. We'll reland PR #77885 (or some    variant) switching back to an LLVM-dependent selection of out-of-line call vs    inline-asm, after these other issues have been resolved.

3 years agoRemove tests introduced or cahnged by PR #77885, which is reverted in this PR.
Felix S. Klock II [Thu, 29 Apr 2021 19:12:46 +0000 (15:12 -0400)]
Remove tests introduced or cahnged by PR #77885, which is reverted in this PR.

3 years agoChange to probe-stack=call (instead of inline-or-call) everywhere again, for now.
Felix S. Klock II [Thu, 29 Apr 2021 19:11:46 +0000 (15:11 -0400)]
Change to probe-stack=call (instead of inline-or-call) everywhere again, for now.

We had already reverted the change on stable back in PR #83412.

Since then, we've had some movement on issue #83139, but not a 100% fix.

But also since then, we had bug reported, issue #84667, that looks like outright
codegen breakage, rather than problems confined to debuginfo issues.

So we are reverting PR #77885 on stable and beta. We'll reland PR #77885 (or some
variant) switching back to an LLVM-dependent selection of out-of-line call vs
inline-asm, after these other issues have been resolved.

3 years agoDrop alias `reduce` for `fold` - we have a `reduce` function
Josh Triplett [Thu, 29 Apr 2021 19:05:08 +0000 (12:05 -0700)]
Drop alias `reduce` for `fold` - we have a `reduce` function

Searching for "reduce" currently puts the `reduce` alias for `fold`
above the actual `reduce` function. The `reduce` function already has a
cross-reference for `fold`, and vice versa.

3 years agomake feature recommendations optional
lcnr [Thu, 29 Apr 2021 18:06:11 +0000 (20:06 +0200)]
make feature recommendations optional

3 years agoplatform-support.md: Update for consistency with Target Tier Policy
Josh Triplett [Thu, 29 Apr 2021 17:57:10 +0000 (10:57 -0700)]
platform-support.md: Update for consistency with Target Tier Policy

Split into five sections to match the tiers: "Tier 1 with Host Tools",
"Tier 1", "Tier 2 with Host Tools", "Tier 2", and "Tier 3". Explain each
tier briefly in prose, and link to the corresponding section of the
policy for full requirements.

Drop the `host` columns from the first four, since the different
sections distinguish that. (Keep the `host` column for "Tier 3", since
it's a single list and the `host` column just indicates if host tools
are expected to work.)

Targets with host tools always have full support for std, so drop the
`std` column from those.

Move the explanations of the `std` column next to the appropriate
tables, and drop the unknown/WIP case for tier 2 targets.

Use "target" terminology consistently throughout.

Sort each table by target name.

3 years agoonly store locations in extern_locations
Timothée Delabrouille [Thu, 29 Apr 2021 17:14:29 +0000 (19:14 +0200)]
only store locations in extern_locations

3 years agoAuto merge of #84556 - RalfJung:const-fn-trait-bound, r=oli-obk
bors [Thu, 29 Apr 2021 17:38:37 +0000 (17:38 +0000)]
Auto merge of #84556 - RalfJung:const-fn-trait-bound, r=oli-obk

use correct feature flag for impl-block-level trait bounds on const fn

I am not sure what that special hack was needed for, but it doesn't seem needed any more...

This removes the last use of the `const_fn` feature flag -- Cc https://github.com/rust-lang/rust/issues/84510
r? `@oli-obk`

3 years agoAuto merge of #84233 - jyn514:track-path-prefix, r=michaelwoerister
bors [Thu, 29 Apr 2021 14:57:17 +0000 (14:57 +0000)]
Auto merge of #84233 - jyn514:track-path-prefix, r=michaelwoerister

Add TRACKED_NO_CRATE_HASH and use it for `--remap-path-prefix`

I verified locally that this fixes https://github.com/rust-lang/rust/issues/66955.

r? `@Aaron1011` (feel free to reassign)

3 years agoAdd integration test for `--remap-pathh-prefix`
Joshua Nelson [Wed, 28 Apr 2021 21:47:26 +0000 (21:47 +0000)]
Add integration test for `--remap-pathh-prefix`

3 years agoUse doc-comment instad of comments consistently
Joshua Nelson [Tue, 27 Apr 2021 16:44:14 +0000 (16:44 +0000)]
Use doc-comment instad of comments consistently

This makes the comments show up in the generated docs.

- Fix markdown formatting

3 years agoAuto merge of #84189 - jyn514:clippy-dev, r=Mark-Simulacrum
bors [Thu, 29 Apr 2021 12:03:43 +0000 (12:03 +0000)]
Auto merge of #84189 - jyn514:clippy-dev, r=Mark-Simulacrum

Implement `x.py test src/tools/clippy --bless`

- Add clippy_dev to the rust workspace

  Before, it would give an error that it wasn't either included or
  excluded from the workspace:

  ```
  error: current package believes it's in a workspace when it's not:
  current:   /home/joshua/rustc/src/tools/clippy/clippy_dev/Cargo.toml
  workspace: /home/joshua/rustc/Cargo.toml

  this may be fixable by adding `src/tools/clippy/clippy_dev` to the `workspace.members` array of the manifest located at: /home/joshua/rustc/Cargo.toml
  Alternatively, to keep it out of the workspace, add the package to the `workspace.exclude` array, or add an empty `[workspace]` table to the package's manifest.
  ```

- Change clippy's copy of compiletest not to special-case
  rust-lang/rust. Using OUT_DIR confused `clippy_dev` and it couldn't find
  the test outputs. This is one of the reasons why `cargo dev bless` used
  to silently do nothing (the others were that `CARGO_TARGET_DIR` and
  `PROFILE` weren't set appropriately).

- Run clippy_dev on test failure

I tested this by removing a couple lines from a stderr file, and they
were correctly replaced.

- Fix clippy_dev warnings

3 years agoLink between std::env::{var, var_os} and std::env::{vars, vars_os}
r00ster91 [Thu, 29 Apr 2021 11:15:49 +0000 (13:15 +0200)]
Link between std::env::{var, var_os} and std::env::{vars, vars_os}

3 years agoIgnore doctests in bootstrap
est31 [Thu, 29 Apr 2021 10:39:23 +0000 (12:39 +0200)]
Ignore doctests in bootstrap

On bootstrap the IntoIterator trait is not implemented
yet for arrays.

3 years agore-bless on 32bit
Ralf Jung [Thu, 29 Apr 2021 10:15:30 +0000 (12:15 +0200)]
re-bless on 32bit

3 years agoRemove unneeded bottom margin on search results
Guillaume Gomez [Thu, 29 Apr 2021 09:26:35 +0000 (11:26 +0200)]
Remove unneeded bottom margin on search results

3 years agoRemove unnecessary CSS rules for search results
Guillaume Gomez [Thu, 29 Apr 2021 08:40:10 +0000 (10:40 +0200)]
Remove unnecessary CSS rules for search results

3 years agoAuto merge of #84618 - lrh2000:fix-gdb-10-str, r=Mark-Simulacrum
bors [Thu, 29 Apr 2021 08:22:44 +0000 (08:22 +0000)]
Auto merge of #84618 - lrh2000:fix-gdb-10-str, r=Mark-Simulacrum

Fix failed tests related to pointer printing when using GDB 10

As mentioned in #79009, there are four failed debuginfo test cases when using GDB 10. This PR fixes two of them, which fail because GDB 10 won't print pointers as string anymore. We can use `printf` as a workaround. It should work regardless of the version of GDB.

Refer this [comment] for more details.

[comment]: https://github.com/rust-lang/rust/issues/79009#issuecomment-826952708

3 years agoremove const_fn feature gate from const tests
Ralf Jung [Mon, 26 Apr 2021 12:53:41 +0000 (14:53 +0200)]
remove const_fn feature gate from const tests

3 years agodon't let const_fn feature flag affect impl-block-level trait bounds
Ralf Jung [Sun, 25 Apr 2021 16:42:53 +0000 (18:42 +0200)]
don't let const_fn feature flag affect impl-block-level trait bounds

3 years agoAuto merge of #84684 - jackh726:rollup-qxc5cos, r=jackh726
bors [Thu, 29 Apr 2021 05:24:45 +0000 (05:24 +0000)]
Auto merge of #84684 - jackh726:rollup-qxc5cos, r=jackh726

Rollup of 11 pull requests

Successful merges:

 - #84484 (Don't rebuild rustdoc and clippy after checking bootstrap)
 - #84530 (`test tidy` should ignore alternative `build` dir patterns)
 - #84531 (Ignore commented out lines when finding features)
 - #84540 (Build sanitizers for x86_64-unknown-linux-musl)
 - #84555 (Set `backtrace-on-ice` by default for compiler and codegen profiles)
 - #84585 (Add `x.py check src/librustdoc` as an alias for `x.py check src/tools/rustdoc`)
 - #84636 (rustdoc: change aliases attribute to data-aliases)
 - #84646 (Add some regression tests related to #82494)
 - #84661 (Remove extra word in `rustc_mir` docs)
 - #84663 (Remove `DropGuard` in `sys::windows::process` and use `StaticMutex` instead)
 - #84668 (Update books)

Failed merges:

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

3 years agoRollup merge of #84668 - ehuss:update-books, r=ehuss
Jack Huey [Thu, 29 Apr 2021 02:59:32 +0000 (22:59 -0400)]
Rollup merge of #84668 - ehuss:update-books, r=ehuss

Update books

## reference

5 commits in e1abb17cd94cd5a8a374b48e1bc8134a2208ed48..d23f9da8469617e6c81121d9fd123443df70595d
2021-04-07 08:09:48 -0700 to 2021-04-28 11:16:44 -0700
- Document or-patterns (rust-lang-nursery/reference#957)
- fixed a typo in traits.md (rust-lang-nursery/reference#1009)
- Improve clarity and style consistency of crate type list (rust-lang-nursery/reference#1005)
- added macro_rules to weak keywords (rust-lang-nursery/reference#1008)
- Move non-ascii-idents content from unstable book to reference. (rust-lang-nursery/reference#999)

## book

1 commits in b54090a99ec7c4b46a5203a9c927fdbc311bb1f5..50dd06cb71beb27fdc0eebade5509cdcc1f821ed
2021-03-24 11:21:46 -0500 to 2021-04-23 13:21:54 -0500
- Update link in COPYRIGHT (http to https) (rust-lang/book#2704)

## rust-by-example

3 commits in c80f0b09fc15b9251825343be910c08531938ab2..e0a721f5202e6d9bec0aff99f10e44480c0da9e7
2021-04-08 10:28:17 -0300 to 2021-04-27 09:32:15 -0300
- broken long comments in src/types/cast.md to several shortones (rust-lang/rust-by-example#1430)
- Fix link of formatting traits (rust-lang/rust-by-example#1410)
- chore: Fix the indention of Borrowed definition (rust-lang/rust-by-example#1436)

## rustc-dev-guide

8 commits in a9bd2bbf31e4f92b5d3d8e80b22839d0cc7a2022..e72b43a64925ce053dc7830e21c1a57ba00499bd
2021-04-09 18:12:21 -0400 to 2021-04-27 12:35:37 -0700
- Suggest using `git range-diff` (rust-lang/rustc-dev-guide#1092)
- Remove the possible unnecessary flag
- Replace some Travis-related things completely
- Trigger GHA only on the original repo
- Add sample nix shell
- more RA config suggestions (rust-lang/rustc-dev-guide#1114)
- Add Polymorphisation paper (rust-lang/rustc-dev-guide#1093)
- Mention unpretty=mir-cfg for debugging MIR

3 years agoRollup merge of #84663 - CDirkx:dropguard, r=Mark-Simulacrum
Jack Huey [Thu, 29 Apr 2021 02:59:31 +0000 (22:59 -0400)]
Rollup merge of #84663 - CDirkx:dropguard, r=Mark-Simulacrum

Remove `DropGuard` in `sys::windows::process` and use `StaticMutex` instead

`StaticMutex` is a mutex that when locked provides a guard that unlocks the mutex again when dropped, thus provides the exact same functionality as `DropGuard`. `StaticMutex` is used in more places, and is thus preferred over an ad-hoc construct like `DropGuard`.

````@rustbot```` label: +T-libs-impl

3 years agoRollup merge of #84661 - pierwill:patch-1, r=jackh726
Jack Huey [Thu, 29 Apr 2021 02:59:30 +0000 (22:59 -0400)]
Rollup merge of #84661 - pierwill:patch-1, r=jackh726

Remove extra word in `rustc_mir` docs

Changes "is includes" to "includes" in `rustc_mir::borrow_check::type_check::type_check`.

3 years agoRollup merge of #84646 - JohnTitor:add-some-bad-placeholder-tests, r=Dylan-DPC
Jack Huey [Thu, 29 Apr 2021 02:59:29 +0000 (22:59 -0400)]
Rollup merge of #84646 - JohnTitor:add-some-bad-placeholder-tests, r=Dylan-DPC

Add some regression tests related to #82494

Closes #75883, closes #80779
r? ````@estebank````

3 years agoRollup merge of #84636 - notriddle:data-aliases, r=jyn514,GuillaumeGomez
Jack Huey [Thu, 29 Apr 2021 02:59:28 +0000 (22:59 -0400)]
Rollup merge of #84636 - notriddle:data-aliases, r=jyn514,GuillaumeGomez

rustdoc: change aliases attribute to data-aliases

The "aliases" attribute is not listed [on MDN], so it sounds like it's rustdoc-specific. We don't want to conflict with any attributes that are added to the spec in the future.

[on MDN]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements

3 years agoRollup merge of #84585 - jyn514:check-rustdoc, r=Mark-Simulacrum
Jack Huey [Thu, 29 Apr 2021 02:59:27 +0000 (22:59 -0400)]
Rollup merge of #84585 - jyn514:check-rustdoc, r=Mark-Simulacrum

Add `x.py check src/librustdoc` as an alias for `x.py check src/tools/rustdoc`

I keep making this typo, it would be nice for it to be supported.

3 years agoRollup merge of #84555 - jyn514:ice-backtrace, r=Mark-Simulacrum
Jack Huey [Thu, 29 Apr 2021 02:59:26 +0000 (22:59 -0400)]
Rollup merge of #84555 - jyn514:ice-backtrace, r=Mark-Simulacrum

Set `backtrace-on-ice` by default for compiler and codegen profiles

If there's an ICE while bootstrapping, it's most likely because of a change to the compiler.

3 years agoRollup merge of #84540 - 12101111:enable-sanitizers, r=Mark-Simulacrum
Jack Huey [Thu, 29 Apr 2021 02:59:25 +0000 (22:59 -0400)]
Rollup merge of #84540 - 12101111:enable-sanitizers, r=Mark-Simulacrum

Build sanitizers for x86_64-unknown-linux-musl

The support of sanitizers on target `x86_64-unknown-linux-musl` is landed in https://github.com/rust-lang/rust/pull/84126

3 years agoRollup merge of #84531 - Smittyvb:foo-not-feature, r=Mark-Simulacrum
Jack Huey [Thu, 29 Apr 2021 02:59:24 +0000 (22:59 -0400)]
Rollup merge of #84531 - Smittyvb:foo-not-feature, r=Mark-Simulacrum

Ignore commented out lines when finding features

This fixes #76246, where commented out lines were being detected as features by `tidy`, by ignoring those lines when looking for features. It's still not perfect, since it can be fooled by things like:
```rust
/*
#[unstable(feature = "foo", issue = "1234")]
*/
```
But luckily that never happens in `rustc`, so `foo` now ceases to appear in the unstable book.

3 years agoRollup merge of #84530 - richkadel:test-tidy-build-dirs, r=Mark-Simulacrum
Jack Huey [Thu, 29 Apr 2021 02:59:23 +0000 (22:59 -0400)]
Rollup merge of #84530 - richkadel:test-tidy-build-dirs, r=Mark-Simulacrum

`test tidy` should ignore alternative `build` dir patterns

I need to have multiple `build` directories, such as `build`,
`build-fuchsia`, and `build-test`. But when I'm uploading a change, I
run `./x.py test tidy`, and if I have a `build-something` directory with
Rust sources, I git a bunch of formatting errors.

`rustfmt.toml` only ignores the directory named `build`.

This change extends the patterns to also ignore `build-*` and `*-build`.

As a rustc contributor, I not only build the rust compiler to develop
new features, but I also build alternative "distributions" (using
secondary `*-config.toml` files with different configurations),
including:

* To occasionally rebuild a version of the compiler that `rust-analyzer`
can use to `check` source (which fixes issues in the VS Code UI, so
changing and rebuilding the compiler does not break VS Code editing Rust
code).
* To build custom distributions for Fuchsia
* To build test distributions when working on changes to `bootstrap`
(e.g., when I recently added `rust-demangler` to distributions)

3 years agoRollup merge of #84484 - jyn514:check-tools, r=Mark-Simulacrum
Jack Huey [Thu, 29 Apr 2021 02:59:22 +0000 (22:59 -0400)]
Rollup merge of #84484 - jyn514:check-tools, r=Mark-Simulacrum

Don't rebuild rustdoc and clippy after checking bootstrap

This works by unconditionally passing -Z unstable-options to the
compiler. This has no affect in practice since bootstrap doesn't use
`deny(rustc::internal)`.

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

r? ```@Mark-Simulacrum```

3 years agoAuto merge of #84614 - RalfJung:daily, r=Mark-Simulacrum
bors [Thu, 29 Apr 2021 02:53:52 +0000 (02:53 +0000)]
Auto merge of #84614 - RalfJung:daily, r=Mark-Simulacrum

don't enable parking_lot nightly features

Having the compiler itself depend on external libraries that use nightly features can lead to "fun" bootstrap situations. Within the rustc repo we use `cfg(bootstrap)` to resolve those, but that is not a reasonable option for external dependencies.

So I propose we stop enabling the "nightly" feature of `parking_lot` here. In my experiments, this then indeed leads to the feature not being enabled (i.e., nothing else enables it), and everything still builds. However, this means parking_lot's `RwLock` will no longer have hardware lock elision for readers -- I hope that is okay to lose in exchange for less bootstrap brain twisting. ;)

Cc `@Amanieu`

3 years agoMinor grammar tweaks for readability
Ben-Lichtman [Thu, 29 Apr 2021 02:43:33 +0000 (19:43 -0700)]
Minor grammar tweaks for readability

3 years agoImplement RFC 1260 with feature_name `imported_main`.
Charles Lew [Sun, 25 Apr 2021 17:09:35 +0000 (01:09 +0800)]
Implement RFC 1260 with feature_name `imported_main`.

3 years agoAuto merge of #84615 - a1phyr:clone_from_pathbuf_osstring, r=Mark-Simulacrum
bors [Wed, 28 Apr 2021 23:25:23 +0000 (23:25 +0000)]
Auto merge of #84615 - a1phyr:clone_from_pathbuf_osstring, r=Mark-Simulacrum

Override `clone_from` method for PathBuf and OsString

This was not the case before because `#[derive(Clone)]` do not do it.

3 years agoDon't rebind in transitive_bounds_that_define_assoc_type
Jack Huey [Wed, 28 Apr 2021 22:10:44 +0000 (18:10 -0400)]
Don't rebind in transitive_bounds_that_define_assoc_type

3 years agoAdd `x.py check src/librustdoc` as an alias for `x.py check src/tools/rustdoc`
Joshua Nelson [Mon, 26 Apr 2021 12:22:47 +0000 (08:22 -0400)]
Add `x.py check src/librustdoc` as an alias for `x.py check src/tools/rustdoc`

3 years agoAuto merge of #83386 - mark-i-m:stabilize-pat2015, r=nikomatsakis
bors [Wed, 28 Apr 2021 20:35:17 +0000 (20:35 +0000)]
Auto merge of #83386 - mark-i-m:stabilize-pat2015, r=nikomatsakis

Stabilize `:pat_param` and remove `:pat2021`

Blocked on #83384

cc `@rust-lang/lang` #79278

If I understand `@nikomatsakis` in  https://rust-lang.zulipchat.com/#narrow/stream/213817-t-lang/topic/or.20patterns/near/231133873, another FCP is not needed.

r? `@nikomatsakis`

3 years agoUpdate books
Eric Huss [Wed, 28 Apr 2021 18:28:57 +0000 (11:28 -0700)]
Update books

3 years agoAuto merge of #84650 - a1phyr:simplify_mutex_into_inner, r=m-ou-se
bors [Wed, 28 Apr 2021 18:08:01 +0000 (18:08 +0000)]
Auto merge of #84650 - a1phyr:simplify_mutex_into_inner, r=m-ou-se

Simplify `Mutex::into_inner`

Thanks to #77147, `Mutex` do not implement `Drop` directly, so the old unsafe implementation of `into_inner` is not relevant anymore.

3 years agorustdoc: update auto_aliases test case with data-aliases attribute
Michael Howell [Tue, 27 Apr 2021 23:27:07 +0000 (16:27 -0700)]
rustdoc: update auto_aliases test case with data-aliases attribute

3 years agorustdoc: change aliases attribute to data-aliases
Michael Howell [Tue, 27 Apr 2021 22:47:49 +0000 (15:47 -0700)]
rustdoc: change aliases attribute to data-aliases

The "aliases" attribute is not listed [on MDN], so it sounds like
it's rustdoc-specific. We don't want to conflict with any attributes
that are added to the spec in the future.

[on MDN]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements

3 years agoRemove `DropGuard` in `sys::windows::process` and use `StaticMutex` instead
Christiaan Dirkx [Wed, 28 Apr 2021 17:11:57 +0000 (19:11 +0200)]
Remove `DropGuard` in `sys::windows::process` and use `StaticMutex` instead

3 years agoRemove extra word in `rustc_mir` docs
pierwill [Wed, 28 Apr 2021 16:53:32 +0000 (09:53 -0700)]
Remove extra word in `rustc_mir` docs

Changes "is includes" to "includes" in `rustc_mir::borrow_check::type_check::type_check`.

3 years agoAuto merge of #84645 - lnicola:rust-analyzer-2021-04-26, r=jonas-schievink
bors [Wed, 28 Apr 2021 15:46:26 +0000 (15:46 +0000)]
Auto merge of #84645 - lnicola:rust-analyzer-2021-04-26, r=jonas-schievink

:arrow_up: rust-analyzer

3 years agoAdd HAS_RE_LATE_BOUND if there are bound vars
Jack Huey [Wed, 28 Apr 2021 14:18:52 +0000 (10:18 -0400)]
Add HAS_RE_LATE_BOUND if there are bound vars

3 years agoAuto merge of #84562 - richkadel:issue-83601, r=tmandry
bors [Wed, 28 Apr 2021 13:05:16 +0000 (13:05 +0000)]
Auto merge of #84562 - richkadel:issue-83601, r=tmandry

Adds feature-gated `#[no_coverage]` function attribute, to fix derived Eq `0` coverage issue #83601

Derived Eq no longer shows uncovered

The Eq trait has a special hidden function. MIR `InstrumentCoverage`
would add this function to the coverage map, but it is never called, so
the `Eq` trait would always appear uncovered.

Fixes: #83601
The fix required creating a new function attribute `no_coverage` to mark
functions that should be ignored by `InstrumentCoverage` and the
coverage `mapgen` (during codegen).

Adding a `no_coverage` feature gate with tracking issue #84605.

r? `@tmandry`
cc: `@wesleywiser`

3 years agoReuse `unix::cmath`
Christiaan Dirkx [Sat, 24 Apr 2021 15:50:40 +0000 (17:50 +0200)]
Reuse `unix::cmath`

3 years agoSimplify `Mutex::into_inner`
Benoît du Garreau [Wed, 28 Apr 2021 11:56:23 +0000 (13:56 +0200)]
Simplify `Mutex::into_inner`

3 years agoAuto merge of #83401 - fee1-dead:master, r=davidtwco
bors [Wed, 28 Apr 2021 10:46:02 +0000 (10:46 +0000)]
Auto merge of #83401 - fee1-dead:master, r=davidtwco

Fix ICE of for-loop mut borrowck where no suggestions are available

Fixes #83309.

3 years agoadded methods src_root and location to External crate, remove extern_location function
Timothée Delabrouille [Mon, 26 Apr 2021 19:08:14 +0000 (21:08 +0200)]
added methods src_root and location to External crate, remove extern_location function

3 years agoAdd a regression test for #80779
Yuki Okushi [Wed, 28 Apr 2021 09:23:49 +0000 (18:23 +0900)]
Add a regression test for #80779

3 years agoAdd a regression test for #75883
Yuki Okushi [Wed, 28 Apr 2021 09:23:44 +0000 (18:23 +0900)]
Add a regression test for #75883

3 years ago:arrow_up: rust-analyzer
Laurențiu Nicola [Wed, 28 Apr 2021 09:09:34 +0000 (12:09 +0300)]
:arrow_up: rust-analyzer

3 years agoAuto merge of #84644 - JohnTitor:rollup-nzq9rjz, r=JohnTitor
bors [Wed, 28 Apr 2021 08:20:19 +0000 (08:20 +0000)]
Auto merge of #84644 - JohnTitor:rollup-nzq9rjz, r=JohnTitor

Rollup of 5 pull requests

Successful merges:

 - #84529 (Improve coverage spans for chained function calls)
 - #84616 (Fix empty dom toggle)
 - #84622 (Make traits with GATs not object safe)
 - #84624 (Make sentence in env::args_os' docs plain and simple)
 - #84642 (Stabilize vec_extend_from_within)

Failed merges:

 - #84636 (rustdoc: change aliases attribute to data-aliases)

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

3 years agoRollup merge of #84642 - Amanieu:vec_extend_from_within, r=dtolnay
Yuki Okushi [Wed, 28 Apr 2021 07:59:11 +0000 (16:59 +0900)]
Rollup merge of #84642 - Amanieu:vec_extend_from_within, r=dtolnay

Stabilize vec_extend_from_within

Closes #81656

3 years agoRollup merge of #84624 - r00ster91:patch-5, r=JohnTitor
Yuki Okushi [Wed, 28 Apr 2021 07:59:09 +0000 (16:59 +0900)]
Rollup merge of #84624 - r00ster91:patch-5, r=JohnTitor

Make sentence in env::args_os' docs plain and simple

Follow-up to #84551. See https://github.com/rust-lang/rust/pull/84551#discussion_r620728070 on why this makes more sense.

3 years agoRollup merge of #84622 - jackh726:gats-trait-object, r=nikomatsakis
Yuki Okushi [Wed, 28 Apr 2021 07:59:08 +0000 (16:59 +0900)]
Rollup merge of #84622 - jackh726:gats-trait-object, r=nikomatsakis

Make traits with GATs not object safe

Closes #81823

r? `@nikomatsakis`

3 years agoRollup merge of #84616 - GuillaumeGomez:fix-empty-dom-toggle, r=jsha
Yuki Okushi [Wed, 28 Apr 2021 07:59:07 +0000 (16:59 +0900)]
Rollup merge of #84616 - GuillaumeGomez:fix-empty-dom-toggle, r=jsha

Fix empty dom toggle

Currently, the empty impl blocks have toggles:

![Screenshot from 2021-04-27 15-15-03](https://user-images.githubusercontent.com/3050060/116249703-5ee0d980-a76d-11eb-9e15-738c06e4fb1b.png)

So when you expand it, nothing happens:

![Screenshot from 2021-04-27 15-15-07](https://user-images.githubusercontent.com/3050060/116249746-686a4180-a76d-11eb-8dc1-221ca0ac57c5.png)

So now, in case the impl block is empty, we simply don't generate the details/summary wrapping (which also makes DOM lighter, yeay!):

![Screenshot from 2021-04-27 15-14-15](https://user-images.githubusercontent.com/3050060/116249825-7a4be480-a76d-11eb-9637-b26151311ebd.png)

r? `@jsha`

3 years agoRollup merge of #84529 - richkadel:issue-84180, r=tmandry
Yuki Okushi [Wed, 28 Apr 2021 07:59:06 +0000 (16:59 +0900)]
Rollup merge of #84529 - richkadel:issue-84180, r=tmandry

Improve coverage spans for chained function calls

Fixes: #84180
For chained function calls separated by the `?` try operator, the
function call following the try operator produced a MIR `Call` span that
matched the span of the first call. The `?` try operator started a new
span, so the second call got no span.

It turns out the MIR `Call` terminator has a `func` `Operand`
for the `Constant` representing the function name, and the function
name's Span can be used to reset the starting position of the span.

r? `@tmandry`
cc: `@wesleywiser`

3 years agoStabilize vec_extend_from_within
Amanieu d'Antras [Wed, 28 Apr 2021 06:12:49 +0000 (07:12 +0100)]
Stabilize vec_extend_from_within

3 years agoAuto merge of #83713 - spastorino:revert-pub-macro-rules, r=nikomatsakis
bors [Wed, 28 Apr 2021 05:52:47 +0000 (05:52 +0000)]
Auto merge of #83713 - spastorino:revert-pub-macro-rules, r=nikomatsakis

Revert "Rollup merge of #82296 - spastorino:pubrules, r=nikomatsakis"

This reverts commit e2561c58a41023a14e0e583113dcf55e1ecb236a, reversing
changes made to 2982ba50fc4bb629b8fe4108a81cb2f9b053510b.

As discussed in #83641 this feature is not complete and in particular doesn't work cross macros and given that this is not going to be included in edition 2021 nobody seems to be trying to fix the underlying problem. When can add this again I guess, whenever somebody has the time to make it work cross crates.

r? `@nikomatsakis`

3 years agoAuto merge of #84498 - workingjubilee:update-grab-bag, r=Mark-Simulacrum
bors [Wed, 28 Apr 2021 02:45:03 +0000 (02:45 +0000)]
Auto merge of #84498 - workingjubilee:update-grab-bag, r=Mark-Simulacrum

Update grab bag

This PR slides a bunch of crate versions forward until suddenly a bunch of deps fall out of the tree!
In doing so this mostly picks up a version bump in the `redox_users` crate which makes most of the features default to optional.

crossbeam-utils 0.7 => 0.8.3 (where applicable)
https://github.com/crossbeam-rs/crossbeam/blob/master/crossbeam-utils/CHANGELOG.md
directories 3.0.1 => 3.0.2
ignore 0.4.16 => 0.4.17
tempfile 3.0.5 => tempfile 3.2

Removes constant_time_eq from deps exceptions
Removes arrayref from deps exceptions
And also removes:
- blake2b_simd
- const_fn (the package, not the feature)
- constant_time_eq
- redox_users 0.3.4
- rust-argon2

3 years agoremove pat2021
mark [Wed, 28 Apr 2021 02:15:59 +0000 (21:15 -0500)]
remove pat2021