Commit Graph

2595 Commits

Author SHA1 Message Date
Matthias Krüger cce2db06c0
Rollup merge of #127528 - estebank:ascii-control-chars, r=oli-obk
Replace ASCII control chars with Unicode Control Pictures

Replace ASCII control chars like `CR` with Unicode Control Pictures like `␍`:

```
error: bare CR not allowed in doc-comment
  --> $DIR/lex-bare-cr-string-literal-doc-comment.rs:3:32
   |
LL | /// doc comment with bare CR: '␍'
   |                                ^
```

Centralize the checking of unicode char width for the purposes of CLI display in one place. Account for the new replacements. Remove unneeded tracking of "zero-width" unicode chars, as we calculate these in the `SourceMap` as needed now.
2024-07-25 04:43:19 +02:00
Guillaume Gomez 8d40b9ea6c Replace askama with rinja 2024-07-23 11:19:55 +02:00
Eric Huss 5dfa062b87 Move rustbook to its own workspace. 2024-07-22 07:20:57 -07:00
Trevor Gross 51827ce4e4 Move `test-float-parse` to the global workspace
Since `test-float-parse` is now implemented in Rust, we can move it into
the global workspace and check dependency licenses.
2024-07-20 11:39:34 -05:00
Esteban Küber 2d7795dfb9 Be more accurate about calculating `display_col` from a `BytePos`
No longer track "zero-width" chars in `SourceMap`, read directly from the line when calculating the `display_col` of a `BytePos`. Move `char_width` to `rustc_span` and use it from the emitter.

This change allows the following to properly align in terminals (depending on the font, the replaced control codepoints are rendered as 1 or 2 width, on my terminal they are rendered as 1, on VSCode text they are rendered as 2):

```
error: this file contains an unclosed delimiter
  --> $DIR/issue-68629.rs:5:17
   |
LL | ␜␟ts␀![{i
   |       -- unclosed delimiter
   |       |
   |       unclosed delimiter
LL | ␀␀  fn rݻoa>rݻm
   |                ^
```
2024-07-18 20:08:38 +00:00
Ralf Jung e613bc92a1 const_to_pat: cleanup leftovers from when we had to deal with non-structural constants 2024-07-18 11:58:16 +02:00
bors 1a6e777c3c Auto merge of #126208 - Oneirical:one-flew-over-the-cuckoo's-test, r=jieyouxu
Migrate `compiler-lookup-paths`, `dump-mono-stats` and `prune-link-args` `run-make` tests to `rmake` or `ui` format

Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html).

try-job: x86_64-msvc
try-job: aarch64-apple
try-job: dist-x86_64-linux
try-job: armhf-gnu
2024-07-17 01:09:18 +00:00
Trevor Gross 4e4fa7eb37
Rollup merge of #126967 - alexcrichton:wasm32-wasip2-tier-2, r=Mark-Simulacrum
Promote the `wasm32-wasip2` target to Tier 2

This commit promotes the `wasm32-wasip2` Rust target to tier 2 as proposed in rust-lang/compiler-team#760. There are two major changes in this PR:

1. The `dist-various-2` container, which already produces the other WASI targets, now has an extra target added for `wasm32-wasip2`.
2. A new `wasm-component-ld` binary is added to all host toolchains when LLD is enabled. This is the linker used for the `wasm32-wasip2` target.

This new linker is added for all host toolchains to ensure that all host toolchains can produce the `wasm32-wasip2` target. This is similar to how `rust-lld` was originally included for all host toolchains to be able to produce WebAssembly output when the targets were first added. The new linker is developed [here][wasm-component-ld] and is pulled in via a crates.io-based dependency to the tree here.

[wasm-component-ld]: https://github.com/bytecodealliance/wasm-component-ld
2024-07-16 16:15:15 -05:00
Trevor Gross 63f239c89f
Rollup merge of #124033 - bjorn3:ar_archive_writer_0_3_0, r=davidtwco
Sync ar_archive_writer to LLVM 18.1.3

