Commit graph

142680 commits

Author SHA1 Message Date
Yuki Okushi
e69f1fd46a
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.
2021-05-01 18:32:33 +09:00
Yuki Okushi
e30d952d8b
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
2021-05-01 18:32:31 +09:00
bors
3d67e07472 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.
2021-05-01 02:53:55 +00:00
Joshua Nelson
b1f5917930 Remove unnecessary provided_trait_methods field from Impl
It can be calculated on-demand.
2021-04-30 21:38:43 -04:00
bors
b52769b804 Auto merge of #84747 - pietroalbini:bump-version, r=pietroalbini
Bump version to 1.54.0

cc `@Mark-Simulacrum`
r? `@ghost`
2021-05-01 00:31:56 +00:00
bors
8a9fa3682d 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.
2021-04-30 22:21:07 +00:00
bors
4ae0a8e413 Auto merge of #84753 - hyd-dev:update-miri, r=RalfJung
Update Miri

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

r? `@RalfJung`
2021-04-30 19:55:47 +00:00
bors
8fef006d44 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.
2021-04-30 14:39:27 +00:00
Amanieu d'Antras
eadcbb5240 Update LLVM submodule
Fixes #84025
2021-04-30 07:28:40 -07:00
Alex Crichton
29a12f71f3 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.
2021-04-30 07:27:34 -07:00
hyd-dev
3be4d4b5f0
Update Miri 2021-04-30 22:22:35 +08:00
Pietro Albini
d19d123a4e
bump version to 1.54.0 2021-04-30 15:24:00 +02:00
bors
7506228e2e 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.
2021-04-30 12:19:37 +00:00
bors
49920bc581 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`.
2021-04-30 09:52:32 +00:00
Josh Triplett
ffb874ac90 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.
2021-04-30 00:11:03 -07:00
bors
bcd696d722 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`
2021-04-30 06:59:37 +00:00
bors
a45f0d724e 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
2021-04-29 23:28:28 +00:00
Jack Huey
087f964935
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 c127530be7 for another example of this.

r? `````@Mark-Simulacrum`````
2021-04-29 19:27:27 -04:00
Jack Huey
32c5f39faf
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.
2021-04-29 19:27:27 -04:00
Jack Huey
e6d8683239
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
2021-04-29 19:27:26 -04:00
Jack Huey
6e50ac8a34
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.
2021-04-29 19:27:25 -04:00
Jack Huey
8460539f28
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``````
2021-04-29 19:27:24 -04:00
Jack Huey
92c95916c1
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````````
2021-04-29 19:27:24 -04:00
Jack Huey
15582fcd14
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.
2021-04-29 19:27:23 -04:00
Jack Huey
26a4f461d7
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`````
2021-04-29 19:27:22 -04:00
Jack Huey
e720df672d
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
2021-04-29 19:27:21 -04:00
Jack Huey
2e58633412
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.
2021-04-29 19:27:20 -04:00
Mark Rousskov
a1d7367429 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.
2021-04-29 17:26:46 -04:00
Camelid
16ff6c8050
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 c127530be7 for another example of this.
2021-04-29 13:13:28 -07:00
bors
478a07df05 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.
2021-04-29 20:06:07 +00:00
Felix S. Klock II
db4c544434 Remove tests introduced or cahnged by PR #77885, which is reverted in this PR. 2021-04-29 15:13:36 -04:00
Felix S. Klock II
8d1083e319 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.
2021-04-29 15:13:21 -04:00
Josh Triplett
20b569f579 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.
2021-04-29 12:05:08 -07:00
lcnr
da6261e07f make feature recommendations optional 2021-04-29 20:44:19 +02:00
Josh Triplett
9a9d9be07e 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.
2021-04-29 11:03:21 -07:00
Timothée Delabrouille
2cc263988e only store locations in extern_locations 2021-04-29 19:46:29 +02:00
bors
18587b14d1 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`
2021-04-29 17:38:37 +00:00
bors
814a560072 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)
2021-04-29 14:57:17 +00:00
Joshua Nelson
5a692a7838 Add integration test for --remap-pathh-prefix 2021-04-29 12:53:59 +00:00
Joshua Nelson
bfa74c270f Use doc-comment instad of comments consistently
This makes the comments show up in the generated docs.

- Fix markdown formatting
2021-04-29 12:53:49 +00:00
bors
10a51c0ac0 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
2021-04-29 12:03:43 +00:00
r00ster91
d0c0b8a4a3 Link between std::env::{var, var_os} and std::env::{vars, vars_os} 2021-04-29 13:15:49 +02:00
est31
a3523363db Ignore doctests in bootstrap
On bootstrap the IntoIterator trait is not implemented
yet for arrays.
2021-04-29 12:39:23 +02:00
Ralf Jung
3c4c5eb217 re-bless on 32bit 2021-04-29 12:15:30 +02:00
Guillaume Gomez
a20831e7a6 Remove unneeded bottom margin on search results 2021-04-29 11:26:35 +02:00
Guillaume Gomez
8c0469552e Remove unnecessary CSS rules for search results 2021-04-29 10:40:10 +02:00
bors
78c963945a 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
2021-04-29 08:22:44 +00:00
Ralf Jung
3752c6bb40 remove const_fn feature gate from const tests 2021-04-29 09:27:45 +02:00
Ralf Jung
9a852776f4 don't let const_fn feature flag affect impl-block-level trait bounds 2021-04-29 09:27:45 +02:00
bors
d337cec9af 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
2021-04-29 05:24:45 +00:00