Commit graph

1971 commits

Author SHA1 Message Date
bors d3edfd18c7 Auto merge of #111001 - matthiaskrgr:rollup-u590scu, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #110586 (Fix Unreadable non-UTF-8 output on localized MSVC)
 - #110652 (Add test for warning-free builds of `core` under `no_global_oom_handling`)
 - #110973 (improve error notes for packed struct reference diagnostic)
 - #110981 (Move most rustdoc-ui tests into subdirectories)
 - #110983 (rustdoc: Get `repr` information through `AdtDef` for foreign items)
 - #110984 (Do not resolve anonymous lifetimes in consts to be static.)
 - #110997 (Improve internal field comments on `slice::Iter(Mut)`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2023-04-30 00:31:02 +00:00
Matthias Krüger 734e866e63
Rollup merge of #110586 - ChrisDenton:msvc-oem-output, r=workingjubilee
Fix Unreadable non-UTF-8 output on localized MSVC

Fixes #35785 by converting non UTF-8 linker output to Unicode using the OEM code page.

Before:

```text
  = note: Non-UTF-8 output: LINK : fatal error LNK1181: cannot open input file \'m\x84rchenhaft.obj\'\r\n
```

After:

```text
   = note: LINK : fatal error LNK1181: cannot open input file 'märchenhaft.obj'
```

The difference is more dramatic if using a non-ascii language pack for Windows.
2023-04-30 01:14:55 +02:00
bors f5adff6bd8 Auto merge of #109611 - Zoxc:query-engine-rem, r=cjgillot
Remove `QueryEngine` trait

This removes the `QueryEngine` trait and `Queries` from `rustc_query_impl` and replaced them with function pointers and fields in `QuerySystem`. As a side effect `OnDiskCache` is moved back into `rustc_middle` and the `OnDiskCache` trait is also removed.

This has a couple of benefits.
- `TyCtxt` is used in the query system instead of the removed `QueryCtxt` which is larger.
- Function pointers are more flexible to work with. A variant of https://github.com/rust-lang/rust/pull/107802 is included which avoids the double indirection. For https://github.com/rust-lang/rust/pull/108938 we can name entry point `__rust_end_short_backtrace` to avoid some overhead. For https://github.com/rust-lang/rust/pull/108062 it avoids the duplicate `QueryEngine` structs.
- `QueryContext` now implements `DepContext` which avoids many `dep_context()` calls in `rustc_query_system`.
- The `rustc_driver` size is reduced by 0.33%, hopefully that means some bootstrap improvements.
- This avoids the unsafe code around the `QueryEngine` trait.

r? `@cjgillot`
2023-04-29 21:58:13 +00:00
Matthias Krüger cdcec39be6
Rollup merge of #110951 - mixi:libressl-3.7.x, r=Mark-Simulacrum
Add support for LibreSSL 3.7.x

This updates the `openssl-sys` crate to 0.9.87 to support building the toolchain against the system libraries provided by LibreSSL version 3.7.x.

LibreSSL 3.7.x has been supported since `openssl-sys` version 0.9.85.
2023-04-29 15:51:16 +02:00
Johannes Nixdorf 21ae5bd5c0 Add support for LibreSSL 3.7.x
This updates the `openssl-sys` crate to 0.9.87 to support building the
toolchain against the system libraries provided by LibreSSL version 3.7.x.

LibreSSL 3.7.x has been supported since `openssl-sys` version 0.9.85.
2023-04-28 16:29:14 +02:00
WANG Rui c7b7248a60 Bump libffi-sys to 2.3.0 2023-04-27 19:42:52 +08:00
Chris Denton 73b65746e8
Fix Unreadable non-UTF-8 output on localized MSVC
Fixes #35785 by converting non UTF-8 linker output to Unicode using the OEM code page.

Before:

```text
  = note: Non-UTF-8 output: LINK : fatal error LNK1181: cannot open input file \'m\x84rchenhaft.obj\'\r\n
```

After:

```text
   = note: LINK : fatal error LNK1181: cannot open input file 'märchenhaft.obj'

```

The difference is more dramatic if using a non-ascii language pack for Visual Studio.
2023-04-27 09:58:18 +01:00
bors e3ccd4b9a5 Auto merge of #110562 - ComputerDruid:riscv, r=tmandry
Add definitions for riscv64gc-unknown-fuchsia