From LLVM 15.0.0-rc3. This adds support for COFF archives containing Arm64EC object files and has various fixes for AIX big archive files.
2024-07-16 16:15:13 -05:00
Oneirical ea2b699b94 build_native_static_lib with llvm_ar for run_make_support 2024-07-16 15:34:04 -04:00
Mrmaxmeier 664907cab6 run-make-support: update gimli to 0.31.0 2024-07-16 11:01:35 +02:00
Pavel Grigorenko 168096f663 rustc_type_ir: derivative -> derive-where 2024-07-12 21:52:04 +03:00
Pavel Grigorenko 70a11c7ba9 rustc_next_trait_solver: derivative -> derive-where 2024-07-12 21:48:16 +03:00
Pavel Grigorenko 35ba700d5e rustc_span: derivative -> derive-where 2024-07-12 21:37:43 +03:00
Pavel Grigorenko fd16a0efeb rustc_middle: derivative -> derive-where 2024-07-12 21:33:02 +03:00
Jakub Beránek 97990a4759
Move `DropBomb` from `run-make-support` to `build_helper`
So that it can be also used in bootstrap.
2024-07-12 20:14:37 +02:00
Urgau 977439d9b8 Use uplifted `rustc-stable-hash` crate in `rustc_data_structures` 2024-07-11 16:51:16 +02:00
Alex Crichton 2a3e22bf04 Promote the `wasm32-wasip2` target to Tier 2
This commit promotes the `wasm32-wasip2` Rust target to tier 2 as
proposed in rust-lang/compiler-team#760. There are two major changes in
this PR:

1. The `dist-various-2` container, which already produces the other WASI
   targets, now has an extra target added for `wasm32-wasip2`.
2. A new `wasm-component-ld` binary is added to all host toolchains when
   LLD is enabled. This is the linker used for the `wasm32-wasip2` target.

This new linker is added for all host toolchains to ensure that all host
toolchains can produce the `wasm32-wasip2` target. This is similar to
how `rust-lld` was originally included for all host toolchains to be
able to produce WebAssembly output when the targets were first added.
The new linker is developed [here][wasm-component-ld] and is pulled in
via a crates.io-based dependency to the tree here.

[wasm-component-ld]: https://github.com/bytecodealliance/wasm-component-ld
2024-07-09 12:11:08 -07:00
bjorn3 58e551433d Sync ar_archive_writer to LLVM 18.1.3
From LLVM 15.0.0-rc3. This adds support for COFF archives containing
Arm64EC object files and has various fixes for AIX big archive files.
2024-07-07 16:56:35 +00:00
Michael Goulet e5d6a416e8 Uplift PredicateEmittingRelation first 2024-07-06 10:05:49 -04:00
Michael Goulet 27588d1de3 Split SolverDelegate back out from InferCtxtLike 2024-07-05 16:39:39 -04:00
Chris Denton 34860a56f0
Update windows-bindgen to 0.58.0 2024-07-04 12:18:38 +00:00
Michael Howell 294c3dda88 rustdoc: add usable lint for pulldown-cmark-0.11 parsing changes 2024-07-01 07:21:02 -07:00
Michael Howell 15fbe618a1 rustdoc: update to pulldown-cmark 0.11 2024-06-30 18:33:48 -07:00
Matthias Krüger 515d17cd15
Rollup merge of #127131 - Kobzol:remove-unused-deps, r=compiler-errors
Remove unused `rustc_trait_selection` dependencies

Found using `cargo-machete`. The `bitflags` and `derivative` crates were added for the new trait solver, but weren't removed when the next trait solver code was uplifted to a separate crate.
2024-06-30 10:39:48 +02:00
Matthias Krüger 6d74ffd238
Rollup merge of #127002 - Kobzol:bootstrap-perf-tool, r=onur-ozkan
Implement `x perf` as a separate tool

Continues work from https://github.com/rust-lang/rust/pull/126318, adds a CLI for running `rustc-perf` profiling commands through a new `rustc-perf-wrapper` tool. The CLI is in a separate tool to enable experimentation outside of `bootstrap`.

This is probably most of what we can do so far, I'll add support for benchmarking once `rustc-perf` gets a terminal output for comparing benchmark results.

