Commit Graph

1947 Commits

Author SHA1 Message Date
Weihang Lo
befa5c98c9
chore: remove rustc-workspace-hack
Co-authored-by: Scott Schafer <schaferjscott@gmail.com>
Co-authored-by: Eric Huss <eric@huss.org>
2023-04-16 19:32:20 +01:00
Weihang Lo
1cfaa3431e
chore: remove Cargo features in rustc-workspace-hack 2023-04-16 19:32:20 +01:00
Weihang Lo
f795a150fe
chore: allow cargo to have its own workspace
This also

* bumps cargo to the latest in rust-lang/cargo.
* adds 0BSD to allowed list of licenses

Co-authored-by: Scott Schafer <schaferjscott@gmail.com>
Co-authored-by: Eric Huss <eric@huss.org>
2023-04-16 19:32:12 +01:00
bors
8a778ca1e3 Auto merge of #110405 - fee1-dead-contrib:rollup-9rkree6, r=fee1-dead
Rollup of 4 pull requests

Successful merges:

 - #110397 (Move some utils out of `rustc_const_eval`)
 - #110398 (use matches! macro in more places)
 - #110400 (more clippy fixes: clippy::{iter_cloned_collect, unwarp_or_else_defau…)
 - #110402 (Remove the loop in `Align::from_bytes`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2023-04-16 13:12:53 +00:00
Nilstrieb
2109fe4e4e Move some utils out of rustc_const_eval
This allows us to get rid of the `rustc_const_eval->rustc_borrowck`
dependency edge which was delaying the compilation of borrowck.

The added utils in `rustc_middle` are small and should not affect
compile times there.
2023-04-16 12:05:54 +02:00
Nilstrieb
ee8f92ba0a Use lints via lint_defs instead of lints
This gets rid of a blocking dependency edge from
`rustc_lint->rustc_analysis->rustc_hir_typeck->rustc_interface`
2023-04-16 11:48:01 +02:00
Yuki Okushi
78793869d7
Rollup merge of #106249 - Ezrashaw:suggest-test-tool, r=jyn514,albertlarsan68
Create "suggested tests" tool in `rustbuild`

Not the claimed person in #97339 but:
I've done a very rough implementation of this feature in-tree. I'm very new to `rustc` development (outside of docs) so some help would be greatly appreciated. The UI of this new subcommand obviously will change and I need some mentoring with the `--run` flag.

r? ```@jyn514```
2023-04-14 23:00:33 +09:00
bors
e4dae0dac7 Auto merge of #110079 - fee1-dead-contrib:bump-futures, r=Mark-Simulacrum
bump `futures` to use syn 2.0

cc #109302
2023-04-13 14:28:24 +00:00
Matthias Krüger
2118667ffa
Rollup merge of #110188 - Nilstrieb:remove-remove-dir-all, r=jyn514
Remove orphaned remove_dir_all implementation from rust-installer

I have no idea why it's here, but it's not used at all.

r? Mark-Simulacrum
2023-04-12 17:04:32 +02:00
Matthias Krüger
f21d8402ac
Rollup merge of #110182 - WaffleLapkin:neither, r=Nilstrieb
Use `itertools::Either` instead of own impl

Yeah.
2023-04-12 17:04:31 +02:00
bors
9df3a39fb3 Auto merge of #110198 - weihanglo:update-cargo, r=weihanglo
Update cargo

17 commits in 0e474cfd7b16b018cf46e95da3f6a5b2f1f6a9e7..7bf43f028ba5eb1f4d70d271c2546c38512c9875
2023-03-31 23:15:58 +0000 to 2023-04-10 16:01:41 +0000