To compile, also requires a libc update with https://github.com/rust-lang/libc/pull/3204
2023-04-27 01:29:50 +00:00
John Kåre Alsaker 66d85438ca Remove QueryEngine trait 2023-04-26 07:46:13 +02:00
Dan Johnson e7ed5ba773 Add definitions for riscv64gc-unknown-fuchsia 2023-04-25 16:42:59 -07:00
bors 666fee2a5f Auto merge of #110518 - loongarch-rs:update-linux-raw-sys, r=Mark-Simulacrum
Update linux-raw-sys to 0.3.4

To support LoongArch.

Changes:
```
Updating errno v0.2.8 -> v0.3.1
Updating is-terminal v0.4.4 -> v0.4.7
Updating linux-raw-sys v0.1.4 -> v0.3.4
Updating rustix v0.36.5 -> v0.37.7
Updating terminal_size v0.2.3 -> v0.2.6
  Adding windows-sys v0.48.0
```

The changes are generated by:

```bash
cargo update -p is-terminal -p terminal_size
```
2023-04-25 15:56:58 +00:00
bors f5559e3382 Auto merge of #110718 - flip1995:clippyup, r=Manishearth
Update Clippy

r? `@Manishearth`

A few days late, I was on a business trip, sorry.
2023-04-24 21:25:56 +00:00
Yuki Okushi a373623d55
Rollup merge of #110681 - klensy:cut-dep, r=lcnr
drop few unused crates, gate libc under unix for rustc_codegen_ssa

Small cleanup.
2023-04-25 02:33:29 +09:00
Philipp Krones fffef0f1d1
Update Cargo.lock 2023-04-23 13:29:28 +02:00
WANG Rui 7aa257f0ab Update dependencies
To support LoongArch.

Changes:
  Updating errno v0.2.8 -> v0.3.1
  Updating is-terminal v0.4.4 -> v0.4.7
  Updating linux-raw-sys v0.1.4 -> v0.3.4
  Updating rustix v0.36.5 -> v0.37.7
  Updating terminal_size v0.2.3 -> v0.2.6
    Adding windows-sys v0.48.0

The changes are generated by:

  cargo update -p is-terminal -p terminal_size
2023-04-23 15:58:38 +08:00
bors 61de794664 Auto merge of #110186 - Nilstrieb:update-time, r=Mark-Simulacrum
Update chrono/spdx-rs/time

This gets rid of https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-26235
2023-04-23 04:48:43 +00:00
clubby789 da5d01d53d Remove unused synstructure dep 2023-04-22 22:03:33 +01:00
nils f77541adb6 Update chrono/spdx-rs
This gets rid of https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-26235
2023-04-22 22:48:15 +02:00
klensy 3338ee3ca7 drop unused deps, gate libc under unix for one crate 2023-04-22 15:22:21 +03:00
bors 39c6804b92 Auto merge of #106704 - ecnelises:big_archive, r=bjorn3
Support AIX-style archive type

Reading facility of AIX big archive has been supported by `object` since 0.30.0.

Writing facility of AIX big archive has already been supported by `ar_archive_writer`, but we need to bump the version to support the new archive type enum.
2023-04-19 21:21:17 +00:00
Qiu Chaofan 7c8c9cf470 Bump version of object and related crates 2023-04-19 12:42:20 +08:00
Nilstrieb b5d3d970fa Add rustc_fluent_macro to decouple fluent from rustc_macros
Fluent, with all the icu4x it brings in, takes quite some time to
compile. `fluent_messages!` is only needed in further downstream rustc
crates, but is blocking more upstream crates like `rustc_index`. By
splitting it out, we allow `rustc_macros` to be compiled earlier, which
speeds up `x check compiler` by about 5 seconds (and even more after the
needless dependency on `serde_json` is removed from
`rustc_data_structures`).
2023-04-18 18:56:22 +00:00
Matthias Krüger 41ae7fcf9b
Rollup merge of #110409 - Nilstrieb:some-manual-javascript-object-notationing, r=fee1-dead
Don't use `serde_json` to serialize a simple JSON object

This avoids `rustc_data_structures` depending on `serde_json` which allows it to be compiled much earlier, unlocking most of rustc.

This used to not matter, but after #110407 we're not blocked on fluent anymore, which means that it's now a blocking edge.
![image](https://user-images.githubusercontent.com/48135649/232313178-e0150420-3020-4eb6-98d3-fe5294a8f947.png)

This saves a few more seconds.

cc ````@Zoxc```` who added it recently
2023-04-18 06:44:46 +02:00
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 7859a8e9a5 Don't use serde_json to serialize a simple JSON object
This avoids `rustc_data_structures` depending on `serde_json` which
allows it to be compiled much earlier, unlocking most of rustc.
2023-04-16 15:00:06 +02: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