r? ``@onur-ozkan``
2024-06-29 22:10:56 +02:00
Jakub Beránek e52d95bc82 Remove unused compiler dependencies 2024-06-29 22:09:58 +02:00
Oneirical 1795082842 rmeta_contains functions for remap-path-prefix 2024-06-28 16:30:17 -04:00
Adwin White 84071e2662 Support fetching `Attribute` of items. 2024-06-28 13:24:41 +08:00
Guillaume Gomez 3394fe89d8 Add `ar` command in `run-make-support` 2024-06-27 14:04:46 +02:00
Jakub Beránek 151986f493 Implement `x perf` as a separate tool 2024-06-27 10:22:03 +02:00
Stephen Skeirik 414ebeaeea add serde derive Serialize to stable_mir 2024-06-26 11:56:01 -04:00
DianQK de0ece2f29
Add clang-format to the external tool check 2024-06-26 20:16:52 +08:00
Matthias Krüger dcace866f0
Rollup merge of #126845 - rust-lang:cargo_update, r=Mark-Simulacrum
Weekly `cargo update`

Automation to keep dependencies in `Cargo.lock` current.

The following is the output from `cargo update`:

```txt
     Locking 9 packages to latest compatible versions
    Updating clap_complete v4.5.5 -> v4.5.6
    Updating displaydoc v0.2.4 -> v0.2.5
    Removing icu_collections v1.5.0
    Removing icu_normalizer v1.5.0
    Removing icu_normalizer_data v1.5.0
    Removing icu_properties v1.5.0
    Removing icu_properties_data v1.5.0
 Downgrading idna v1.0.0 -> v0.5.0 (latest: v1.0.1)
    Updating lazy_static v1.4.0 -> v1.5.0
    Updating miniz_oxide v0.7.3 -> v0.7.4
    Updating proc-macro2 v1.0.85 -> v1.0.86
    Updating syn v2.0.66 -> v2.0.67
      Adding unicode-bidi v0.3.15
    Updating url v2.5.1 -> v2.5.2
    Removing utf16_iter v1.0.5
    Removing utf8_iter v1.0.4
    Removing write16 v1.0.0
note: pass `--verbose` to see 85 unchanged dependencies behind latest
```
2024-06-24 06:27:15 +02:00
Matthias Krüger f016552b1c
Rollup merge of #126230 - onur-ozkan:followup-126225, r=Mark-Simulacrum
tidy: skip submodules if not present for non-CI environments

Right now tidy requires rustc-perf to be fetched as it checks its license, but this doesn't make sense for most contributors since rustc-perf is a dist-specific tool and its license will not change frequently, especially during compiler development. This PR makes tidy to skip rustc-perf if it's not fetched and if it's not running in CI.

Applies https://github.com/rust-lang/rust/pull/126225#issuecomment-2158143674 and reverts #126225.
2024-06-23 22:38:58 +02:00
github-actions 990535723d cargo update
Locking 9 packages to latest compatible versions
    Updating clap_complete v4.5.5 -> v4.5.6
    Updating displaydoc v0.2.4 -> v0.2.5
    Removing icu_collections v1.5.0
    Removing icu_normalizer v1.5.0
    Removing icu_normalizer_data v1.5.0
    Removing icu_properties v1.5.0
    Removing icu_properties_data v1.5.0
 Downgrading idna v1.0.0 -> v0.5.0 (latest: v1.0.1)
    Updating lazy_static v1.4.0 -> v1.5.0
    Updating miniz_oxide v0.7.3 -> v0.7.4
    Updating proc-macro2 v1.0.85 -> v1.0.86
    Updating syn v2.0.66 -> v2.0.67
      Adding unicode-bidi v0.3.15
    Updating url v2.5.1 -> v2.5.2
    Removing utf16_iter v1.0.5
    Removing utf8_iter v1.0.4
    Removing write16 v1.0.0
note: pass `--verbose` to see 85 unchanged dependencies behind latest
2024-06-23 00:18:08 +00:00
Caleb Cartwright ffad9842bd update rustfmt version 2024-06-22 16:22:00 -05:00
Michael Goulet ffd72b1700 Fix remaining cases 2024-06-21 19:00:18 -04:00
bors 25c9f2ca06 Auto merge of #123165 - oli-obk:no_ord_def_id3, r=cjgillot
Stop sorting `Span`s' `SyntaxContext`, as that is incompatible with incremental

work towards https://github.com/rust-lang/rust/issues/90317

Luckily no one actually needed these to be sorted, so it didn't even affect diagnostics. I'm guessing they'd have been sorted by creation time anyway, so it wouldn't really have mattered.