- docs(pkgid): Consistently use @ (rust-lang/cargo#11956)
- Fix credential token format validation. (rust-lang/cargo#11951)
- Validate token on publish. (rust-lang/cargo#11952)
- Clarify docs on `-C` that it appears before the command. (rust-lang/cargo#11947)
- Add `try_canonicalize` and use it over `std::fs::canonicalize` (rust-lang/cargo#11866)
- Fix typo (rust-lang/cargo#11944)
- docs(changelog): Change wording about auto-fix message (rust-lang/cargo#11943)
- Update home repo URL (rust-lang/cargo#11941)
- doc(changelog): `[env]` is a table, not a stable (rust-lang/cargo#11942)
- Stop using UncanonicalizedIter for QueryKind::Exact (rust-lang/cargo#11937)
- Don't query permutations of the path prefix. (rust-lang/cargo#11936)
- Fix typo in variable name (rust-lang/cargo#11931)
- Fix Cargo warning about unused sparse configuration key (rust-lang/cargo#11930)
- Switch benchsuite to the index archive. (rust-lang/cargo#11933)
- Update git2 (rust-lang/cargo#11928)
- Publish docs: Clarify requirements about the state of the index after publish. (rust-lang/cargo#11926)
- Call out the differences between the index JSON and the API or metadata. (rust-lang/cargo#11927)
2023-04-11 21:32:48 +00:00
Weihang Lo
f7c04edadc
Update cargo 2023-04-11 19:33:57 +01:00
Philipp Krones
c355e6b9a8
Update Cargo.lock 2023-04-11 15:34:15 +02:00
nils
a11053ae08 Remove orphaned remove_dir_all implementation from rust-installer
I have no idea why it's here, but it's not used at all.
2023-04-11 14:23:31 +02:00
Maybe Waffle
0465201f77 Use itertools::Either instead of own EitherIter impl 2023-04-11 11:02:01 +00:00
bors
2a198c7f62 Auto merge of #110078 - fee1-dead-contrib:bump-serde, r=Mark-Simulacrum
Bump serde to use syn 2.0

cc #109302
2023-04-10 11:53:26 +00:00
bors
7f7e8fbc99 Auto merge of #110008 - klensy:deps-up-apr-06, r=Mark-Simulacrum
bump few deps

Update few deps to fix security vulns, future incompatibilities, duplicates.

`jemalloc-sys` v0.5.0+5.3.0 -> v0.5.3+5.3.0-patched: fixes future-incompatibilities by dropping fs_extra (https://github.com/rust-lang-ci/rust/actions/runs/4626595610/jobs/8183514150#step:26:19499, https://github.com/tikv/jemallocator/blob/tikv-jemalloc-sys-0.5.3/CHANGELOG.md)

`openssl-src` v111.22.0+1.1.1q -> v111.25.0+1.1.1t: fixes few vulns:
https://www.openssl.org/news/vulnerabilities-1.1.1.html
https://www.cve.org/CVERecord?id=CVE-2022-4304
https://www.cve.org/CVERecord?id=CVE-2022-4450
https://www.cve.org/CVERecord?id=CVE-2023-0215
https://www.cve.org/CVERecord?id=CVE-2023-0286
There exist newer openssl version 1.1.1u with low severity vulns, but no crate update yet

`openssl` crate with deps 0.10.38 ->0.10.49 fixes vulns (https://github.com/sfackler/rust-openssl/blob/openssl-v0.10.49/openssl/CHANGELOG.md)
https://rustsec.org/advisories/RUSTSEC-2023-0022
https://rustsec.org/advisories/RUSTSEC-2023-0023
https://rustsec.org/advisories/RUSTSEC-2023-0024

update `env_logger` for `rustbook` and `cargo_metadata` for `tidy` to newer versions (still used by `rustfmt`, `miri`)
2023-04-10 06:53:15 +00:00
Ezra Shaw
1e95cddc74
feat: implement basic suggest-tests tool 2023-04-09 19:59:14 +12:00
Deadbeef
2c64688d4d bump futures to use syn 2.0 2023-04-08 09:38:57 +00:00
Deadbeef
3b187c3253 Bump serde to use syn 2.0 2023-04-08 09:31:55 +00:00
bors
32ea4bb9e3 Auto merge of #109663 - fee1-dead-contrib:rustc_macros-syn-2.0, r=Nilstrieb
migrate rustc_macros to syn 2.0

WIP at this point since I need to work on migrating the code that heavily uses `NestedMeta` for parsing. Perhaps a full refactor would be nice..
2023-04-07 03:37:21 +00:00
klensy
40b6095e88 bump few deps 2023-04-06 18:21:37 +03:00
Deadbeef
af74ef8993 migrate rustc_macros to syn 2.0 2023-04-06 04:55:58 +00:00
Oli Scherer
457a162d00 Use elsa =1.7.1 as 1.8.0 was an accidental copy of 1.7.0 2023-04-05 08:07:29 +00:00
bors
48829ea74b Auto merge of #109771 - uweigand:s390x-miri-libffi, r=oli-obk
Increase libffi version to 3.2 to support s390x

libffi versions prior to 3.2 have no support for s390x, causing the Miri build to fail on our platform.
2023-04-03 19:53:24 +00:00
bors
1767585509 Auto merge of #109756 - cr1901:msp-shift, r=Mark-Simulacrum
Update compiler-builtins to 0.1.91 to bring in msp430 shift primitive…

… fixes.

This fixes unsoundness on MSP430 where `compiler-builtins` and LLVM didn't agree on the width of the shift amount argument of the shifting primitives (4 bytes vs 2 bytes). See https://github.com/rust-lang/compiler-builtins/pull/522 for more details.
2023-04-03 13:09:08 +00:00
Ulrich Weigand
09541b5e1b Increase libffi version to 3.2 to support s390x 2023-04-03 13:27:51 +02:00
Eric Huss
6e29862fd2 Update cargo 2023-04-01 08:49:20 -07:00
William D. Jones
01f49b350d Update compiler-builtins to 0.1.91 to bring in msp430 shift primitive fixes. 2023-03-30 00:39:49 -04:00
bors
f346fb0bc6 Auto merge of #108792 - Amanieu:ohos, r=petrochenkov
Add OpenHarmony targets

- `aarch64-unknown-linux-ohos`
- `armv7-unknown-linux-ohos`

Compiler team MCP: https://github.com/rust-lang/compiler-team/issues/568
2023-03-29 07:16:16 +00:00
Amanieu d'Antras
e3968be331 Add OpenHarmony targets
- `aarch64-unknown-linux-ohos`
- `armv7-unknown-linux-ohos`
2023-03-28 16:01:13 +01:00
nils
ef5ef53a6f
Rollup merge of #109562 - bjorn3:update_ar_archive_writer, r=Mark-Simulacrum
Update ar_archive_writer to 0.1.3

This updates object to 0.30 and fixes a bug where the symbol table would be omitted for archives where there are object files yet none that export any symbol. This bug could lead to linker errors for crates like rustc_std_workspace_core which don't contain any code of their own but exist solely for their dependencies. This is likely the cause of the linker issues I was experiencing on Webassembly. It has been shown to cause issues on other platforms too.

cc rust-lang/ar_archive_writer#5
2023-03-28 12:51:14 +02:00
nils
c31f75209f
Rollup merge of #108480 - Zoxc:rayon-tlv, r=cuviper
Use Rayon's TLV directly

This accesses Rayon's `TLV` thread local directly avoiding wrapper functions. This makes rustc work with https://github.com/rust-lang/rustc-rayon/pull/10.

r? `@cuviper`
2023-03-28 12:51:12 +02:00
Guillaume Gomez
bb96606f8b
Rollup merge of #109512 - fee1-dead-contrib:bump-askama_derive, r=Mark-Simulacrum
bump `askama_derive` to 0.12.1

Which uses syn 2.0.

cc #109302
2023-03-27 18:56:21 +02:00
John Kåre Alsaker
27c44d2e28 Update indexmap and rayon crates 2023-03-25 02:12:13 +01:00
bjorn3
8b1be44758 Update ar_archive_writer to 0.1.3
This updates object to 0.30 and fixes a bug where the symbol table
would be omitted for archives where there are object files yet none
that export any symbol. This bug could lead to linker errors for crates
like rustc_std_workspace_core which don't contain any code of their own
but exist solely for their dependencies. This is likely the cause of
the linker issues I was experiencing on Webassembly. It has been shown
to cause issues on other platforms too.

cc rust-lang/ar_archive_writer#5
2023-03-24 11:48:48 +00:00
Matthias Krüger
2a39cf560f
Rollup merge of #109231 - Zoxc:fs-non-canon, r=eholk
Add `try_canonicalize` to `rustc_fs_util` and use it over `fs::canonicalize`

This adds `try_canonicalize` which tries to call `fs::canonicalize`, but falls back to `std::path::absolute` if it fails. Existing `canonicalize` calls are replaced with it. `fs::canonicalize` is not guaranteed to work on Windows.
2023-03-23 19:55:45 +01:00
Matthias Krüger
acd7f878ae
Rollup merge of #107718 - Zoxc:z-time, r=nnethercote
Add `-Z time-passes-format` to allow specifying a JSON output for `-Z time-passes`

This adds back the `-Z time` option as that is useful for [my rustc benchmark tool](https://github.com/Zoxc/rcb), reverting https://github.com/rust-lang/rust/pull/102725. It now uses nanoseconds and bytes as the units so it is renamed to `time-precise`.
2023-03-23 19:55:43 +01:00
Deadbeef
a912a93acc bump askama_derive to 0.12.1 2023-03-23 06:19:25 +00:00
Matthias Krüger
950aa3ef86
Rollup merge of #109213 - oli-obk:cstore, r=cjgillot
Eagerly intern and check CrateNum/StableCrateId collisions

r? ``@cjgillot``

It seems better to check things ahead of time than checking them afterwards.
The [previous version](https://github.com/rust-lang/rust/pull/108390) was a bit nonsensical, so this addresses the feedback
2023-03-22 22:44:40 +01:00
Weihang Lo
30cef3a292
Update cargo 2023-03-22 07:22:51 +08:00
John Kåre Alsaker
f60d2eb6c1 Add -Z time-passes-format to allow specifying a JSON output for -Z time-passes 2023-03-21 18:18:25 +01:00
Oli Scherer
460ecd288a Eagerly intern and check CrateNum/StableCrateId collisions 2023-03-21 12:08:17 +00:00
bors
44f5180584 Auto merge of #106610 - euclio:windows-rs, r=ChrisDenton
migrate compiler, bootstrap and compiletest to windows-rs

This PR migrates the compiler, bootstrap, and compiletest to use [windows-rs](https://github.com/microsoft/windows-rs) instead of winapi-rs. windows-rs is the bindings crate provided by Microsoft, and is actively maintained compared to winapi-rs. Not all ecosystem crates have migrated over yet, so there will be a period of time where both crates are used.

windows-rs also provides some nice ergonomics over winapi-rs to convert return values to `Result`s (which found a case where we forgot to check the return value of `CreateFileW`).
2023-03-20 20:05:45 +00:00
Andy Russell
bb7c373fdf
migrate compiler, bootstrap, and compiletest to windows-rs 2023-03-20 13:19:35 -04:00
Eric Huss
18ea16c8a0 Update mdbook 2023-03-19 14:49:42 -07:00
The 8472
7cce618d18 Fast path that skips over unchanged obligations in process_obligations
- only borrow the refcell once per loop
- avoid complex matches to reduce branch paths in the hot loop
- use a by-ref fast path that avoids mutations at the expense of having false negatives
2023-03-17 19:56:03 +01:00
John Kåre Alsaker
4f7cd3d459 Add try_canonicalize to rustc_fs_util and use it over fs::canonicalize 2023-03-16 21:50:23 +01:00
Matthias Krüger
6cf2f470b0
Rollup merge of #109139 - GuillaumeGomez:rustdoc-windows-wait-for-write, r=notriddle
rustdoc: DocFS: Replace rayon with threadpool and enable it for all targets

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

Switching to `threadpool` makes it a bit simpler for us to wait for all tasks in `DocFS` directly in the `Drop` implementation. I'm also curious if making all the writes into a thread pool could improve run time for rustdoc on all other platforms than Windows as well.

I'll run a perf check to see.

cc ```@ehuss```
r? ```@notriddle```
2023-03-16 08:57:06 +01:00
Dylan DPC
a08516be86
Rollup merge of #109150 - weihanglo:update-cargo, r=weihanglo
Update cargo

14 commits in 7d3033d2e59383fd76193daf9423c3d141972a7d..4a3c588b1f0a8e2dc8dd8789dbf3b6a71b02ed49
2023-03-08 17:05:08 +0000 to 2023-03-14 14:05:36 +0000
- ci: make clean-test-output a script for reuse (rust-lang/cargo#11848)
- Accurately show status when downgrading dependencies (rust-lang/cargo#11839)
- docs(contrib): Move Design Principles earlier in the book (rust-lang/cargo#11842)
- docs(contrib): Point compilation docs to doc comments (rust-lang/cargo#11841)
- `cargo install --git` multiple packages with binaries found hint (rust-lang/cargo#11835)
- Disable flaky auth tests when `gitoxide` runs them (rust-lang/cargo#11830)
- Add some documentation on writing cross-compilation tests (rust-lang/cargo#11825)
- chore: Use sparse protocol on stable CI (rust-lang/cargo#11829)
- Notice for potential unexpected shell expansions in help text of `cargo-add` (rust-lang/cargo#11826)
- Add tracking issue to gitoxide unstable docs (rust-lang/cargo#11822)
- Bump crates-io to 0.36.0 (rust-lang/cargo#11820)
- Bump to 0.71.0; update changelog (rust-lang/cargo#11815)
- docs(contrib): Move overview to lib (rust-lang/cargo#11809)
- Fix semver check for 1.68 (rust-lang/cargo#11817)

r? `@ghost`
2023-03-15 17:51:33 +05:30