Commit graph

1130 commits

Author SHA1 Message Date
flip1995
c24058bc59
Update Cargo.lock 2021-05-06 12:21:46 +02:00
Igor Matuszewski
2214a41892 Update RLS and Rustfmt 2021-05-05 12:36:21 +02:00
klensy
50c3890dd0 bump deps 2021-05-01 14:50:03 +03: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
bors
537544b106 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
2021-04-28 02:45:03 +00:00
Joshua Nelson
8c25e27f16 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-27 16:57:29 +00:00
lcnr
b3629d21ba move representability out of rustc_middle 2021-04-27 15:01:37 +02:00
bors
2b68027841 Auto merge of #84412 - ehuss:update-cargo, r=ehuss
Update cargo, rls

## cargo

18 commits in 65d57e6f384c2317f76626eac116f683e2b63665..0ed318d182e465cd66071b91ac3d265af63ef8a1
2021-04-04 15:07:52 +0000 to 2021-04-23 20:54:54 +0000
- Restore crates.io's `SourceId` hash value to before (rust-lang/cargo#9397)
- Fix loading `branch=master` patches in the v3 lock transition (rust-lang/cargo#9392)
- Update changelog for 1.52 beta changes. (rust-lang/cargo#9396)
- Fix build-std updating the index on every build. (rust-lang/cargo#9393)
- Fix typo in profile docs (rust-lang/cargo#9386)
- Fix disagreement about lockfile ordering on stable/nightly (rust-lang/cargo#9384)
- Don't give a hard error when the end-user specifies RUSTC_BOOTSTRAP=crate_name (rust-lang/cargo#9365)
- Fix rust-lang/cargo#9350 (cargo build -Z help is missing options) (rust-lang/cargo#9369)
- an struct -> a struct (rust-lang/cargo#9379)
- Handle man pages better on Windows. (rust-lang/cargo#9378)
- fix: better error message when dependency/workspace member missing (rust-lang/cargo#9368)
- Fix typo in book (rust-lang/cargo#9376)
- Don't re-use rustc cache when RUSTC_WRAPPER changes (rust-lang/cargo#9348)
- doc: add split-debuginfo doc in config chapter (rust-lang/cargo#9372)
- refactor: remove `CargoResultExt` (rust-lang/cargo#9367)
- Track "CARGO" in environment fingerprint. (rust-lang/cargo#9363)
- Update clippy lint allow set. (rust-lang/cargo#9356)
- Fix 'suport' typo in documentation (rust-lang/cargo#9338)

## rls

3 commits in 32c0fe006dcdc13e1ca0ca31de543e4436c1299e..74d1800c25498689c5b5120a1e8495fce0cd0d0d
2021-04-12 11:21:12 +0000 to 2021-04-22 21:29:51 +0000
- Bump default integration test message timeout to 30s (rust-lang-nursery/rls#1731)
- itertools = 0.9, fst = 0.4 (rust-lang-nursery/rls#1729)
- Update cargo (rust-lang-nursery/rls#1728)
2021-04-24 14:49:26 +00:00
Jubilee Young
7d3186d92a Lock down rand_core 0.5.1 to specific features 2021-04-23 18:00:46 -07:00
Jubilee Young
1f5e1c5efa Use latest crossbeam 2021-04-23 16:27:08 -07:00
Jubilee Young
27ef719aa4 Remove arrayref, constant_time_eq from deps 2021-04-23 16:26:30 -07:00
Eric Huss
893ca665f5 Update cargo, rls 2021-04-23 15:46:51 -07:00
bors
7f4afdf025 Auto merge of #84420 - workingjubilee:microvec, r=Mark-Simulacrum
Use arrayvec 0.7, drop smallvec 0.6

With the arrival of min const generics, many alt-vec libraries have
updated to use it in some way and arrayvec is no exception. Use the
latest with minor refactoring.

Also, rustc_workspace_hack is the only user of smallvec 0.6 in the
entire tree, so drop it.
2021-04-22 21:01:24 +00:00
Jubilee Young
e8eb691c1f Use arrayvec 0.7, drop smallvec 0.6
With the arrival of min const generics, many alt-vec libraries have
updated to use it in some way and arrayvec is no exception. Use the
latest with minor refactoring.

Also, rustc_workspace_hack is the only user of smallvec 0.6 in the
entire tree, so drop it.
2021-04-21 22:39:08 -07:00
The8472
7f45cdb090 bump jobserver dependency
the newest jobserver version should slightly reduce context switches
in highly parallel build environments on linux kernels >= 5.6
2021-04-21 22:02:54 +02:00
bors
d0695c9081 Auto merge of #83776 - jyn514:update-stdarch-docs, r=Amanieu
Update stdarch submodule (to before it switched to const generics)

https://github.com/rust-lang/rust/pull/83278#issuecomment-812389823: This unblocks #82539.

Major changes:
- More AVX-512 intrinsics.
- More ARM & AArch64 NEON intrinsics.
- Updated unstable WASM intrinsics to latest draft standards.
- std_detect is now a separate crate instead of a submodule of std.

I double-checked and the first use of const generics looks like 8d5017861e, which isn't included in this PR.

r? `@Amanieu`
2021-04-12 18:29:25 +00:00
bors
1284da34da Auto merge of #84103 - calebcartwright:bump-rls-rustfmt, r=Xanewok
update RLS and rustfmt

Fixes #83460 and fixes #83459

cc `@Xanewok`
2021-04-12 15:59:35 +00:00
Caleb Cartwright
e2fe4f2c61 update RLS and rustfmt 2021-04-12 09:01:17 -05:00
Joshua Nelson
1b0b7e95be Update stdarch submodule (to before it switched to const generics)
This also includes a cherry-pick of
ec1461905b
and https://github.com/rust-lang/stdarch/pull/1108 to fix a build
failure.

It also adds a re-export of various macros to the crate root of libstd -
previously they would show up automatically because std_detect was defined
in the same crate.
2021-04-12 09:39:04 -04:00
Dylan DPC
7b63125c0a
Rollup merge of #84059 - zvirja:update-libc, r=JohnTitor
Bump libc dependency of std to 0.2.93

Update `libc` dependency of `std` to the latest version. That allows to consume the https://github.com/rust-lang/libc/pull/2131 fix and fix build for the `mipsel-unknown-linux-uclibc` target.

r? `@JohnTitor`
2021-04-12 01:04:06 +02:00
bors
7953910464 Auto merge of #81469 - tweksteen:android_set_message, r=m-ou-se
android: set abort message

Android has the ability to supply an abort message [1]. This message is
automatically included in the debug trace, which helps debugging [2].
Modify panic_abort to populate this message before calling abort().

[1] https://android.googlesource.com/platform/bionic/+/master/libc/include/android/set_abort_message.h
[2] https://source.android.com/devices/tech/debug/native-crash
2021-04-11 12:29:36 +00:00
Oleksandr Povar
63d6e32782
Bump libc dependency of std to 0.2.93 2021-04-10 16:12:46 +02:00
Thiébaud Weksteen
52ee9fbc02 android: set abort message
Android has the ability to supply an abort message [1]. This message is
automatically included in the debug trace, which helps debugging [2].
Modify panic_abort to populate this message before calling abort().

[1] https://android.googlesource.com/platform/bionic/+/master/libc/include/android/set_abort_message.h
[2] https://source.android.com/devices/tech/debug/native-crash
2021-04-09 15:33:43 +02:00
Ralf Jung
bf11b12e39 update Miri 2021-04-06 13:20:48 +02:00
Gus Wynn
3965773ae7 use jemallocator in rustc/rustdoc 2021-04-04 14:10:26 -07:00
bors
f98135b7a2 Auto merge of #82347 - the8472:parallelize-tidy, r=Mark-Simulacrum
Parallelize tidy

Split off from #81833

While that PR brings wall time of `x.py test tidy` down to 0m2.847s adding this one on top should bring it down to 0m1.673s.

r? `@Mark-Simulacrum`

Previous concerns can be found at https://github.com/rust-lang/rust/pull/81833#issuecomment-782754685 and https://github.com/rust-lang/rust/pull/81833#discussion_r575194633
2021-04-04 08:34:12 +00:00
bors
97717a5618 Auto merge of #83682 - bjorn3:mmap_wrapper, r=cjgillot
Add an Mmap wrapper to rustc_data_structures

This wrapper implements StableAddress and falls back to directly reading the file on wasm32.

Taken from #83640, which I will close due to the perf regression.
2021-04-03 13:23:42 +00:00
Eric Huss
cb969e86a5 Update cargo 2021-03-31 17:45:03 -07:00
bjorn3
8331dbe6d0 Add an Mmap wrapper to rustc_data_structures
This wrapper implements StableAddress and falls back to directly reading
the file on wasm32
2021-03-30 18:57:03 +02:00
Yuki Okushi
5473b6dcfc
Rollup merge of #83239 - JohnTitor:reduce-deps, r=Mark-Simulacrum
Remove/replace some outdated crates from the dependency tree

- Remove `cloudabi` by updating `parking_lot` to 0.11.1.
- Replace `packed_simd` with `packed_simd2` by updating `bytecount` to 0.6.2.
2021-03-27 12:37:18 +09:00
Eric Huss
ea194b8b33 Update cargo 2021-03-26 12:29:08 -07:00
bors
13167029c2 Auto merge of #83480 - flip1995:clippyup, r=Dylan-DPC
Update Clippy

Bi-weekly Clippy update.

r? `@Manishearth`
2021-03-26 06:30:16 +00:00
flip1995
0f1ff452df
Update Cargo.lock 2021-03-25 19:29:39 +01:00
Nixon Enraght-Moony
ce21447c01 Better errors in jsondocck 2021-03-24 16:54:12 +00:00
Dylan DPC
23128c4183
Rollup merge of #83236 - cjgillot:memmap, r=joshtriplett
Upgrade memmap to memmap2

memmap is no longer maintained. memmap2 is a fork that is still maintained. https://rustsec.org/advisories/RUSTSEC-2020-0077.html

The remaining use of memmap is through measureme.
2021-03-19 15:03:28 +01:00
Camille GILLOT
458d044c5b Upgrade memmap to memmap2 in other crates. 2021-03-18 18:36:55 +01:00
Yuki Okushi
2b0e27e242 cargo update -p bytecount
Commit range: b0f5fba806...8dcd43753c

The full log:
```
Updating bytecount v0.6.0 -> v0.6.2
Adding libm v0.1.4
Removing packed_simd v0.3.3
Adding packed_simd_2 v0.3.4
```
2021-03-18 05:59:34 +09:00
Yuki Okushi
79348f4979 cargo update -p parking_lot -p parking_lot_core
Changelog: https://github.com/Amanieu/parking_lot/blob/master/CHANGELOG.md#parking_lot_core-083-2021-02-12
The full log:
```
Removing cloudabi v0.1.0
Updating parking_lot v0.11.0 -> v0.11.1
Updating parking_lot_core v0.8.0 -> v0.8.3
```
2021-03-18 05:59:34 +09:00
Markus Westerlind
7cf8d3ac2b feat: Update hashbrown to instantiate less llvm IR
Includes https://github.com/rust-lang/hashbrown/pull/204 and https://github.com/rust-lang/hashbrown/pull/205 (not yet merged) which both server to reduce the amount of IR generated for hashmaps.

Inspired by the llvm-lines data gathered in https://github.com/rust-lang/rust/pull/76680
2021-03-16 11:20:26 +01:00
Dylan DPC
75a15bf275
Rollup merge of #83098 - camelid:more-doc-attr-check, r=davidtwco
Find more invalid doc attributes

- Lint on `#[doc(123)]`, `#[doc("hello")]`, etc.
- Lint every attribute; e.g., will now report two warnings for `#[doc(foo, bar)]`
- Add hyphen to "crate level"
- Display paths like `#[doc(foo::bar)]` correctly instead of as an empty string
2021-03-15 16:22:52 +01:00
bors
2a55274e0c Auto merge of #82999 - cuviper:rustc-rayon-0.3.1, r=Mark-Simulacrum
Update to rustc-rayon 0.3.1

This pulls in rust-lang/rustc-rayon#8 to fix #81425. (h/t `@ammaraskar)`

That revealed weak constraints on `rustc_arena::DropArena`, because its
`DropType` was holding type-erased raw pointers to generic `T`. We can
implement `Send` for `DropType` (under `cfg(parallel_compiler)`) by
requiring all `T: Send` before they're type-erased.
2021-03-15 08:49:25 +00:00
Camelid
8f40e1180f Use pretty-printer instead of span_to_snippet 2021-03-14 14:39:25 -07:00
Vadim Petrochenkov
a4cc3cae04 expand: Resolve and expand inner attributes on out-of-line modules 2021-03-14 18:10:29 +03:00
Yuki Okushi
fa189d4fbb
Rollup merge of #83052 - klensy:dep-update, r=Mark-Simulacrum
updated vulnerable deps

* Updated signal-hook-registry 1.2.1 to 1.2.2, as it drops dependency on vulnerable arc-swap 0.4.7 https://rustsec.org/advisories/RUSTSEC-2020-0091
* Updated generic-array 0.12.3 to 0.12.4, vuln https://rustsec.org/advisories/RUSTSEC-2020-0146
* Updated sized-chunks 0.6.2 to 0.6.4, vuln https://rustsec.org/advisories/RUSTSEC-2020-0041 fixed in 0.6.3, in 0.6.4 fixed some UB https://github.com/bodil/sized-chunks/blob/master/CHANGELOG.md#064---2021-02-17
2021-03-13 09:44:46 +09:00
flip1995
412ebc3972
Update Cargo.lock 2021-03-12 15:31:11 +01:00
klensy
d480a3e3c1 updated vulnerable deps 2021-03-12 16:33:02 +03:00
LeSeulArtichaut
6bf4147646 Add -Z unpretty flag for the THIR 2021-03-11 19:42:40 +01:00
Josh Stone
f7e75a2124 Update to rustc-rayon 0.3.1
This pulls in rust-lang/rustc-rayon#8 to fix #81425. (h/t @ammaraskar)

That revealed weak constraints on `rustc_arena::DropArena`, because its
`DropType` was holding type-erased raw pointers to generic `T`. We can
implement `Send` for `DropType` (under `cfg(parallel_compiler)`) by
requiring all `T: Send` before they're type-erased.
2021-03-10 17:53:35 -08:00
Oli Scherer
62f2d72330 Bump tracing-tree dependency 2021-03-09 16:44:51 +00:00
Mara Bos
bf1580279e
Rollup merge of #82883 - Aaron1011:update-cargo, r=ehuss
Update Cargo

Output of `git log --oneline  c68432f1e..970bc67c3`:

970bc67c3 (HEAD, origin/master, origin/auto-cargo, origin/HEAD) Auto merge of #9243 - wickerwaka:configurable-env-doc, r=ehuss
4d7a29b75 Document the configurable-env usntable option
f7a7a3f91 Auto merge of #9229 - alexcrichton:fix-borrow-mut, r=ehuss
3f2ece7a9 Fix a `BorrowMut` error when stdout is closed
7441e8c23 Auto merge of #8825 - Aaron1011:feature/report-future-incompat, r=ehuss
139ed73f5 Add future-incompat tracking issue number.
9ea350368 Fix some minor formatting issues.
f03d47ce4 Address review comments
6177c6584 Implement future incompatibility report support
c69409658 Auto merge of #9022 - nagisa:nagisa/manifest_path, r=alexcrichton
548300b20 Add the path to the manifest in json output
99e714c05 Auto merge of #9230 - kornelski:nobinaries, r=alexcrichton
61a31bc5f Auto merge of #9236 - kornelski:track-assert, r=Eh2406
3f7f0942c track_caller on custom assert functions
6977dee10 Explain `cargo install` is not for libraries
e4aebf0a0 Auto merge of #9231 - joshtriplett:clear-to-eol-if-color, r=alexcrichton
b219f0eb7 Auto merge of #9181 - jyn514:computer-says-no, r=ehuss
0b1816578 Remove unhelpful link to Cargo book
ea46f5ce3 Use ANSI clear-to-EOL if color is force-enabled
a6394bcc1 Remove unnecessary `config` argument to `Features::add`
3a86ecf2d Fix TODO about nightly features
09677c83c Be less unix-centric in error messages
ecfdced0d Fix test that assumed tests always were run on the stable channel
eba541994 Update comment in build_script_env
a5720117f Make `nightly_features_allowed` a field instead of a function
169b09ce7 Compute `enable_nightly_features` once instead of on each call
8fc86e155 Remove unused thread_locals
4b096beae Fix `masquerade_as_nightly_cargo` in work threads
e56417c8c Suggest RUSTC_BOOTSTRAP=crate instead of RUSTC_BOOTSTRAP=1
418129dae Downgrade error to a warning when `RUSTC_BOOTSTRAP` is set or this is the nightly channel
6c422a2c0 Restrict RUSTC_BOOTSTRAP in build.rs
2021-03-09 09:05:25 +00:00
Mara Bos
ba63a84acc
Rollup merge of #82731 - de-vri-es:bump-libc-for-std, r=Mark-Simulacrum
Bump libc dependency of std to 0.2.88.

This PR bumps the `libc` dependency of `std` to 0.2.88. This will fix `TcpListener::accept` for Android on x86 platforms (31a2777d8f).

This will really finally fix https://github.com/rust-lang/rust/issues/82400 for the main branch :)

r? ``@JohnTitor``
2021-03-09 09:05:22 +00:00
Mara Bos
6e9a94a72b
Rollup merge of #82767 - GuillaumeGomez:update-minifier-crate-version, r=jyn514
Update minifier dependency version

Very small PR simply upgrading the minifier-rs version we use in rustdoc.

Some details might be useful: there were a few bug fixes and a lot of cleanup/code improvements.

r? `@camelid`
2021-03-08 20:08:57 +01:00
Aaron Hill
2550d5b15c
Update Cargo
Output of `git log --oneline  c68432f1e..970bc67c3`:

970bc67c3 (HEAD, origin/master, origin/auto-cargo, origin/HEAD) Auto merge of #9243 - wickerwaka:configurable-env-doc, r=ehuss
4d7a29b75 Document the configurable-env usntable option
f7a7a3f91 Auto merge of #9229 - alexcrichton:fix-borrow-mut, r=ehuss
3f2ece7a9 Fix a `BorrowMut` error when stdout is closed
7441e8c23 Auto merge of #8825 - Aaron1011:feature/report-future-incompat, r=ehuss
139ed73f5 Add future-incompat tracking issue number.
9ea350368 Fix some minor formatting issues.
f03d47ce4 Address review comments
6177c6584 Implement future incompatibility report support
c69409658 Auto merge of #9022 - nagisa:nagisa/manifest_path, r=alexcrichton
548300b20 Add the path to the manifest in json output
99e714c05 Auto merge of #9230 - kornelski:nobinaries, r=alexcrichton
61a31bc5f Auto merge of #9236 - kornelski:track-assert, r=Eh2406
3f7f0942c track_caller on custom assert functions
6977dee10 Explain `cargo install` is not for libraries
e4aebf0a0 Auto merge of #9231 - joshtriplett:clear-to-eol-if-color, r=alexcrichton
b219f0eb7 Auto merge of #9181 - jyn514:computer-says-no, r=ehuss
0b1816578 Remove unhelpful link to Cargo book
ea46f5ce3 Use ANSI clear-to-EOL if color is force-enabled
a6394bcc1 Remove unnecessary `config` argument to `Features::add`
3a86ecf2d Fix TODO about nightly features
09677c83c Be less unix-centric in error messages
ecfdced0d Fix test that assumed tests always were run on the stable channel
eba541994 Update comment in build_script_env
a5720117f Make `nightly_features_allowed` a field instead of a function
169b09ce7 Compute `enable_nightly_features` once instead of on each call
8fc86e155 Remove unused thread_locals
4b096beae Fix `masquerade_as_nightly_cargo` in work threads
e56417c8c Suggest RUSTC_BOOTSTRAP=crate instead of RUSTC_BOOTSTRAP=1
418129dae Downgrade error to a warning when `RUSTC_BOOTSTRAP` is set or this is the nightly channel
6c422a2c0 Restrict RUSTC_BOOTSTRAP in build.rs
2021-03-07 18:45:08 -05:00
Rune Tynan
18841ec342
Revert fmt version, add rustdoc-json-types to bootstrap tests 2021-03-06 15:50:30 -05:00
Rune Tynan
ca48d1566e
Add roundtrip testing and bump format version 2021-03-06 15:50:28 -05:00
Guillaume Gomez
6052211982 Update minifier dependency version 2021-03-05 21:17:48 +01:00
Maarten de Vries
c946d1d620 Bump libc dependency of std to 0.2.88. 2021-03-05 20:54:14 +01:00
bors
476acbf1e9 Auto merge of #82553 - tmiasko:update-tracing, r=Mark-Simulacrum
Update tracing to 0.1.25

* Update tracing from 0.1.18 to 0.1.25
* Update tracing-subscriber from 0.2.13 to 0.2.16
* Update tracing-tree from 0.1.6 to 0.1.8
* Add pin-project-lite to the list of allowed dependencies (it is now a direct dependency of tracing).
2021-03-03 18:01:29 +00:00
Yuki Okushi
0c7e8983b0
Rollup merge of #82469 - notriddle:bring-our-own-diff, r=Mark-Simulacrum
Use a crate to produce rustdoc tree comparisons instead of the `diff` command

It doesn't come with Windows, so bring [our own](https://github.com/notriddle/rust-unified-diff/).

Fixes #82409

![image](https://user-images.githubusercontent.com/1593513/109230755-9a1d5700-7782-11eb-8359-353a506875ab.png)
2021-03-03 16:27:40 +09:00
Guillaume Gomez
22ebb867f7
Rollup merge of #81932 - jyn514:rustdoc-logging, r=Mark-Simulacrum
Always compile rustdoc with debug logging enabled when `download-rustc` is set

Previously, logging at DEBUG or below would always be silenced, because
rustc compiles tracing with the `static_max_level_info` feature. That
makes sense for release artifacts, but not for developing rustdoc.

Instead, this compiles two different versions of tracing: one in the
release artifacts, distributed in the sysroot, and a new version
compiled by rustdoc. Since `rustc_driver` is always linked to the
version of sysroot, this copy/pastes `init_env_logging` into rustdoc.

To avoid compiling an unnecessary version of tracing when
`download-rustc` isn't set, this adds a new `using-ci-artifacts`
feature for rustdoc and passes that feature in bootstrap.

Addresses https://github.com/rust-lang/rust/issues/81930. This builds on https://github.com/rust-lang/rust/pull/79540.

r? `@Mark-Simulacrum`
2021-03-02 00:50:06 +01:00
The8472
77d1185f00 parallelize tidy checks 2021-03-01 19:47:41 +01:00
Joshua Nelson
57d7c7e3d9
Rollup merge of #82428 - ehuss:update-mdbook, r=Mark-Simulacrum
Update mdbook

Changelog is here: https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-047
2021-03-01 11:25:05 -05:00
Michael Howell
b29d9d5503 Use a crate to produce rustdoc tree comparisons instead of the diff command
It doesn't exist on Windows, so we bring our own unified diff implementation.

Fixes #82409
2021-03-01 08:48:43 -07:00
Joshua Nelson
65f0b2549c Always compile rustdoc with debug logging enabled when download-rustc is set
Previously, logging at DEBUG or below would always be silenced, because
rustc compiles tracing with the `static_max_level_info` feature. That
makes sense for release artifacts, but not for developing rustdoc.

Instead, this compiles two different versions of tracing: one in the
release artifacts, distributed in the sysroot, and a new version
compiled by rustdoc. Since `rustc_driver` is always linked to the
version of sysroot, this copy/pastes `init_env_logging` into rustdoc.

The builds the second version of tracing unconditionally; see the code
for details on why.
2021-02-28 22:01:45 -05:00
Tomasz Miąsko
2abe7c8f9c Update tracing to 0.1.25 2021-02-28 11:24:24 +01:00
Dylan DPC
6d288c65df
Rollup merge of #82537 - wesleywiser:update_measureme, r=oli-obk
Update measureme dependency to the latest version

This version adds the ability to use `rdpmc` hardware-based performance
counters instead of wall-clock time for measuring duration. This also
introduces a dependency on the `perf-event-open-sys` crate on Linux
which is used when using hardware counters.

r? ```@oli-obk```
2021-02-27 21:56:20 +01:00
Dylan DPC
cabe97272d
Rollup merge of #82057 - upsuper-forks:cstr, r=davidtwco,wesleywiser
Replace const_cstr with cstr crate

This PR replaces the `const_cstr` macro inside `rustc_data_structures` with `cstr` macro from [cstr](https://crates.io/crates/cstr) crate.

The two macros basically serve the same purpose, which is to generate `&'static CStr` from a string literal. `cstr` is better because it validates the literal at compile time, while the existing `const_cstr` does it at runtime when `debug_assertions` is enabled. In addition, the value `cstr` generates can be used in constant context (which is seemingly not needed anywhere currently, though).
2021-02-27 02:34:21 +01:00
Wesley Wiser
e130e9cf77 Update measureme dependency to the latest version
This version adds the ability to use `rdpmc` hardware-based performance
counters instead of wall-clock time for measuring duration. This also
introduces a dependency on the `perf-event-open-sys` crate on Linux
which is used when using hardware counters.
2021-02-25 18:25:38 -05:00
flip1995
0046d7c33e
Update Cargo.lock 2021-02-25 11:26:23 +01:00
bors
301ad8a4fa Auto merge of #80891 - cjgillot:noq, r=Mark-Simulacrum
Make the `Query` enum a simple struct.

A lot of code in `rustc_query_system` is generic over it, only to encode an exceptional error case: query cycles.
The delayed computations are now done at cycle detection.
2021-02-24 03:29:00 +00:00
bors
0196107543 Auto merge of #82127 - tgnottingham:tune-ahead-of-time-codegen, r=varkor
rustc_codegen_ssa: tune codegen according to available concurrency

This change tunes ahead-of-time codegening according to the amount of
concurrency available, rather than according to the number of CPUs on
the system. This can lower memory usage by reducing the number of
compiled LLVM modules in memory at once, particularly across several
rustc instances.

Previously, each rustc instance would assume that it should codegen
ahead of time to meet the demand of number-of-CPUs workers. But often, a
rustc instance doesn't have nearly that much concurrency available to
it, because the concurrency availability is split, via the jobserver,
across all active rustc instances spawned by the driving cargo process,
and is further limited by the `-j` flag argument. Therefore, each rustc
might have had several times the number of LLVM modules in memory than
it really needed to meet demand. If the modules were large, the effect
on memory usage would be noticeable.

With this change, the required amount of ahead-of-time codegen scales up
with the actual number of workers running within a rustc instance. Note
that the number of workers running can be less than the actual
concurrency available to a rustc instance. However, if more concurrency
is actually available, workers are spun up quickly as job tokens are
acquired, and the ahead-of-time codegen scales up quickly as well.
2021-02-23 14:38:45 +00:00
Eric Huss
788167ae57 Update mdbook 2021-02-22 17:05:21 -08:00
Camille GILLOT
f96e960ccf Access the session directly from DepContext. 2021-02-20 22:53:46 +01:00
Camille GILLOT
4581d16bcb Move the query system to rustc_query_impl. 2021-02-19 17:51:58 +01:00
Camille GILLOT
a4b1158f78 Move handle_deadlock where it is used. 2021-02-19 17:51:55 +01:00
Camille GILLOT
5d71b99690 Make QueryEngine opaque to TyCtxt. 2021-02-19 17:51:54 +01:00
Eric Huss
34a94d3858 Update cargo 2021-02-18 13:04:05 -08:00
Tyson Nottingham
5f243d3c2b rustc_codegen_ssa: tune codegen according to available concurrency
This change tunes ahead-of-time codegening according to the amount of
concurrency available, rather than according to the number of CPUs on
the system. This can lower memory usage by reducing the number of
compiled LLVM modules in memory at once, particularly across several
rustc instances.

Previously, each rustc instance would assume that it should codegen
ahead of time to meet the demand of number-of-CPUs workers. But often, a
rustc instance doesn't have nearly that much concurrency available to
it, because the concurrency availability is split, via the jobserver,
across all active rustc instances spawned by the driving cargo process,
and is further limited by the `-j` flag argument. Therefore, each rustc
might have had several times the number of LLVM modules in memory than
it really needed to meet demand. If the modules were large, the effect
on memory usage would be noticeable.

With this change, the required amount of ahead-of-time codegen scales up
with the actual number of workers running within a rustc instance. Note
that the number of workers running can be less than the actual
concurrency available to a rustc instance. However, if more concurrency
is actually available, workers are spun up quickly as job tokens are
acquired, and the ahead-of-time codegen scales up quickly as well.
2021-02-15 13:02:49 -08:00
klensy
93c8ebe022 bumped smallvec deps 2021-02-14 18:03:11 +03:00
Xidorn Quan
38e4233a32 Replace const_cstr with cstr crate 2021-02-14 09:45:35 +11:00
Caleb Cartwright
0a47a38fd0 remove unused backtrace refs 2021-02-09 19:56:18 -06:00
Caleb Cartwright
6391318158 update RLS and rustfmt 2021-02-09 19:52:54 -06:00
bors
87bacf22ec Auto merge of #81132 - bugadani:map-prealloc, r=matthewjasper
Borrowck: refactor visited map to a bitset

This PR refactors `Borrows`  and the `precompute_borrows_out_of_scope` function so that this initial phase has a much reduced memory pressure. This is achieved by reducing what is stored on the heap, and also reusing heap memory as much as possible.
2021-02-09 21:28:58 +00:00
Dániel Buga
5271c628be Remove RCs from Borrows 2021-02-08 20:37:16 +01:00
Jeremy Fitzhardinge
82ccb6582a Add --extern-loc to augment unused crate dependency diagnostics
This allows a build system to indicate a location in its own dependency
specification files (eg Cargo's `Cargo.toml`) which can be reported
along side any unused crate dependency.

This supports several types of location:
 - 'json' - provide some json-structured data, which is included in the json diagnostics
     in a `tool_metadata` field
 - 'raw' - emit the provided string into the output. This also appears as a json string in
     `tool_metadata`.

If no `--extern-location` is explicitly provided then a default json entry of the form
`"tool_metadata":{"name":<cratename>,"path":<cratepath>}` is emitted.
2021-02-07 14:54:20 -08:00
Vadim Petrochenkov
dbdbd30bf2 expand/resolve: Turn #[derive] into a regular macro attribute 2021-02-07 20:08:45 +03:00
Mark Rousskov
83c34ea052 Bump clippy version 2021-02-05 18:32:28 -05:00
Tyson Nottingham
29711d8c96 rustc_codegen_ssa: tune codegen scheduling to reduce memory usage
For better throughput during parallel processing by LLVM, we used to sort
CGUs largest to smallest. This would lead to better thread utilization
by, for example, preventing a large CGU from being processed last and
having only one LLVM thread working while the rest remained idle.

However, this strategy would lead to high memory usage, as it meant the
LLVM-IR for all of the largest CGUs would be resident in memory at once.

Instead, we can compromise by ordering CGUs such that the largest and
smallest are first, second largest and smallest are next, etc. If there
are large size variations, this can reduce memory usage significantly.
2021-02-03 18:55:05 -08:00
Jack Huey
399c0a8e52
Rollup merge of #81455 - Amanieu:aarch64_ilp32, r=sanxiyn
Add AArch64 big-endian and ILP32 targets

This PR adds 3 new AArch64 targets:
- `aarch64_be-unknown-linux-gnu`
- `aarch64-unknown-linux-gnu_ilp32`
- `aarch64_be-unknown-linux-gnu_ilp32`

It also fixes some ABI issues on big-endian ARM and AArch64.
2021-02-02 16:01:35 -05:00
Jack Huey
c1623a2ee7
Rollup merge of #80593 - jackh726:chalk-upgrade, r=nikomatsakis
Upgrade Chalk

~~Blocked on rust-lang/chalk#670~~
~~Now blocked on rust-lang/chalk#680 and release~~

In addition to the straight upgrade, I also tried to fix some tests by properly returning variables and max universes in the solution. Unfortunately, this actually triggers the same perf problem that rustc traits code runs into in `canonicalizer`. Not sure what the root cause of this problem is, or why it's supposed to be solved in chalk.

r? ```@nikomatsakis```
2021-02-02 16:01:32 -05:00
Jack Huey
a0622d60e0 Update Chalk 2021-02-02 12:37:22 -05:00
Amanieu d'Antras
c3dedd0d81 Upgrade libc to 0.2.85 2021-02-02 05:49:22 +00:00
Jack Huey
4b64bc1fc9 Upgrade Chalk 2021-02-01 10:37:45 -05:00
Jonas Schievink
21d0e9b8dc
Rollup merge of #79291 - JulianKnodt:ce_priv, r=petrochenkov
Add error message for private fn

Attempts to add a more detailed error when a `const_evaluatable` fn from another scope is used inside of a scope which cannot access it.

r? ````@lcnr````
2021-02-01 14:29:29 +01:00
kadmin
6a03f0350d Add error message for private fn
Bless tests

Update with changes from comments
2021-01-31 20:45:13 +00:00
Yuki Okushi
6090c57128
Rollup merge of #81501 - calebcartwright:update-rustfmt, r=sanxiyn
update rustfmt to v1.4.34

Short summary: Various formatting fixes (several const generic related) and introduction of `imports_granularity` config option

Long summary copied from changelog:

#### Changed
- `merge_imports` configuration has been deprecated in favor of the new `imports_granularity` option. Any existing usage of `merge_imports` will be automatically mapped to the corresponding value on `imports_granularity` with a warning message printed to encourage users to update their config files.

#### Added
- New `imports_granularity` option has been added which succeeds `merge_imports`. This new option supports several additional variants which allow users to merge imports at different levels (crate or module), and even flatten imports to have a single use statement per item. ([PR rust-lang/rustfmt#4634](https://github.com/rust-lang/rustfmt/pull/4634), [PR rust-lang/rustfmt#4639](https://github.com/rust-lang/rustfmt/pull/4639))

See the section on the configuration site for more information
https://rust-lang.github.io/rustfmt/?version=v1.4.33&search=#imports_granularity

#### Fixed
- Fix erroneous removal of `const` keyword on const trait impl ([rust-lang/rustfmt#4084](https://github.com/rust-lang/rustfmt/issues/4084))
- Fix incorrect span usage wit const generics in supertraits ([rust-lang/rustfmt#4204](https://github.com/rust-lang/rustfmt/issues/4204))
- Use correct span for const generic params ([rust-lang/rustfmt#4263](https://github.com/rust-lang/rustfmt/issues/4263))
- Correct span on const generics to include type bounds ([rust-lang/rustfmt#4310](https://github.com/rust-lang/rustfmt/issues/4310))
- Idempotence issue on blocks containing only empty statements ([rust-lang/rustfmt#4627](https://github.com/rust-lang/rustfmt/issues/4627) and [#3868](https://github.com/rust-lang/rustfmt/issues/3868))
- Fix issue with semicolon placement on required functions that have a trailing comment that ends in a line-style comment before the semicolon ([rust-lang/rustfmt#4646](https://github.com/rust-lang/rustfmt/issues/4646))
- Avoid shared interned cfg_if symbol since rustfmt can re-initialize the rustc_ast globals on multiple inputs ([rust-lang/rustfmt#4656](https://github.com/rust-lang/rustfmt/issues/4656))
- Don't insert trailing comma on (base-less) rest in struct literals within macros ([rust-lang/rustfmt#4675](https://github.com/rust-lang/rustfmt/issues/4675))
2021-01-30 13:36:56 +09:00
bors
4b80687854 rustdoc tweaking
* Reuse memory
* simplify `next_def_id`, avoid multiple hashing and unnecessary lookups
* remove `all_fake_def_ids`, use the global map instead (probably not a good step toward parallelization, though...)
* convert `add_deref_target` to iterative implementation
* use `ArrayVec` where we know the max number of elements
* minor touchups here and there
* avoid building temporary vectors that get appended to other vectors

At most places I may or may not be doing the compiler's job is this PR.
2021-01-30 01:02:18 +00:00
Caleb Cartwright
63714af3a5 update rustfmt to v1.4.34 2021-01-28 22:39:38 -06:00
Yuki Okushi
788036df28
Rollup merge of #81287 - CraftSpider:json-crate, r=jyn514,GuillaumeGomez
Split rustdoc JSON types into separately versioned crate

For now just an in-tree change.

In the future, this may be exposed as a standalone crate with standard semver.
2021-01-29 09:17:34 +09:00
Aaron Hill
f9025512e7
Add SEMICOLON_IN_EXPRESSIONS_FROM_MACROS lint
cc #79813

This PR adds an allow-by-default future-compatibility lint
`SEMICOLON_IN_EXPRESSIONS_FROM_MACROS`. It fires when a trailing semicolon in a
macro body is ignored due to the macro being used in expression
position:

```rust
macro_rules! foo {
    () => {
        true; // WARN
    }
}

fn main() {
    let val = match true {
        true => false,
        _ => foo!()
    };
}
```

The lint takes its level from the macro call site, and
can be allowed for a particular macro by adding
`#[allow(semicolon_in_expressions_from_macros)]`.

The lint is set to warn for all internal rustc crates (when being built
by a stage1 compiler). After the next beta bump, we can enable
the lint for the bootstrap compiler as well.
2021-01-28 08:51:43 -05:00