r? `@cjgillot`
2024-06-21 13:47:43 +00:00
Matthias Krüger d3f5e7b2d6
Rollup merge of #126636 - tgross35:clippy-f16-f128-fixme, r=flip1995
Resolve Clippy `f16` and `f128` `unimplemented!`/`FIXME`s

This was originally a PR against the Clippy repo, https://github.com/rust-lang/rust-clippy/pull/12950

r? ``@flip1995``

Tracking issue: https://github.com/rust-lang/rust/issues/116909
Fixes: https://github.com/rust-lang/rust/pull/126636
2024-06-20 14:07:01 +02:00
Matthias Krüger 8ddc8921ff
Rollup merge of #126649 - compiler-errors:nightly, r=lcnr
Fix `feature = "nightly"` in the new trait solver

r? lcnr
2024-06-20 07:52:44 +02:00
Trevor Gross ff9efea646 Resolve Clippy `f16` and `f128` `unimplemented!`/`FIXME`s
This removes the ICE codepaths for `f16` and `f128` in Clippy.
`rustc_apfloat` is used as a dependency for the parsing of these types,
since their `FromStr` implementation will not be available in the
standard library for a while.
2024-06-19 13:30:21 -04:00
Zalathar fd4fe7d129 Remove `src/tools/rust-demangler` 2024-06-19 20:41:34 +10:00
Michael Goulet 9b0f9ef42e Make rustc_next_trait_solver nightly again 2024-06-18 18:52:48 -04:00
Michael Goulet 532149eb88 Uplift the new trait solver 2024-06-18 10:55:34 -04:00
onur-ozkan e9e3c38d01 tidy: skip submodules if not present for non-CI environments
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-06-17 07:56:06 +03:00
许杰友 Jieyou Xu (Joe) edfadbf692
Rollup merge of #126524 - klensy:bump-15-06-24, r=onur-ozkan
bump few deps

This bump deps to cut dupes:

Updating html5ever 0.27
Updating derive_more 0.99.18
Updating crossbeam-deque v0.8.5
Updating crossbeam-epoch v0.9.18
Updating crossbeam-utils v0.8.20
Updating junction v1.1.0

No interesting changes in changelogs.
2024-06-16 21:14:41 +01:00
github-actions 729ed8194f cargo update
Locking 18 packages to latest compatible versions
    Updating annotate-snippets v0.11.3 -> v0.11.4
    Updating clap v4.5.6 -> v4.5.7
    Updating clap_builder v4.5.6 -> v4.5.7
    Updating derive_more v0.99.17 -> v0.99.18
      Adding icu_collections v1.5.0
      Adding icu_normalizer v1.5.0
      Adding icu_normalizer_data v1.5.0
      Adding icu_properties v1.5.0
      Adding icu_properties_data v1.5.0
    Updating idna v0.5.0 -> v1.0.0
    Updating mdbook-i18n-helpers v0.3.3 -> v0.3.4
    Updating redox_syscall v0.5.1 -> v0.5.2
    Updating regex-lite v0.1.5 -> v0.1.6
    Updating regex-syntax v0.8.3 -> v0.8.4
    Removing unicode-bidi v0.3.15
    Updating url v2.5.0 -> v2.5.1
      Adding utf16_iter v1.0.5
      Adding utf8_iter v1.0.4
      Adding write16 v1.0.0
note: pass `--verbose` to see 88 unchanged dependencies behind latest
2024-06-16 00:18:06 +00:00
Guillaume Gomez 4f83c1d967
Rollup merge of #126229 - ChrisDenton:bindgen, r=Mark-Simulacrum
Bump windows-bindgen to 0.57

This PR updates our generated Windows API bindings using the latest version of `windows-bindgen`.

The only change to the generated code is that `derive` is used for `Copy` and `Clone` instead of `impl`.
2024-06-15 19:51:34 +02:00
klensy 52242f2c72 bump few deps 2024-06-15 18:53:45 +03:00
bors f9515fdd5a Auto merge of #126473 - matthiaskrgr:rollup-8w2xm09, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #123769 (Improve escaping of byte, byte str, and c str proc-macro literals)
 - #126054 (`E0229`: Suggest Moving Type Constraints to Type Parameter Declaration)
 - #126135 (add HermitOS support for vectored read/write operations)
 - #126266 (Unify guarantees about the default allocator)
 - #126285 (`UniqueRc`: support allocators and `T: ?Sized`.)
 - #126399 (extend the check for LLVM build)
 - #126426 (const validation: fix ICE on dangling ZST reference)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-06-14 11:29:58 +00:00
