Commit graph

1111 commits

Author SHA1 Message Date
bors
4afa3a8092 Auto merge of #85984 - JohnTitor:rollup-rq0g9ph, r=JohnTitor
Rollup of 8 pull requests

Successful merges:

 - #85717 (Document `From` impls for cow.rs)
 - #85850 (Remove unused feature gates)
 - #85888 (Fix typo in internal documentation for `TrustedRandomAccess`)
 - #85889 (Restoring the `num_def_ids` function in the CStore API )
 - #85899 (jsondocck small cleanup)
 - #85937 (Fix bad suggestions for code from proc_macro)
 - #85963 (Show `::{{constructor}}` in std::any::type_name().)
 - #85977 (Fix linkcheck script from getting out of sync.)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2021-06-04 04:50:36 +00:00
Yuki Okushi
5b0a49efa8
Rollup merge of #85899 - klensy:jsondocck-f, r=Mark-Simulacrum
jsondocck small cleanup

updated `shlex` (there was some fix 6db4704fca)
replaced `lazy_static` with `once_cell`
removed `serde` direct dependency (`serde_json` will pull it)
2021-06-04 13:42:57 +09:00
bors
1c82bb293c Auto merge of #85954 - flip1995:clippyup, r=Manishearth
Update Clippy

Bi-weekly Clippy update.

r? `@Manishearth`
2021-06-04 02:09:41 +00:00
flip1995
647f2b45e8
Update Cargo.lock 2021-06-03 09:06:49 +02:00
Eric Huss
7852935175 Update cargo 2021-06-01 20:38:39 -07:00
klensy
5afc594e62 replace lazy_static with once_cell, drop direct dependency on serde 2021-06-01 19:44:10 +03:00
klensy
c63cb014a0 updated shlex for jsondocck 2021-06-01 18:25:36 +03:00
Camille Gillot
0f0f3138cb
Revert "Reduce the amount of untracked state in TyCtxt" 2021-06-01 09:05:22 +02:00
bors
41278062c8 Auto merge of #85153 - cjgillot:qresolve, r=Aaron1011
Reduce the amount of untracked state in TyCtxt

Access to untracked global state may generate instances of #84970.

The GlobalCtxt contains the lowered HIR, the resolver outputs and interners.
By wrapping the resolver inside a query, we make sure those accesses are properly tracked.
As a no_hash query, all dependent queries essentially become `eval_always`,
what they should have been from the beginning.
2021-06-01 00:51:00 +00:00
Aaron Hill
a258feb6eb
Bump Miri for const_err changes
r? @RalfJung
2021-05-31 12:05:22 -05:00
Camille GILLOT
2543028161 Drop metadata_encoding_version. 2021-05-30 20:05:46 +02:00
bors
b663c0f4f6 Auto merge of #85698 - ehuss:incremental-session-panic, r=estebank
Don't panic when failing to initialize incremental directory.

This removes a panic when rustc fails to initialize the incremental directory. This can commonly happen on various filesystems that don't support locking (often various network filesystems). Panics can be confusing and scary, and there are already plenty of issues reporting this.

This has been panicking since 1.22 due to I think #44502 which was a major rework of how things work. Previously, things were simpler and the [`load_dep_graph`](https://github.com/rust-lang/rust/blob/1.21.0/src/librustc_incremental/persist/load.rs#L43-L65) function would emit an error and then continue on without panicking. With 1.22, [`load_dep_graph`](https://github.com/rust-lang/rust/blob/1.22.0/src/librustc_incremental/persist/load.rs#L44) was changed so that it assumes it can load the data without errors. Today, the problem is that it calls [`prepare_session_directory`](fbf1b1a719/compiler/rustc_interface/src/passes.rs (L175-L179)) and then immediately calls `garbage_collect_session_directories` which will panic since the session is `IncrCompSession::NotInitialized`.

The solution here is to have `prepare_session_directory` return an error that must be handled so that compilation stops if it fails.

Some other options:

* Ignore directory lock failures.
* Print a warning on directory lock failure, but otherwise continue with incremental enabled.
* Print a warning on directory lock failure, and disable incremental.
* Provide a different locking mechanism.

Cargo ignores lock errors if locking is not supported, so that would be a precedent for the first option. These options would require quite a bit more changes, but I'm happy to entertain any of them, as I think they all have valid justifications.

There is more discussion on the many issues where this is reported: #49773, #59224, #66513, #76251. I'm not sure if this can be considered closing any of those, though, since I think there is some value in discussing if there is a way to avoid the error altogether. But I think it would make sense to at least close all but one to consolidate them.
2021-05-29 19:27:53 +00:00
Dylan DPC
0c53acc6f8
Rollup merge of #85649 - ChrisDenton:update-cc, r=matthewjasper
Update cc

Recent commits have improved `cc`'s finding of MSVC tools on Windows. In particular it should help to address these issues: #83043 and #43468
2021-05-27 03:02:09 +02:00
Igor Matuszewski
b36c45d6df Update RLS 2021-05-26 14:02:26 +02:00
Eric Huss
074d667cf5 Don't panic when failing to initialize incremental directory. 2021-05-25 14:40:33 -07:00
Chris Denton
e238ee31d4
Update cc
Recent commits to cc have helped to address #83043 and #43468
2021-05-24 23:34:12 +01:00
Guillaume Gomez
a6b0b5d8fb Upgrade minifier version to 0.0.41 2021-05-20 16:51:44 +02:00
Joshua Nelson
079d1c403f Update log to 0.4.14
This avoids the following warning:

