Commit graph

1277 commits

Author SHA1 Message Date
Matthias Krüger
673aafe70e
Rollup merge of #90500 - xFrednet:00000-update-clippy-deps, r=flip1995
Update Clippy dependencies

Clippy has two outdated dependencies, where one indirect dependency has been flagged by rustsec for dropping a lifetime. See [RUSTSEC-2020-0146](https://rustsec.org/advisories/RUSTSEC-2020-0146). This PR updates these dependencies.

With previous dependency updates, it was tried to prevent duplicates in the `Cargo.lock` file of rust-lang/rust. I've tried to keep this in mind with this update.

* Dependency `semver`
    * Used in `src/tools/cargo/Cargo.toml` as version `1.0.3`
    * Used in `src/tools/rust-analyzer/crates/project_model/Cargo.toml` as version `1`
    * Updated in Clippy from `0.11` to `1.0` (Clippy usually defines the major and minor patch version). The `Cargo.lock` file lists `1.0.3` which is one patch version behind the most recent one but prevents a duplicate with cargo's pinned version.
* Dependency `cargo_metadata`
    * Used in several tools as `0.14`
    * Used in `src/tools/tidy` and `src/tools/rls` as `0.12`
    * Updated in Clippy from `0.12` to `0.14`

All updates to the `Cargo.lock` have been done automatically by `x.py`.

There are still some tools with these outdated dependencies. Clippy didn't require any changes, and it would be likely that the others could also be updated without any problem. Let me know if I should try to update them as well 🙃.

Keep up the good work, whoever is reading this 🦀

---

For Clippy:

changelog: none
2021-11-02 23:48:49 +01:00
xFrednet
fd41336c4c Update clippy dependencies
* semver = "0.11" -> "1.0"
* cargo_metadata = "0.12" -> "0.14"
2021-11-02 14:19:31 +01:00
Esteban Küber
c0b134582a
Lint against RTL unicode codepoints in literals and comments
Address CVE-2021-42574.
2021-10-31 13:14:04 +01:00
bors
021947d37a Auto merge of #90403 - michaelwoerister:odht-0.3.1, r=Mark-Simulacrum
Update odht crate to 0.3.1 (big-endian bugfix)

Update `odht` to 0.3.1 in order to get https://github.com/rust-lang/odht/pull/20 which fixes issue https://github.com/rust-lang/rust/issues/90123.
2021-10-30 01:01:19 +00:00
Michael Woerister
6771ac3f19 Update odht crate to 0.3.1 (big-endian bugfix) 2021-10-29 18:05:15 +02:00
Noah Lev
7865a85eb6 rustdoc: Switch to mainline rayon
The rustc fork of rayon integrates with Cargo's jobserver to limit the
amount of parallelism. However, rustdoc's use case is concurrent I/O,
which is not CPU-heavy, so it should be able to use mainline rayon.

See this discussion [1] for more details.

[1]: https://github.com/rust-lang/rust/issues/90227#issuecomment-952468618

Note: I chose rayon 1.3.1 so that the rayon version used elsewhere in
the workspace does not change.
2021-10-28 18:26:57 -07:00
Eric Huss
5001cd04a8 Update cargo 2021-10-25 20:30:21 -07:00
Matthias Krüger
c400feeb84
Rollup merge of #90087 - calebcartwright:rustfmt-subtree, r=calebcartwright
Sync rustfmt subtree

There's a large number of small fixes and new features, but nothing too big. Detailed changelog for those interested can be found in https://github.com/rust-lang/rustfmt/blob/master/CHANGELOG.md#1438-2021-10-20
2021-10-23 05:28:25 +02:00
flip1995
8d5f69de3b
Update Cargo.lock 2021-10-21 13:13:17 +02:00
Camille GILLOT
602d3cbce3 Invoke callbacks from rustc_middle. 2021-10-20 18:29:33 +02:00
Caleb Cartwright
0697f565f1 update rustfmt 2021-10-20 00:15:20 -05:00
Yuki Okushi
3d95330230
Rollup merge of #87404 - rylev:artifact-size-profiling, r=wesleywiser
Add support for artifact size profiling

This adds support for profiling artifact file sizes (incremental compilation artifacts and query cache to begin with).

Eventually we want to track this in perf.rlo so we can ensure that file sizes do not change dramatically on each pull request.

This relies on support in measureme: https://github.com/rust-lang/measureme/pull/169. Once that lands we can update this PR to not point to a git dependency.

This was worked on together with `@michaelwoerister.`

r? `@wesleywiser`
2021-10-20 04:35:11 +09:00
bors
1af55d19c7 Auto merge of #89933 - est31:let_else, r=michaelwoerister
Adopt let_else across the compiler

This performs a substitution of code following the pattern:

```
let <id> = if let <pat> = ... { identity } else { ... : ! };
```

To simplify it to:

```
let <pat> = ... { identity } else { ... : ! };
```

By adopting the `let_else` feature (cc #87335).

The PR also updates the syn crate because the currently used version of the crate doesn't support `let_else` syntax yet.

Note: Generally I'm the person who *removes* usages of unstable features from the compiler, not adds more usages of them, but in this instance I think it hopefully helps the feature get stabilized sooner and in a better state. I have written a [comment](https://github.com/rust-lang/rust/issues/87335#issuecomment-944846205) on the tracking issue about my experience and what I feel could be improved before stabilization of `let_else`.
2021-10-19 14:41:39 +00:00
bors
bd41e09da3 Auto merge of #89124 - cjgillot:owner-info, r=michaelwoerister
Index and hash HIR as part of lowering

Part of https://github.com/rust-lang/rust/pull/88186
~Based on https://github.com/rust-lang/rust/pull/88880 (see merge commit).~

Once HIR is lowered, it is later indexed by the `index_hir` query and hashed for `crate_hash`. This PR moves those post-processing steps to lowering itself. As a side objective, the HIR crate data structure is refactored as an `IndexVec<LocalDefId, Option<OwnerInfo<'hir>>>` where `OwnerInfo` stores all the relevant information for an HIR owner.

r? `@michaelwoerister`
cc `@petrochenkov`
2021-10-18 19:53:05 +00:00
est31
ef018be5c4 Update the syn crate and adopt let_else in three more places
The syn crate has gained support for let_else syntax in version 1.0.76,
see https://github.com/dtolnay/syn/pull/1057 .

In the three instances that use let_else, we've sent code through an
attr macro, which would create compile errors when there was no
let_else support in syn. To avoid this, we ran
`cargo +nightly update -p syn` for updating the syn crate.
2021-10-16 07:18:15 +02:00
Cameron Steffen
64d18d4c51 Remove unused dependencies from rustc_const_eval 2021-10-14 15:42:42 -05:00
Eric Huss
9401547cea Update cargo 2021-10-11 21:48:27 -07:00
Camille GILLOT
457de08487 Forbid hashing HIR outside of indexing. 2021-10-09 18:38:28 +02:00
Camille GILLOT
48a339ddbb Store lowering outputs per owner. 2021-10-09 11:56:29 +02:00
Jubilee
1c1c6eda94
Rollup merge of #89288 - rusticstuff:lld_wrapper, r=Mark-Simulacrum
Wrapper for `-Z gcc-ld=lld` to invoke rust-lld with the correct flavor

This PR adds an `lld-wrapper` tool which is installed as `ld` and `ld64` in `lib\rustlib\<host_target>\bin\gcc-ld` directory and whose sole purpose is to invoke `rust-lld` in the parent directory with the correct flavor. Lld decides which flavor to use from either the first two commandline arguments or from the name of the executable (`ld` for GNU/ld flavor, `ld64` for Darwin/Macos/ld64 flavor and so on). Symbolic links could not be used as they are not supported by rustup and on Windows.

The wrapper replaces full copies of rust-lld which added some significant bloat. On UNIXish operating systems it exec rust-lld, on Windows it spawns it as a child process.

Fixes #88869.

r? ```@Mark-Simulacrum```
cc ```@nagisa``` ```@petrochenkov``` ```@1000teslas```
2021-10-07 20:26:13 -07:00
Hans Kratz
6162fc0c80 Add wrapper for -Z gcc-ld=lld to invoke rust-lld with the correct flavor
The wrapper is installed as `ld` and `ld64` in the `lib\rustlib\<host_target>\bin\gcc-ld`
directory and its sole purpose is to invoke `rust-lld` in the parent directory with
the correct flavor.
2021-10-07 16:59:13 +02:00
Guillaume Gomez
ab276b82b0
Rollup merge of #89461 - crlf0710:dyn_upcasting_lint, r=nikomatsakis
Add `deref_into_dyn_supertrait` lint.

Initial implementation of #89460. Resolves #89190.
Maybe also worth a beta backport if necessary.

r? `@nikomatsakis`
2021-10-07 16:24:49 +02:00
Ryan Levick
757f76ef73 Update to measureme v10 2021-10-07 15:08:44 +02:00
Ryan Levick
947a33bf20 Add support for artifact size profiling 2021-10-07 14:22:29 +02:00
Manish Goregaokar
79a1fc8419
Rollup merge of #89531 - devnexen:stack_overflow_bsd_libc_upd, r=dtolnay
library std, libc dependency update

to solve #87528 build.
2021-10-06 12:33:22 -07:00
bors
25ec827385 Auto merge of #89363 - oli-obk:in_tracing_we_trust, r=Mark-Simulacrum
Fix performance regression with #[instrument]

linked tracing PR: https://github.com/tokio-rs/tracing/pull/1600

regression introduced by #89048
2021-10-05 12:52:43 +00:00
bors
55111d656f Auto merge of #89266 - cjgillot:session-ich, r=michaelwoerister
Move ICH to rustc_query_system

Based on https://github.com/rust-lang/rust/pull/89183

The StableHashingContext does not need to be in rustc_middle.

This PR moves it to rustc_query_system. This will avoid a dependency between rustc_ast_lowering and rustc_middle in https://github.com/rust-lang/rust/pull/89124.
2021-10-05 09:45:11 +00:00
David Carlier
c79447e708 library std, libc dependency update
to solve #87528 build.
2021-10-05 05:58:09 +01:00
Ralf Jung
e5d01785f8 update Miri 2021-10-04 18:13:00 -04:00
Camille GILLOT
02025d86ac Remove re-export. 2021-10-03 16:08:54 +02:00
Camille GILLOT
c355b2e5cd Move ICH to rustc_query_system. 2021-10-03 16:08:53 +02:00
Camille GILLOT
8961616e60 Move rustc_middle::middle::cstore to rustc_session. 2021-10-03 16:08:51 +02:00
Charles Lew
250d1260e6 Add deref_into_dyn_supertrait lint. 2021-10-03 12:36:40 +08:00
Oli Scherer
69274aa549 Bump tracing to get the instrumentation perf improvement 2021-10-02 08:22:03 +00:00
Manish Goregaokar
37df2753fc
Rollup merge of #87868 - Kixiron:packing-on-the-pounds, r=eddyb
Added -Z randomize-layout flag

An implementation of #77316, it currently randomly shuffles the fields of `repr(rust)` types based on their `DefPathHash`
r? ``@eddyb``
2021-10-01 09:18:16 -07:00
Chase Wilson
09f1542418
Implemented -Z randomize-layout 2021-09-30 14:50:06 -05:00
Camille GILLOT
b244b98e7c Move EncodedMetadata to rustc_metadata. 2021-09-30 19:41:32 +02:00
Eric Huss
72556f3b17 Update cargo 2021-09-22 15:06:52 -07:00
Michael Woerister
543a73d678 Update odht crate to 0.3.0
This version of odht contains a potential fix for #89085.
2021-09-20 15:57:45 +02:00
Eric Huss
ec64a7a3b6 Update cargo 2021-09-18 13:58:26 -07:00
bors
d6cd2c6c87 Auto merge of #82183 - michaelwoerister:lazier-defpathhash-loading2, r=wesleywiser
Simplify lazy DefPathHash decoding by using an on-disk hash table.

This PR simplifies the logic around mapping `DefPathHash` values encountered during incremental compilation to valid `DefId`s in the current session. It is able to do so by using an on-disk hash table encoding that allows for looking up values directly, i.e. without deserializing the entire table.

The main simplification comes from not having to keep track of `DefPathHashes` being used during the compilation session.
2021-09-18 14:37:39 +00:00
bors
9dd4ce80fb Auto merge of #88956 - ehuss:update-cargo, r=ehuss
Update cargo

13 commits in e515c3277bf0681bfc79a9e763861bfe26bb05db..33ee5f82edb50af87b952c5b28de0f5fb41ebf18
2021-09-08 14:32:15 +0000 to 2021-09-17 13:51:54 +0000
- Update curl-sys (rust-lang/cargo#9917)
- Bump Cargo's curl requirement to 7.79.0 (rust-lang/cargo#9914)
- Revert "When a dependency does not have a version, git or path, fails directly" (rust-lang/cargo#9911)
- Add some contributor docs for debugging testsuite tests. (rust-lang/cargo#9904)
- Fix warnings when documenting with `--document-private-items` (rust-lang/cargo#9903)
- Improve "wrong output" error. (rust-lang/cargo#9905)
- Fix warnings from better precision of `dead_code` lint (rust-lang/cargo#9906)
- Bump to 0.58.0, update changelog (rust-lang/cargo#9900)
- Fix rustc --profile=dev unstable check. (rust-lang/cargo#9898)
- config.md: fix typo (rust-lang/cargo#9896)
- Enable some tests on windows. (rust-lang/cargo#9893)
- Enable strip test on macos. (rust-lang/cargo#9889)
- Fix `cargo fix --edition` on stable. (rust-lang/cargo#9890)
2021-09-17 18:48:26 +00:00
Eric Huss
1626feebf2 Update cargo 2021-09-17 10:55:59 -07:00
Michael Woerister
4d151d92de Update odht to 0.2.1 2021-09-17 15:57:57 +02:00
bors
2c7bc5e33c Auto merge of #87867 - bjorn3:unique_type_id_interner, r=wesleywiser
Use a separate interner type for UniqueTypeId

Using symbol::Interner makes it very easy to mixup UniqueTypeId symbols
with the global interner. In fact the Debug implementation of
UniqueTypeId did exactly this.

Using a separate interner type also avoids prefilling the interner with
unused symbols and allow for optimizing the symbol interner for parallel
access without negatively affecting the single threaded module codegen.
2021-09-15 12:34:31 +00:00
Michael Woerister
d0be27c8ec Use on-disk-hash-table format for DefPathHashMap in hir::definitions. 2021-09-14 13:54:41 +02:00
bjorn3
8c7840e8cb Use a separate interner type for UniqueTypeId
Using symbol::Interner makes it very easy to mixup UniqueTypeId symbols
with the global interner. In fact the Debug implementation of
UniqueTypeId did exactly this.

Using a separate interner type also avoids prefilling the interner with
unused symbols and allow for optimizing the symbol interner for parallel
access without negatively affecting the single threaded module codegen.
2021-09-13 14:42:06 +02:00
Samuel E. Moelius III
bd4b17a532 Update lockfile 2021-09-09 07:47:22 -04:00
bors
626649ff1f Auto merge of #88615 - flip1995:clippyup, r=Manishearth
Update Clippy

r? `@Manishearth`
2021-09-08 23:52:31 +00:00
bors
97032a6dfa Auto merge of #80522 - cjgillot:borrowcrate, r=oli-obk
Split rustc_mir

The `rustc_mir` crate is the second largest in the compiler.
This PR splits it up into 5 crates:
- rustc_borrowck;
- rustc_const_eval;
- rustc_mir_dataflow;
- rustc_mir_transform;
- rustc_monomorphize.
2021-09-08 20:42:42 +00:00