Matthias Krüger 6396d4c846
Rollup merge of #126135 - hermit-os:fuse, r=jhpratt
add HermitOS support for vectored read/write operations

In general, the I/O interface of hermit-abi is revised and now a more POSIX-like interface. Consequently, platform abstraction layer for HermitOS has slightly adjusted and some inaccuracies remove.

Hermit is a tier 3 platform and this PR changes only files, wich are related to the tier 3 platform.
2024-06-14 12:23:36 +02:00
Matthias Krüger 9f2fc640f3
Rollup merge of #126368 - nnethercote:rm-more-unused-crate-deps, r=jackh726
Remove some unnecessary crate dependencies.

A follow-up to #126063.

r? ``@jackh726``
2024-06-14 08:35:50 +02:00
bors f1586001ac Auto merge of #126398 - flip1995:clippy-subtree-update, r=Manishearth
Clippy subtree update

r? `@Manishearth`

Updates `Cargo.lock` with Clippy version bump.
2024-06-13 16:17:56 +00:00
Philipp Krones 17d28564a8
Update Cargo.lock 2024-06-13 12:31:02 +02:00
Nicholas Nethercote 12432130a3 Remove some unnecessary crate dependencies. 2024-06-13 15:03:43 +10:00
许杰友 Jieyou Xu (Joe) f6ab5e997c run-make-support: bump version 2024-06-11 21:31:08 +00:00
许杰友 Jieyou Xu (Joe) d308a70890 run-make-support: bump version 2024-06-11 09:14:28 +00:00
Chris Denton 8bd8f599eb
Bump windows-bindgen to 0.57 2024-06-10 13:51:29 +00:00
Nicholas Nethercote 29629d0075 Remove some unused crate dependencies.
I found these by setting the `unused_crate_dependencies` lint
temporarily to `Warn`.
2024-06-10 19:55:49 +10:00
clubby789 d42c9607f8 Run `cargo update` 2024-06-09 07:47:51 +01:00
clubby789 dcd03aadd2 Update `r-efi` 2024-06-09 07:47:50 +01:00
clubby789 9d85dfc3e6 Update `icu4x` dependencies 2024-06-09 07:47:42 +01:00
Stefan Lankes 1f125a6716 add HermitOS support of vectored read/write operations
In general, the I/O interface of hermit-abi is more POSIX-like
interface. Consequently, platform abstraction layer for HermitOS
has slightly adjusted and some inaccuracies remove.
2024-06-07 20:48:30 +02:00
bors e3c3ce62d7 Auto merge of #126110 - workingjubilee:backtrace-0.3.73, r=workingjubilee
Update backtrace to 0.3.73

Fixes #126109

r? `@ghost`
2024-06-07 14:44:46 +00:00
Jubilee Young 49c2a1dda9 Update backtrace to 0.3.73 2024-06-06 22:50:45 -07:00
Michael Goulet 91274c84b9 Uplift TypeRelation and Relate 2024-06-06 07:50:19 -04:00
Michael Goulet c74efbca71 Make middle not rely on next_trait_solver 2024-06-06 07:49:47 -04:00
dalance 9d1ec7ea06 Add translation support by mdbook-i18n-helpers to bootstrap 2024-06-03 16:48:27 +09:00
bors 20be84a7e6 Auto merge of #125408 - chriskrycho:chriskrycho/book-updates, r=ehuss
Support mdBook preprocessors for TRPL in rustbook

`rust-lang/book` recently added two mdBook preprocessors. Enable `rustbook` to use those preprocessors for books where they are requested by the `book.toml` by adding the preprocessors as path dependencies, and ignoring them where they are not requested, i.e. by all the books other than TRPL at present.

Addresses rust-lang/book#3927
2024-05-31 18:30:15 +00:00
Jubilee 8e89f83cbb
Rollup merge of #125089 - Urgau:non_local_def-suggestions, r=estebank
Improve diagnostic output the `non_local_definitions` lint