```
warning: trailing semicolon in macro used in expression position
   --> /home/joshua/.local/lib/cargo/registry/src/github.com-1ecc6299db9ec823/log-0.4.11/src/macros.rs:152:45
    |
147 | / macro_rules! debug {
148 | |     (target: $target:expr, $($arg:tt)+) => (
149 | |         log!(target: $target, $crate::Level::Debug, $($arg)+);
150 | |     );
151 | |     ($($arg:tt)+) => (
152 | |         log!($crate::Level::Debug, $($arg)+);
    | |                                             ^
153 | |     )
154 | | }
    | |_- in this expansion of `debug!`
    |
   ::: src/tools/rustfmt/src/modules/visitor.rs:36:23
    |
36  |               Err(e) => debug!("{}", e),
    |                         --------------- in this macro invocation
    |
    = note: requested on the command line with `-W semicolon-in-expressions-from-macros`
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #79813 <https://github.com/rust-lang/rust/issues/79813>
```
2021-05-14 21:54:43 -05:00
bors
75da570d78 Auto merge of #83640 - bjorn3:shared_metadata_reader, r=nagisa
Use the object crate for metadata reading

This allows sharing the metadata reader between cg_llvm, cg_clif and other codegen backends.

This is not currently useful for rlib reading with cg_spirv ([rust-gpu](https://github.com/EmbarkStudios/rust-gpu/)) as it uses tar rather than ar as .rlib format, but it is useful for dylib reading required for loading proc macros. (cc `@eddyb)`

The object crate is already trusted as dependency of libstd through backtrace. As far as I know it supports reading all object file formats used by targets for which we support rust dylibs with crate metadata, but I am not certain. If this happens to not be the case, I could keep using LLVM for reading dylib metadata.

Marked as WIP for a perf run and as it is based on #83637.
2021-05-14 12:58:58 +00:00
bors
91f2e2d218 Auto merge of #85190 - mati865:update-cc, r=Mark-Simulacrum
Update cc crate

To pull in this fix: 801a87bf2f
2021-05-14 04:12:40 +00:00
Amanieu d'Antras
d9cf2ce28f Update compiler_builtins to 0.1.43 2021-05-13 22:32:44 +01:00
Amanieu d'Antras
5918ee4317 Add support for const operands and options to global_asm!
On x86, the default syntax is also switched to Intel to match asm!
2021-05-13 22:31:57 +01:00
bors
9f6717c15e Auto merge of #85206 - ehuss:update-cargo, r=ehuss
Update cargo

8 commits in e51522ab3db23b0d8f1de54eb1f0113924896331..070e459c2d8b79c5b2ac5218064e7603329c92ae
2021-05-07 21:29:52 +0000 to 2021-05-11 18:12:23 +0000
- Fix rustdoc warnings (rust-lang/cargo#9468)
- Improve performance of git status check in `cargo package`. (rust-lang/cargo#9478)
- Link to the new rustc tests chapter. (rust-lang/cargo#9477)
- Bump index cache version to deal with semver metadata version mismatch. (rust-lang/cargo#9476)
- Fix Url::into_string deprecation warning (rust-lang/cargo#9475)
- Fix rust-lang/cargo#4482 and rust-lang/cargo#9449: set Fossil ignore and clean settings locally (rust-lang/cargo#9469)
- Improve two error messages (rust-lang/cargo#9472)
- Fix `cargo install` with a semver metadata version. (rust-lang/cargo#9467)
2021-05-12 03:32:53 +00:00
Eric Huss
f3287a68b1 Update cargo 2021-05-11 17:39:51 -07:00
Mateusz Mikuła
b04fd78d66 update cc crate
To pull in this fix: 801a87bf2f
2021-05-12 00:55:03 +02:00
klensy
dcdc308641 updated deps 2021-05-11 22:03:59 +03:00
bjorn3
b65a92fdd8 Remove wasmparser 2021-05-10 09:46:02 +02:00
Eric Huss
b0e49c798b Update cargo 2021-05-07 16:51:52 -07:00
bors
770792ff8d Auto merge of #84980 - flip1995:clippyup, r=Manishearth
Update Clippy

Bi-weekly Clippy update.

r? `@Manishearth`
2021-05-07 19:28:03 +00:00
bjorn3
267d55d44a Use the object crate for metadata reading 2021-05-07 18:48:58 +02:00
Yuki Okushi
246e8d17ff
Rollup merge of #84787 - klensy:deps-bump, r=Mark-Simulacrum
bump deps

openssl vulns:
https://rustsec.org/advisories/RUSTSEC-2021-0056.html
https://rustsec.org/advisories/RUSTSEC-2021-0055.html

openssl-src v111.12.0+1.1.1h -> v111.15.0+1.1.1k

not latest, but newer
openssl-sys v0.9.58 -> v0.9.61
openssl v0.10.30 -> v0.10.33

curl vulns: https://curl.se/docs/vuln-7.74.0.html

curl v0.4.34 -> v0.4.36
curl-sys v0.4.39+curl-7.74.0 -> v0.4.42+curl-7.76.0
2021-05-07 15:20:23 +09:00
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 -&gt; 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