This PR improves (or at least tries to improve) the diagnostic output the `non_local_definitions` lint, by simplifying the wording, by adding a "sort of" explanation of bounds interaction that leak the impl...

This PR is best reviewed commit by commit and is voluntarily made a bit vague as to have a starting point to improve on.

Related to https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/non_local_defs.20wording.20improvements

Fixes https://github.com/rust-lang/rust/issues/125068
Fixes https://github.com/rust-lang/rust/issues/124396
cc ```@workingjubilee```
r? ```@estebank```
2024-05-28 02:07:47 -07:00
Jubilee Young 3ec9d8db27 Sync libstd deps with backtrace 2024-05-27 19:53:41 -07:00
Urgau 98273ec612 non_local_defs: point to Self and Trait to give more context 2024-05-27 23:59:18 +02:00
Michael Goulet 993553ceb8 Uplift EarlyBinder 2024-05-26 20:45:37 -04:00
Jubilee Young db6ec2618a compiler: const_eval/transform/validate.rs -> mir_transform/validate.rs 2024-05-24 09:56:56 -07:00
Chris Krycho 2c9fc62b81
Support mdBook preprocessors for TRPL in rustbook
`rust-lang/book` recently added two mdBook preprocessors. Enable
`rustbook` to use those preprocessors for books where they are requested
by the `book.toml` by adding the preprocessors as path dependencies, and
ignoring them where they are not requested, i.e. by all the books other
than TRPL at present.
2024-05-22 17:28:55 -06:00
Bernardo Meurer Costa 95c05c3e37 refactor(opt-dist): use rustc-perf from rustc checkout
This replaces the hardcoded rustc-perf commit and ad-hoc downloading and
unpacking of its zipped source with defaulting to use the new rustc-perf
submodule.

While it would be nice to make `opt-dist` able to initialize the
submodule automatically when pointing to a Rust checkout _other_ than
the one opt-dist was built in, that would require a bigger refactor that
moved `update_submodule`, from bootstrap, into build_helper.

Regardless, I imagine it must be quite rare to use `opt-dist` with a
checkout that is neither from a rust-src tarball (which will contain the
submodule), nor the checkout opt-dist itself was built (bootstrap will
update the submodule when opt-dist is built).
2024-05-20 15:01:10 +00:00
bors e8ada6ab25 Auto merge of #125313 - matthiaskrgr:rollup-65etxv0, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #125034 (Weekly `cargo update`)
 - #125093 (Add `fn into_raw_with_allocator` to Rc/Arc/Weak.)
 - #125282 (Never type unsafe lint improvements)
 - #125301 (fix suggestion in E0373 for !Unpin coroutines)
 - #125302 (defrost `RUST_MIN_STACK=ice rustc hello.rs`)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-05-20 07:58:40 +00:00
Matthias Krüger af6da61ea4
Rollup merge of #125034 - rust-lang:cargo_update, r=Mark-Simulacrum
Weekly `cargo update`

Automation to keep dependencies in `Cargo.lock` current.

The following is the output from `cargo update`:

```txt
     Locking 24 packages to latest compatible versions
    Updating ammonia v3.3.0 -> v4.0.0
    Updating anyhow v1.0.83 -> v1.0.86
    Updating camino v1.1.6 -> v1.1.7
    Updating darling v0.20.8 -> v0.20.9
    Updating darling_core v0.20.8 -> v0.20.9
    Updating darling_macro v0.20.8 -> v0.20.9
      Adding dbus v0.9.7
    Updating either v1.11.0 -> v1.12.0
      Adding html5ever v0.27.0
    Updating instant v0.1.12 -> v0.1.13
      Adding libdbus-sys v0.2.5
    Updating linux-raw-sys v0.4.13 -> v0.4.14 (latest: v0.6.4)
      Adding markup5ever v0.12.1
    Updating mdbook v0.4.37 -> v0.4.40
    Updating miniz_oxide v0.7.2 -> v0.7.3
      Adding opener v0.7.1
    Updating rustversion v1.0.16 -> v1.0.17
    Updating serde v1.0.201 -> v1.0.202
    Updating serde_derive v1.0.201 -> v1.0.202
    Updating serde_spanned v0.6.5 -> v0.6.6
    Removing strsim v0.10.0
    Updating syn v2.0.62 -> v2.0.64
    Updating thiserror v1.0.60 -> v1.0.61
    Updating thiserror-impl v1.0.60 -> v1.0.61
    Updating toml_datetime v0.6.5 -> v0.6.6
note: pass `--verbose` to see 96 unchanged dependencies behind latest
```
2024-05-20 08:31:40 +02:00
bors f092f73c11 Auto merge of #124560 - madsmtm:update-libc, r=Mark-Simulacrum
Update libc to 0.2.155

Motivation: To fix `-Zbuild-std` / Xargo for visionOS targets.

EDIT: Blocked on ~https://github.com/rust-lang/libc/issues/3608 / https://github.com/rust-lang/libc/pull/3609~ ~https://github.com/rust-lang/libc/pull/3682 and https://github.com/rust-lang/libc/pull/3690~ No longer blocked.
2024-05-20 05:50:24 +00:00
Ralf Jung e93268eee2 update lockfile 2024-05-19 20:31:08 +02:00
github-actions 36c09337b9 cargo update
Locking 24 packages to latest compatible versions
    Updating ammonia v3.3.0 -> v4.0.0
    Updating anyhow v1.0.83 -> v1.0.86
    Updating camino v1.1.6 -> v1.1.7
    Updating darling v0.20.8 -> v0.20.9
    Updating darling_core v0.20.8 -> v0.20.9
    Updating darling_macro v0.20.8 -> v0.20.9
      Adding dbus v0.9.7
    Updating either v1.11.0 -> v1.12.0
      Adding html5ever v0.27.0
    Updating instant v0.1.12 -> v0.1.13
      Adding libdbus-sys v0.2.5
    Updating linux-raw-sys v0.4.13 -> v0.4.14 (latest: v0.6.4)
      Adding markup5ever v0.12.1
    Updating mdbook v0.4.37 -> v0.4.40
    Updating miniz_oxide v0.7.2 -> v0.7.3
      Adding opener v0.7.1
    Updating rustversion v1.0.16 -> v1.0.17
    Updating serde v1.0.201 -> v1.0.202
    Updating serde_derive v1.0.201 -> v1.0.202
    Updating serde_spanned v0.6.5 -> v0.6.6
    Removing strsim v0.10.0
    Updating syn v2.0.62 -> v2.0.64
    Updating thiserror v1.0.60 -> v1.0.61
    Updating thiserror-impl v1.0.60 -> v1.0.61
    Updating toml_datetime v0.6.5 -> v0.6.6
note: pass `--verbose` to see 96 unchanged dependencies behind latest
2024-05-19 00:17:38 +00:00
Michael Goulet 8e1dba4617 Move NormalizesTo back down
I tried to rebase this down into the first commit but it is WAY too
annoying x
2024-05-18 16:21:43 -04:00
Michael Goulet 6ee22e184f Make proof tree building generic 2024-05-18 16:21:43 -04:00
Michael Goulet 05e0f8740a Uplift GenericArgKind, CanonicalVarValues, QueryInput
and make NestedGoals generic
2024-05-18 16:21:43 -04:00
Mads Marquart 74012d5200 Update libc to 0.2.155 2024-05-18 00:48:57 +02:00
bors ef0027897d Auto merge of #124639 - Jules-Bertholet:match-ergonomics-2024-migration-lint, r=Nadrieril
Match ergonomics 2024: migration lint

Depends on #124567

r? `@Nadrieril`

cc https://github.com/rust-lang/rust/issues/123076

`@rustbot` label A-edition-2024 A-patterns
2024-05-12 19:58:50 +00:00
Jules Bertholet 9d92a7f355
Match ergonomics 2024: migration lint
Unfortunately, we can't always offer a machine-applicable suggestion when there are subpatterns from macro expansion.

Co-Authored-By: Guillaume Boisseau <Nadrieril@users.noreply.github.com>
2024-05-12 11:13:33 -04:00
bors 645bc609d9 Auto merge of #124883 - onur-ozkan:change-stage0-file, r=Mark-Simulacrum
use key-value format in stage0 file

Currently, we are working on the python removal task on bootstrap. Which means we have to extract some data from the stage0 file using shell scripts. However, parsing values from the stage0.json file is painful because shell scripts don't have a built-in way to parse json files.

This change simplifies the stage0 file format to key-value pairs, which makes it easily readable from any environment.

See the zulip thread for more details: https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/Using.20different.20format.20in.20the.20stage0.20file
2024-05-12 06:26:20 +00:00
Michael Goulet d5797e938a Make it possible to derive Lift/TypeVisitable/TypeFoldable in rustc_type_ir 2024-05-11 18:20:00 -04:00
onur-ozkan b46c3f279d use shared stage0 parser from `build_helper`
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-05-11 20:48:41 +03:00
Mark Rousskov 12200c912a Update Cargo.lock 2024-05-11 10:27:17 -04:00
Matthias Krüger 3c40e383df
Rollup merge of #124818 - compiler-errors:ena, r=Mark-Simulacrum
Update ena to 0.14.3

Includes https://github.com/rust-lang/ena/pull/53, which removes a trivial `Self: Sized` bound that prevents `ena` from building on the new solver.
2024-05-11 08:00:15 +02:00
bors 6e1d94708a Auto merge of #123886 - scottmcm:more-rvalue-operands, r=matthewjasper
Avoid `alloca`s in codegen for simple `mir::Aggregate` statements

The core idea here is to remove the abstraction penalty of simple newtypes in codegen.

Even something simple like constructing a
```rust
#[repr(transparent)] struct Foo(u32);
```
forces an `alloca` to be generated in nightly right now.

Certainly LLVM can optimize that away, but it would be nice if it didn't have to.

Quick example:
```rust
#[repr(transparent)]
pub struct Transparent32(u32);

#[no_mangle]
pub fn make_transparent(x: u32) -> Transparent32 {
    let a = Transparent32(x);
    a
}
```
on nightly we produce <https://rust.godbolt.org/z/zcvoM79ae>
```llvm
define noundef i32 `@make_transparent(i32` noundef %x) unnamed_addr #0 {
  %a = alloca i32, align 4
  store i32 %x, ptr %a, align 4
  %0 = load i32, ptr %a, align 4, !noundef !3
  ret i32 %0
}
```
but after this PR we produce
```llvm
define noundef i32 `@make_transparent(i32` noundef %x) unnamed_addr #0 {
start:
  ret i32 %x
}
```
(even before the optimizer runs).
2024-05-10 20:17:22 +00:00
klensy 39159a3629 opt-dist: use xz2 instead of xz crate
xz crate consist of simple reexport of xz2 crate. Why? Idk.
2024-05-09 16:43:14 +03:00
Scott McMurray c38f75c21f Make SSA aggregates without needing an alloca 2024-05-08 20:38:04 -07:00
James Farrell fbc2abd6be Update cc crate to v1.0.97 2024-05-08 15:06:35 +00:00
Michael Goulet 2af0871297 Update ena to 0.14.3 2024-05-06 14:32:39 -04:00
Urgau 228496e4f5 Improve check-cfg CLI errors with more structured diagnostics 2024-05-06 07:44:41 +02:00
Nicholas Nethercote 2acbe9c743 Move some tests from `rustc_expand` to `rustc_parse`.
There are some test cases involving `parse` and `tokenstream` and
`mut_visit` that are located in `rustc_expand`. Because it used to be
the case that constructing a `ParseSess` required the involvement of
`rustc_expand`. However, since #64197 merged (a long time ago)
`rust_expand` no longer needs to be involved.

This commit moves the tests into `rustc_parse`. This is the optimal
place for the `parse` tests. It's not ideal for the `tokenstream` and
`mut_visit` tests -- they would be better in `rustc_ast` -- but they
still rely on parsing, which is not available in `rustc_ast`. But
`rustc_parse` is lower down in the crate graph and closer to `rustc_ast`
than `rust_expand`, so it's still an improvement for them.

The exact renaming is as follows:

- rustc_expand/src/mut_visit/tests.rs -> rustc_parse/src/parser/mut_visit/tests.rs
- rustc_expand/src/tokenstream/tests.rs -> rustc_parse/src/parser/tokenstream/tests.rs
- rustc_expand/src/tests.rs + rustc_expand/src/parse/tests.rs ->
  compiler/rustc_parse/src/parser/tests.rs

The latter two test files are combined because there's no need for them
to be separate, and having a `rustc_parse::parser::parse` module would
be weird. This also means some `pub(crate)`s can be removed.
2024-05-06 09:06:02 +10:00