Commit graph

2257 commits

Author SHA1 Message Date
bors e9addfdecf Auto merge of #114623 - Kobzol:opt-dist-gha-summaries, r=Mark-Simulacrum
Print some information from try builds to GitHub summary

This PR adds some logs from `opt-dist` (the duration of the individual steps of the build pipeline, and the size of the resulting artifacts) to GitHub [job summaries](https://github.blog/2022-05-09-supercharging-github-actions-with-job-summaries/), in order to quickly show useful information right in the GHA CI job page, without needing to read the full log.

[This](https://github.com/rust-lang-ci/rust/actions/runs/5810621086) is how the summary currently looks like.

r? `@ghost`
2023-10-08 00:04:17 +00:00
Ralf Jung 5aecfe467b update lockfile 2023-10-07 08:03:44 +02:00
bors 4ea5190026 Auto merge of #116318 - pitaj:android-backtrace-build, r=workingjubilee
Invoke `backtrace-rs` buildscript in `std` buildscript

Based on #99883 by `@Arc-blroth`
Depends on rust-lang/backtrace-rs#556 and rust-lang/cc-rs#705
2023-10-07 02:20:50 +00:00
Matthias Krüger 9796dfdd56
Rollup merge of #116474 - nnethercote:rustc_assorted, r=spastorino
Assorted small cleanups

r? `@spastorino`
2023-10-06 21:17:50 +02:00
Philipp Krones 6233d44815
Update Cargo.lock 2023-10-06 17:47:56 +02:00
Nicholas Nethercote 4b51a3eb52 Remove unneeded dependency.
Also sort them.
2023-10-06 14:57:25 +11:00
Nicholas Nethercote 442a66d385 Remove unneeded dependency. 2023-10-06 14:57:09 +11:00
bors 2c9b0de8ea Auto merge of #116269 - Veykril:rustc-abi, r=WaffleLapkin
Bring back generic parameters for indices in rustc_abi and make it compile on stable

This effectively reverses https://github.com/rust-lang/rust/pull/107163, allowing rust-analyzer to depend on this crate again,

It also moves some glob imports / expands them in the first commit because they made it more difficult for me to reason about things.
2023-10-06 00:03:56 +00:00
Peter Jaszkowiak 93677276bc Invoke backtrace-rs buildscript in std buildscript
Based on #99883 by @Arc-blroth
Depends on rust-lang/backtrace-rs#556 and rust-lang/cc-rs#705
2023-10-02 19:34:27 -06:00
Lukas Wirth f14b7c9443 Move FieldIdx and Layout to rustc_target 2023-10-02 21:31:16 +02:00
Jakub Beránek 209789ef4c
Add artifact size and step duration summaries from opt-dist to github job summary 2023-10-02 17:54:11 +02:00
Rémy Rakic dcfa64bc2d update jemalloc-sys to most recent release 2023-10-02 07:41:51 +00:00
Ralf Jung 6687c075df update lockfile 2023-10-01 07:03:42 +02:00
Matthias Krüger 1ed00fe491
Rollup merge of #116234 - RalfJung:miri, r=RalfJung
Miri subtree update

r? `@ghost`
2023-09-29 10:11:13 +02:00
Ralf Jung e0f4ab84a7 update lockfile 2023-09-28 16:42:07 +02:00
bors dd91aba2fd Auto merge of #114882 - ChrisDenton:riddle-me, r=dtolnay
Update windows ffi bindings

Bump `windows-bindgen` to version 0.51.1. This brings with it some changes to the generated FFI bindings, but little that affects the code.

One change that does have more of an impact is `SOCKET` being `usize` instead of either `u64` or `u32` (as is used in std's public `SOCKET` type). However, it's now easy enough to abstract over that difference.

Finally I added a few new bindings that are likely to be used in pending PRs, mostly to make sure they're ok with the new metadata.

r? libs
2023-09-28 13:35:36 +00:00
Matthias Krüger d4858878c1
Rollup merge of #115934 - oli-obk:smir_identity, r=spastorino
Split out the stable part of smir into its own crate to prevent accidental usage of forever unstable things

Some groundwork for being able to work on https://github.com/rust-lang/project-stable-mir/issues/27 at all

r? `@spastorino`
2023-09-27 10:42:34 +02:00
bors d23062b5be Auto merge of #116139 - flip1995:clippyup, r=Manishearth
Clippy subtree update

r? `@Manishearth`
2023-09-26 07:20:55 +00:00
Oli Scherer a38e98371b Split out the stable part of smir into its own crate to prevent accidental usage of forever unstable things 2023-09-25 14:38:27 +00:00
Philipp Krones 6d331b7f03
Update Cargo.lock 2023-09-25 11:29:11 +02:00
chenx97 141c4636a7 deps: update rustix and linux-raw-sys for MIPS R6
commands that perform this update:

```shell
cargo +nightly update tempfile clap
cargo +nightly update linux-raw-sys rustix
```
2023-09-24 21:11:10 +08:00
Ayush Singh 7a956441a1
Fixes from PR
- Some comment fixes.
- Make some functions unsafe.
- Make helpers module private.
- Rebase on master
- Update r-efi to v4.2.0

Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
2023-09-22 17:23:33 +05:30
Ayush Singh 48c6ae0611
Add Minimal Std implementation for UEFI
Implemented modules:
1. alloc
2. os_str
3. env
4. math

Tracking Issue: https://github.com/rust-lang/rust/issues/100499
API Change Proposal: https://github.com/rust-lang/libs-team/issues/87

This was originally part of https://github.com/rust-lang/rust/pull/100316. Since
that PR was becoming too unwieldy and cluttered, and with suggestion
from @dvdhrm, I have extracted a minimal std implementation to this PR.

Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
2023-09-22 17:23:30 +05:30
Martin Kröning 4241f942b6
chore(miri): bump env_logger to 0.10
This reduces the amount of dependencies pulling in atty.

```
    Removing env_logger v0.9.3
```

Signed-off-by: Martin Kröning <martin.kroening@eonerc.rwth-aachen.de>
2023-09-19 18:39:13 +02:00
Martin Kröning 7928c7e25d
chore(Cargo.lock): bump colored and tracing-tree
This reduces the amount of dependencies pulling in atty.

```
    Updating colored v2.0.0 -> v2.0.4
    Updating tracing-tree v0.2.3 -> v0.2.4
```

Signed-off-by: Martin Kröning <martin.kroening@eonerc.rwth-aachen.de>
2023-09-19 18:39:12 +02:00
Guillaume Gomez 6cfc6a8705
Rollup merge of #115839 - Dirreke:bump-libc, r=dtolnay
Bump libc to 0.2.148
2023-09-19 11:35:51 +02:00
bors ae9c330629 Auto merge of #104101 - betrusted-io:xous-libstd-initial, r=bjorn3
Add initial libstd support for Xous

This patchset adds some minimal support to the tier-3 target `riscv32imac-unknown-xous-elf`. The following features are supported:

* alloc
* thread creation and joining
* thread sleeping
* thread_local
* panic_abort
* mutex
* condvar
* stdout

Additionally, internal support for the various Xous primitives surrounding IPC have been added as part of the Xous FFI. These may be exposed as part of `std::os::xous::ffi` in the future, however for now they are not public.

This represents the minimum viable product. A future patchset will add support for networking and filesystem support.
2023-09-19 07:38:20 +00:00
Matthias Krüger 0eec5e3d0c
Rollup merge of #115869 - ferrocene:pa-fix-tests-cargo-remap, r=compiler-errors
Avoid blessing cargo deps's source code in ui tests

Before this PR, the source code of dependencies was included in UI test error messages whenever possible. Unfortunately, "whenever possible" means in some cases the source code wouldn't be injected, resulting in a test failure.

One such case is when `$CARGO_HOME` is remapped to something that is not present on disk [^1]. As the remapped path doesn't exist on disk, the source code wouldn't be showed in `tests/ui/issues/issue-21763.rs`:

```diff
    = note: required for `hashbrown::raw::RawTable<(Rc<()>, Rc<()>)>` to implement `Send`
 note: required because it appears within the type `HashMap<Rc<()>, Rc<()>, RandomState>`
   --> $HASHBROWN_SRC_LOCATION
-   |
-LL | pub struct HashMap<K, V, S = DefaultHashBuilder, A: Allocator + Clone = Global> {
-   |            ^^^^^^^
 note: required because it appears within the type `HashMap<Rc<()>, Rc<()>>`
   --> $SRC_DIR/std/src/collections/hash/map.rs:LL:COL
 note: required by a bound in `foo`
```

This PR fixes the problem by always hiding dependencies source code in the error messages generated during UI tests. This is implemented with a new internal flag, `-Z ignore-directory-in-diagnostics-source-blocks=$path`, which compiletest passes during UI tests. Once this is merged, remapping the Cargo home will be supported.

This PR is best reviewed commit-by-commit.

[^1]: After being puzzled for a bit, I discovered why this never impacted `rust-lang/rust`: we don't remap `$CARGO_HOME` 😅. Instead, we set `$CARGO_HOME` to `/cargo` in CI, which sort-of-but-not-really achieves the same effect.
2023-09-19 01:29:41 +02:00
bors cbcf9a5368 Auto merge of #115795 - Kobzol:opt-dist-custom, r=Mark-Simulacrum
Refactor `opt-dist` to simplify local building

This PR refactors the `opt-dist` tool to make it easier to invoke it locally, outside of CI, and thus simplify building PGO/BOLT optimized `rustc` builds e.g. for distro maintainers. It should also make it easier to run the PGO/BOLT workflow locally e.g. to profile performance or debug issues (looking at you, https://github.com/rust-lang/rust/pull/115554).
2023-09-18 14:26:40 +00:00
Pietro Albini c230637b92
avoid blessing cargo deps's source code in ui tests 2023-09-15 16:22:52 +02:00
dirreke b8044774ff Bump libc to 0.2.148 2023-09-14 16:56:49 +08:00
Jakub Beránek f17047bc90
Refactor Environment 2023-09-12 19:33:41 +02:00
Philipp Krones 780cbf34a0
Update Cargo.lock (ui_test update) 2023-09-12 18:44:34 +02:00
Alex Macleod caaf1eb887 Reuse rustdoc's doc comment handling in Clippy 2023-09-08 23:42:57 +00:00
Matthias Krüger 7498dca311
Rollup merge of #115574 - Veykril:rustc_parse_format-dep, r=Nilstrieb
Replace `rustc_data_structures` dependency with `rustc_index` in `rustc_parse_format`

`rustc_data_structures` is only used for the `static_assert_size` macro, yet that is defined in `rustc_index` and merely re-exported. `rustc_index` is a lot more lightweight than `rustc_data_structures` which would make this a lot more reusable for rust-analyzer.
2023-09-06 19:31:49 +02:00
Lukas Wirth 2bba056187 Replace data_structures dependency with index in rustc_parse_format 2023-09-05 19:11:50 +02:00
Zalathar 1367104cb2 Add tool src/tools/coverage-dump for use by some new coverage tests 2023-09-05 11:11:48 +10:00
klensy 6950689030 remove some unused crate deps 2023-09-01 19:13:09 +03:00
bors 83995f320c Auto merge of #115354 - matthiaskrgr:rollup-4cotcxz, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #111580 (Don't ICE on layout computation failure)
 - #114923 (doc: update lld-flavor ref)
 - #115174 (tests: add test for #67992)
 - #115187 (Add new interface to smir)
 - #115300 (Tweaks and improvements on SMIR around generics_of and predicates_of)
 - #115340 (some more is_zst that should be is_1zst)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-08-29 19:24:47 +00:00
Oli Scherer 4fdb4edf9b Bump ui_test 2023-08-29 13:47:06 +00:00
ouz-a c2fe0bf253 Create StableMir replacer for SMirCalls 2023-08-29 16:30:50 +03:00
Chris Denton e7908608d9
Remove old bindings that have been moved 2023-08-28 20:17:43 +01:00
Chris Denton d9c85daa51
Update windows ffi bindings 2023-08-28 20:12:00 +01:00
Philipp Krones ac25a7387c
Update Cargo.lock (ui_test update) 2023-08-24 21:33:17 +02:00
Tyler Mandry 4c14ca3141 Bump backtrace to 0.3.69 2023-08-22 15:01:14 -07:00
Sean Cross 00280c8972 Cargo.lock: bump compiler_builtins to 0.1.101
The Xous operating system has no libc, and relies on `compiler_builtins`
to supply basic functions such as `memcpy`. Bump the version to 0.1.101
to pull in a version of this crate with the flag enabled for Xous.

Signed-off-by: Sean Cross <sean@xobs.io>
2023-08-22 20:25:39 +08:00
Ralf Jung 47ba2a9465 update lockfile 2023-08-22 13:47:38 +02:00
Ralf Jung 83283a437e update anyhow 2023-08-20 15:55:33 +02:00
Rémy Rakic df3819bd96 update thsiserror to release >= 1.0.46
this version is the one containing the workaround for the provider API
changes on nightly
2023-08-17 19:48:22 +00:00
dirreke 74817b7053 Upgrade Object and related deps 2023-08-14 23:05:45 +08:00
Vadim Petrochenkov 7353c96be8 rustc: Move features from Session to GlobalCtxt
Removes two pieces of mutable state.
Follow up to #114622.
2023-08-11 16:51:50 +08:00
bors 8838c73e86 Auto merge of #99747 - ankane:float_gamma, r=workingjubilee
Add gamma function to f32 and f64

Adds the [gamma function](https://en.wikipedia.org/wiki/Gamma_function) to `f32` and `f64` (`tgamma` and `tgammaf` from C).

Refs:
- https://github.com/rust-lang/rfcs/issues/864
- https://github.com/rust-lang/rust/issues/18271
2023-08-09 03:14:31 +00:00
Andrew Kane a75e2284fb Bump compiler_builtins to 0.1.100 2023-08-07 16:38:09 -07:00
bors 84ec2633de Auto merge of #113902 - Enselic:lint-recursive-drop, r=oli-obk
Make `unconditional_recursion` warning detect recursive drops

Closes #55388

Also closes #50049 unless we want to keep it for the second example which this PR does not solve, but I think it is better to track that work in #57965.

r? `@oli-obk` since you are the mentor for #55388

Unresolved questions:
- [x] There are two false positives that must be fixed before merging (see diff). I suspect the best way to solve them is to perform analysis after drop elaboration instead of before, as now, but I have not explored that any further yet. Could that be an option? **Answer:** Yes, that solved the problem.

`@rustbot` label +T-compiler +C-enhancement +A-lint
2023-08-07 13:39:28 +00:00
klensy 55935df22d bump schannel, miow to drop windows-sys 0.42 2023-08-06 13:24:59 +03:00
bors e4c1446846 Auto merge of #114481 - matthiaskrgr:rollup-58pczpl, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - #113945 (Fix wrong span for trait selection failure error reporting)
 - #114351 ([rustc_span][perf] Remove unnecessary string joins and allocs.)
 - #114418 (bump parking_lot to 0.12)
 - #114434 (Improve spans for indexing expressions)
 - #114450 (Fix ICE failed to get layout for ReferencesError)
 - #114461 (Fix unwrap on None)
 - #114462 (interpret: add mplace_to_ref helper method)
 - #114472 (Reword `confusable_idents` lint)
 - #114477 (Account for `Rc` and `Arc` when suggesting to clone)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-08-04 20:31:40 +00:00
bors fe896efa97 Auto merge of #114104 - oli-obk:syn2, r=compiler-errors
Lots of tiny incremental simplifications of `EmitterWriter` internals

ignore the first commit, it's https://github.com/rust-lang/rust/pull/114088 squashed and rebased, but it's needed to use to use `derive_setters`, as they need a newer `syn` version.

Then this PR starts out with removing many arguments that are almost always defaulted to `None` or `false` and replace them with builder methods that can set these fields in the few cases that want to set them.

After that it's one commit after the other that removes or merges things until everything becomes some very simple trait objects
2023-08-04 18:46:19 +00:00
klensy 383b715163 bump parking_lot 0.11 to 0.12 2023-08-03 16:05:26 +03:00
Matthias Krüger 57c57a555b
Rollup merge of #114193 - crlf0710:lexer_unicode15, r=Manishearth
Update lexer emoji diagnostics to Unicode 15.0

This replaces the `unic-emoji-char` dep tree (which hasn't been updated for a while) with `unicode-properties` crate which contains Unicode 15.0 data.

Improves diagnostics for added emoji characters in recent years. (See tests).

cc #101840

cc ``@Manishearth``
2023-07-31 22:51:15 +02:00
Oli Scherer 51c22154f5 Remove a bool for color in favor of the WriteColor trait wrapping colored and uncolored printing 2023-07-31 09:34:36 +00:00
Oli Scherer 29de70da1b Replace the many arguments of EmitterWriter::stderr with builder methods 2023-07-31 07:19:23 +00:00
Jakub Beránek a16925d5f3
Implement BOLT optimization in the opt-dist tool 2023-07-31 08:52:41 +02:00
Charles Lew bca79a26d8 Update lexer emoji diagnostics to Unicode 15.0 2023-07-29 08:47:21 +08:00
Guillaume Gomez f7123db888
Rollup merge of #114088 - oli-obk:syn, r=davidtwco
Bump syn dependency

r? `@davidtwco` because this affects diagnostics derive diagnostics (yes this sentence is grammatically correct)
2023-07-27 16:05:13 +02:00
Matthias Krüger dea5b4fff3
Rollup merge of #114098 - klensy:drop-atty, r=fee1-dead
replace atty crate with std's IsTerminal
2023-07-27 06:04:15 +02:00
klensy 31630859cc replace atty crate with std's isTerminal 2023-07-26 18:09:50 +03:00
Wesley Wiser 15e9f56088 Replace in-tree rustc_apfloat with the new version of the crate 2023-07-26 10:20:15 -04:00
Oli Scherer cf325e8187 Bump syn now that it doesn't affect diagnostics anymore 2023-07-26 08:26:50 +00:00
Martin Nordholts b4b33df983 Make unconditional_recursion warning detect recursive drops 2023-07-22 14:04:45 +02:00
Nicholas Bishop 8d5d2fea96 Bump compiler_builtins to 0.1.98 2023-07-21 13:03:58 -04:00
bors b14fd2359f Auto merge of #113695 - bjorn3:fix_rlib_cdylib_metadata_handling, r=pnkfelix,petrochenkov
Verify that all crate sources are in sync

This ensures that rustc will not attempt to link against a cdylib as if it is a rust dylib when an rlib for the same crate is available. Previously rustc didn't actually check if any further formats of a crate which has been loaded are of the same version and if they are actually valid. This caused a cdylib to be interpreted as rust dylib as soon as the corresponding rlib was loaded. As cdylibs don't export any rust symbols, linking would fail if rustc decides to link against the cdylib rather than the rlib.

Two crates depended on the previous behavior by separately compiling a test crate as both rlib and dylib. These have been changed to capture their original spirit to the best of my ability while still working when rustc verifies that all crates are in sync. It is unlikely that build systems depend on the current behavior and in any case we are taking a lot of measures to ensure that any change to either the source or the compilation options (including crate type) results in rustc rejecting it as incompatible. We merely didn't do this check here for now obsolete perf reasons.

Fixes https://github.com/rust-lang/rust/issues/10786
Fixes https://github.com/rust-lang/rust/issues/82151
Fixes https://github.com/rust-lang/rust/issues/82972
Closes https://github.com/bevy-cheatbook/bevy-cheatbook/issues/114
2023-07-20 09:00:10 +00:00
bjorn3 52853c2694 Don't compress dylib metadata 2023-07-19 14:47:06 +00:00
Esteban Küber 8eb5843a59 On nightly, dump ICE backtraces to disk
Implement rust-lang/compiler-team#578.

When an ICE is encountered on nightly releases, the new rustc panic
handler will also write the contents of the backtrace to disk. If any
`delay_span_bug`s are encountered, their backtrace is also added to the
file. The platform and rustc version will also be collected.
2023-07-19 14:10:07 +00:00
Philipp Krones c2490bdc44
Update Cargo.lock/toml
Remove clippy_test_deps from Cargo.toml
2023-07-17 10:22:41 +02:00
许杰友 Jieyou Xu (Joe) 08c77a6eb4
Add infrastructure #[rustc_confusables] attribute to allow targeted
"no method" errors on standard library types

The standard library developer can annotate methods on e.g.
`BTreeSet::push` with `#[rustc_confusables("insert")]`. When the user
mistypes `btreeset.push()`, `BTreeSet::insert` will be suggested if
there are no other candidates to suggest.
2023-07-16 19:22:03 +08:00
Stefan Lankes 8666adeb61 use latest version of hermit-abi
0.3.0 and 0.3.1 have an issue and will be yanked. Consequently, std
should switch to 0.3.2.
2023-07-12 13:15:09 +02:00
Matthias Krüger 3f73a7dba3
Rollup merge of #112717 - celinval:stable-mir-rvalue-1, r=oli-obk
Implement a few more rvalue translation to smir

Add the implementation for a few more RValue variants. For now, I simplified the stable version of `RValue::Ref` by removing the notion of Region.

r? `@oli-obk`
2023-07-11 17:46:18 +02:00
Josh Stone dd5fa7d9b3 Don't use serde-derive in the rls shim
The already-small RLS shim can get a little smaller, and faster to
build, if we drop the serde-derive dependency and decode the one
"method" field it needs manually from `serde_json::Value`.
2023-07-10 14:53:57 -07:00
Celina G. Val b9f378b19b Implement a few more rvalue translation to smir
- Introduce an Opaque type for adding information that is still
   internal to the compiler.
2023-07-10 11:47:48 -07:00
Celina G. Val 44d0fce150 Fix standalone build
Add extern declarations and optional dependencies to fix build done
directly via `cargo build`.
2023-07-10 10:06:18 -07:00
bors b12ff66f2c Auto merge of #113488 - RalfJung:miri, r=RalfJung
update Miri
2023-07-09 13:37:41 +00:00
bors 1861088f90 Auto merge of #112235 - Kobzol:opt-dist, r=Mark-Simulacrum
Port PGO/LTO/BOLT optimized build pipeline to Rust

This PR ports the `stage-build.py` PGO/LTO/BOLT optimization script from Python to Rust, to make it easier to use dependencies, and make it a bit more robust. The PR switches both the Linux and Windows dist runners to the Rust script and removes the old Python script.

Funnily enough, the Rust port has less lines of code than the Python script :) I think that clearly shows that the Python script really lacked dependencies.
2023-07-09 08:11:57 +00:00
Jakub Beránek 91d2fb2e2b
Port PGO/LTO/BOLT optimized build pipeline to Rust 2023-07-09 08:39:50 +02:00
bors f05d743c20 Auto merge of #113276 - Nilstrieb:rustix, r=Mark-Simulacrum
Update rustix

The issue has been fixed.
https://github.com/bytecodealliance/rustix/issues/716
2023-07-09 05:50:31 +00:00
Ralf Jung 9ed4669680 update lockfile 2023-07-08 18:25:13 +02:00
bors 85bf07972a Auto merge of #113269 - jyn514:update-compiler-builtins, r=Amanieu
Update compiler builtins

cc https://github.com/rust-lang/compiler-builtins/pull/532#discussion_r1249354225

in particular this pulls in https://github.com/rust-lang/compiler-builtins/pull/532 and https://github.com/rust-lang/compiler-builtins/pull/535.

Fixes https://github.com/rust-lang/rust/issues/93166. Fixes https://github.com/rust-lang/git2-rs/issues/706. Fixes https://github.com/rust-lang/rust/issues/109064. Fixes https://github.com/rust-lang/wg-cargo-std-aware/issues/74.
2023-07-06 18:58:54 +00:00
fee1-dead 1830b80c2d
Rollup merge of #113334 - fmease:revert-lexing-c-str-lits, r=compiler-errors
Revert the lexing of `c"…"` string literals

Fixes \[after beta-backport\] #113235.
Further progress is tracked in #113333.

This PR *manually* reverts parts of #108801 (since a git-revert would've been too coarse-grained & messy)
and git-reverts #111647.

CC `@fee1-dead` (#108801) `@klensy` (#111647)
r? `@compiler-errors`

`@rustbot` label F-c_str_literals beta-nominated
2023-07-06 09:20:33 +08:00
jyn fd7f53112a Update compiler-builtins to 0.1.95
This pulls in the new `outline-atomics` intrinsics.
2023-07-05 10:41:41 -05:00
León Orell Valerian Liehr 3788b7ab32
Revert "use new c literals instead of cstr! macro"
This reverts commit a17561ffc9.
2023-07-05 13:11:27 +02:00
Matthias Krüger d3fae79178
Rollup merge of #113251 - chenyukang:yukang-fix-112940-smir, r=oli-obk
Use scoped-tls for SMIR to  map between TyCtxt and SMIR datastructures

Fixes #112940
r? `@oli-obk`
2023-07-04 17:46:27 +02:00
bors cd68ead9ec Auto merge of #113303 - compiler-errors:yeet-chalk, r=lcnr
Remove chalk support from the compiler

Removes chalk (`-Ztrait-solver=chalk`) from the compiler and prunes any dead code resulting from this, mainly:
* Remove the chalk compatibility layer in `compiler/rustc_traits/src/chalk`
* Remove the chalk flag `-Ztrait-solver=chalk` and its `TraitEngine` implementation
* Remove `TypeWellFormedFromEnv` (and its many `bug!()` match arms)
* Remove the chalk migration mode from compiletest
* Remove the `chalkify` UI tests (do we want to keep any of these, but migrate them to `-Ztrait-solver=next`??)

Fulfills rust-lang/types-team#93.

r? `@jackh726`
2023-07-04 09:09:09 +00:00
Michael Goulet 810fbf086d Remove chalk from the compiler 2023-07-03 21:40:04 +00:00
Josh Stone d9b1fa93c4 Upgrade to indexmap 2.0.0
The new version was already added to the tree as an indirect dependency
in #113046, but now our direct dependents are using it too.
2023-07-03 13:51:54 -07:00
Nilstrieb dd19f1f527 Update rustix
The issue has been fixed.
2023-07-03 07:20:51 +00:00
lcnr 5378f07d64 use deeply_normalize for assumed_wf_types 2023-07-03 09:12:14 +02:00
Jubilee Young 079949da8e Update std to backtrace 0.3.68
Dedup addr2line, miniz_oxide, object in .lock
2023-07-02 17:02:45 -07:00
Nilstrieb 1e5d8fbcc9 downgrade compiler_builtins
The outline-atomics support in compiler_builtins messed up and wasn't limited to linux only.
https://github.com/rust-lang/compiler-builtins/pull/532/files#r1249354225
2023-07-02 21:02:31 +02:00
Nilstrieb fd49b1d37f Downgrade rustix
See https://github.com/rust-lang/rust/pull/113046#issuecomment-1616094626.
2023-07-02 21:02:31 +02:00
Nilstrieb 171be8ce94 Downgrade tracing and syn
There's currently a deadlock with tracing when RUSTC_LOG is enabled.
Downgrade tracing-core for now to avoid blocking the other updates.

syns upgrades cause some nontrivial changes in the diagnostics derive tests,
which are best dealt with in another PR.
2023-07-02 21:02:31 +02:00
Nilstrieb 3295cdfff4 cargo update
Additional deps:
equivalent: indexmap
nu-ansi-term: tracing
overload: nu-ansi-term
2023-07-02 20:41:03 +02:00
bors 32d81eccd6 Auto merge of #113260 - flip1995:clippyup, r=Manishearth
Update Clippy

r? `@Manishearth`

cc `@oli-obk` (for the ui-test changes in de69d556eb and the valtree fix in 0cbe963e51)

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

This must've been the most involved Clippy sync ever.
2023-07-02 15:14:59 +00:00
Philipp Krones a6d3c82360
Update Cargo.lock 2023-07-02 15:07:47 +02:00
Matthias Krüger fda22efbf0
Rollup merge of #113233 - Nilstrieb:chaaalk, r=jackh726
Update chalk

For #109302

r? jackh726
2023-07-02 10:27:21 +02:00
bors 8e2d5e3a58 Auto merge of #112910 - lqd:mcp510, r=petrochenkov
Implement most of MCP510

This implements most of what remains to be done for MCP510:
- turns `-C link-self-contained` into a `+`/`-` list of components, like `-C link-self-contained=+linker,+crto,+libc,+unwind,+sanitizers,+mingw`. The scaffolding is present for all these expected components to be implemented and stabilized in the future on their own time. This PR only handles the `-Zgcc-ld=lld` subset of these link-self-contained components as  `-Clink-self-contained=+linker`
- handles  `-C link-self-contained=y|n`  as-is today, for compatibility with `rustc_codegen_ssa:🔙🔗:self_contained`'s [explicit opt-in and opt-out](9eee230cd0/compiler/rustc_codegen_ssa/src/back/link.rs (L1671-L1676)).
- therefore supports our plan to opt out of `rust-lld` (when it's enabled by default) even for current `-Clink-self-contained` users, with e.g. `-Clink-self-contained -Clink-self-contained=-linker`
- turns `add_gcc_ld_path` into its expected final form, by using the `-C link-self-contained=+linker`  CLI flag, and whether the `LinkerFlavor`  has the expected `Cc::Yes` and `Lld::Yes` shape (this is not yet the case in practice for any CLI linker flavor)
- makes the [new clean linker flavors](https://github.com/rust-lang/rust/pull/96827#issuecomment-1208441595) selectable in the CLI in addition to the legacy ones, in order to opt-in to using `cc` and `lld` to emulate `-Zgcc-ld=lld`
- ensure the new `-C link-self-contained` components, and `-C linker-flavor`s are unstable, and require `-Z unstable-options` to be used

The up-to-date set of flags for the future stable CLI version of `-Zgcc-ld=lld` is currently: `-Clink-self-contained=+linker -Clinker-flavor=gnu-lld-cc -Zunstable-options`.

It's possible we'll also need to do something for distros that don't ship `rust-lld`, but maybe there are already no tool search paths to be added to `cc` in this situation anyways.

r? `@petrochenkov`
2023-07-02 02:25:01 +00:00
yukang 361df86a8d Use scoped-tls for SMIR to map between TyCtxt and SMIR datastructures 2023-07-02 07:48:41 +08:00
Nilstrieb e43ec03968 Update chalk 2023-07-01 18:03:36 +02:00
Caleb Cartwright 75a6675bc9 update rustfmt version in lockfile 2023-07-01 02:50:52 -05:00
Rémy Rakic 5d91c1ced4 add dedicated -C link-self-contained structure 2023-06-30 20:37:24 +00:00
bors af9df2fd91 Auto merge of #106619 - agausmann:avr-object-file, r=nagisa
Fix unset e_flags in ELF files generated for AVR targets

Closes #106576

~~Sort-of blocked by gimli-rs/object#500~~ (merged)

I'm not sure whether the list of AVR CPU names is okay here. Maybe it could be moved out-of-line to improve the readability of the function.
2023-06-30 08:55:56 +00:00
Ralf Jung a3cea7f179 update lockfile 2023-06-29 09:31:47 +02:00
Dylan DPC fa56e01b35
Rollup merge of #111571 - jhpratt:proc-macro-span, r=m-ou-se
Implement proposed API for `proc_macro_span`

As proposed in [#54725 (comment)](https://github.com/rust-lang/rust/issues/54725#issuecomment-1546918161). I have omitted the byte-level API as it's already available as [`Span::byte_range`](https://doc.rust-lang.org/nightly/proc_macro/struct.Span.html#method.byte_range).

`@rustbot` label +A-proc-macros

r? `@m-ou-se`
2023-06-28 18:28:46 +05:30
bors 06c58cb966 Auto merge of #112884 - klensy:ri-drop-old-clap, r=albertlarsan68
rust-installer: migrate to clap 4.2, change to 2021 edition and fix few clippy lints

Updated rust-installer to clap 4.2, dropping last user of clap v3; changes to 2021 edition, fixes few clippy warns.
2023-06-26 03:21:01 +00:00
Michael Goulet ee8b035fab
Rollup merge of #112763 - Patryk27:bump-compiler-builtins, r=Amanieu
Bump compiler_builtins

Actually closes https://github.com/rust-lang/rust/issues/108489.

Note that the example code given [in compiler_builtins](https://github.com/rust-lang/compiler-builtins/pull/527) doesn't compile on current rustc since we're still waiting for https://reviews.llvm.org/D153197 (aka `LLVM ERROR: Expected a constant shift amount!`), but it's a step forward anyway.
2023-06-23 19:47:20 -07:00
klensy e1c3313d38 rust-installer: drop clap v3, migrate to v4 2023-06-21 12:32:34 +03:00
David Tolnay 21d9fd77f4
Delete use of proc_macro_span_shrink from proc-macro2 2023-06-20 19:53:06 -04:00
David Tolnay cd1c1b1a9f
Update to proc-macro2 1.0.57 to unblock proc_macro_span changes 2023-06-20 19:40:26 -04:00
Caleb Cartwright aca66a20c6 update lockfile for rustfmt sync 2023-06-19 23:19:48 -05:00
Patryk Wychowaniec 70ce2139e8
Bump compiler_builtins 2023-06-18 13:29:36 +02:00
The 8472 479be6ac43 update hashbrown and replace Hash{Set,Map}::DrainFilter with ExtractIf 2023-06-14 09:28:56 +02:00
Matthias Krüger e3656ff9fd
Rollup merge of #112298 - est31:update_field_offset, r=Mark-Simulacrum
Update field-offset and enable unstable_offset_of

This makes the compiler use the builtin `offset_of!()` macro, through the wrappers in memoffset and then in field-offset.

cc  #111839
2023-06-10 15:24:43 +02:00
bors 343ad6f059 Auto merge of #111626 - pjhades:output, r=b-naber
Write to stdout if `-` is given as output file

With this PR, if `-o -` or `--emit KIND=-` is provided, output will be written to stdout instead. Binary output (those of type `obj`, `llvm-bc`, `link` and `metadata`) being written this way will result in an error unless stdout is not a tty. Multiple output types going to stdout will trigger an error too, as they will all be mixded together.

This implements https://github.com/rust-lang/compiler-team/issues/431

The idea behind the changes is to introduce an `OutFileName` enum that represents the output - be it a real path or stdout - and to use this enum along the code paths that handle different output types.
2023-06-09 09:45:40 +00:00
Jing Peng 9b1a1e1d95 Write to stdout if - is given as output file
If `-o -` or `--emit KIND=-` is provided, output will be written
to stdout instead. Binary output (`obj`, `llvm-bc`, `link` and
`metadata`) being written this way will result in an error unless
stdout is not a tty. Multiple output types going to stdout will
trigger an error too, as they will all be mixded together.
2023-06-06 17:53:29 -04:00
Nikolay Arhipov 032857e7e4 Bumped libc version 2023-06-06 16:09:05 +03:00
Nikolay Arhipov 50117af409 Std support improvement for ps vita target 2023-06-05 19:14:09 +03:00
est31 b048396f44 Update field-offset and enable unstable_offset_of
This enables usage of the offset_of!() macro in the compiler,
through the wrappers in memoffset and then in field-offset.
2023-06-05 15:57:13 +02:00
bors dff88b2064 Auto merge of #112217 - arlosi:update-vuln-deps, r=Mark-Simulacrum
Update dependencies with reported vulnerabilities

Vulnerable dependencies:
* bumpalo 3.12.1 (yanked)
  * updated to 3.13.0
* tokio 1.8.4 - https://rustsec.org/advisories/RUSTSEC-2023-0001
  * updated to 1.28.2
* remove_dir_all 0.5.3 - https://rustsec.org/advisories/RUSTSEC-2023-0018
  * removed by using the standard library function in `rust-installer` instead and updating to `tempfile@3.5.0` (which also removes the dependency).

The new dependencies come from `tempfile@3.5.0` which adds the dependency on `rustix`
2023-06-03 01:59:14 +00:00
Arlo Siemsen 4d9b476bb1 Update dependencies with reported vulnerabilities
bumpalo 3.12.1 (yanked)
  * updated to 3.13.0
tokio 1.8.4 - https://rustsec.org/advisories/RUSTSEC-2023-0001
  * updated to 1.28.2
remove_dir_all 0.5.3 - https://rustsec.org/advisories/RUSTSEC-2023-0018
  * removed by using the standard library function in `rust-installer` instead and updating to `tempfile@3.5.0` (which also removes the dependency).
2023-06-02 12:34:01 -05:00
Matthias Krüger a3b639ce43
Rollup merge of #111647 - klensy:cstr, r=oli-obk
use c literals in compiler and library

Use c literals #108801 in compiler and library

currently blocked on:
* <strike>rustfmt: don't know how to format c literals</strike> nope, nightly one works.
* <strike>bootstrap</strike>

r? `@ghost`
`@rustbot` blocked
2023-06-02 18:12:45 +02:00
Philipp Krones 612c342346
Update Cargo.lock 2023-06-02 11:42:42 +02:00
klensy a17561ffc9 use new c literals instead of cstr! macro 2023-05-31 19:40:24 +03:00
Matthias Krüger 183a31be85
Rollup merge of #112084 - ozkanonur:improvements, r=clubby789
enhancements on  build_helper utilization and rustdoc-gui-test

This change provides codebase improvements, resolves `FIXME` in `rustdoc-gui-test` and makes `rustdoc-gui` test able to find local `node_modules` directory outside of the source root.
2023-05-31 07:07:01 +02:00
ozkanonur c64db2cfa7 use build_helper::util::try_run in rustdoc-gui-test
Signed-off-by: ozkanonur <work@onurozkan.dev>
2023-05-30 10:54:40 +03:00
bors 165cddafe9 Auto merge of #111989 - klensy:deps-up-26-05-23, r=Mark-Simulacrum
deps: bump crates

Updates few deps:

drops a lot of cxx* crates:
```console
$ cargo update -p iana-time-zone-haiku
    Updating crates.io index
    Updating cc v1.0.77 -> v1.0.79
    Removing codespan-reporting v0.11.1
    Removing cxx v1.0.94
    Removing cxx-build v1.0.94
    Removing cxxbridge-flags v1.0.94
    Removing cxxbridge-macro v1.0.94
    Updating iana-time-zone-haiku v0.1.1 -> v0.1.2
    Removing link-cplusplus v1.0.8
    Removing scratch v1.0.5
```
cc: https://github.com/rust-lang/cc-rs/releases/tag/1.0.78, https://github.com/rust-lang/cc-rs/releases/tag/1.0.79
iana-time-zone-haiku: https://github.com/strawlab/iana-time-zone/releases/tag/haiku%2Fv0.1.2

fixed https://github.com/crossbeam-rs/crossbeam/pull/972 (similar fixed in rust repo https://github.com/rust-lang/rust/pull/110089)
```console
$ cargo update -p crossbeam-channel
    Updating crates.io index
    Updating crossbeam-channel v0.5.6 -> v0.5.8
```
https://github.com/crossbeam-rs/crossbeam/blob/master/crossbeam-channel/CHANGELOG.md#version-058

dedupes memoffset versions:
```console
$ cargo update -p crossbeam-epoch
    Updating crates.io index
    Updating crossbeam-epoch v0.9.13 -> v0.9.14
    Removing memoffset v0.7.1
```
https://github.com/crossbeam-rs/crossbeam/blob/master/crossbeam-epoch/CHANGELOG.md#version-0914
https://github.com/Gilnaa/memoffset/compare/v0.6.5...v0.8.0
https://github.com/rust-lang/rust/pull/108638#discussion_r1193157265

dedupes bstr versions
```console
$ cargo update -p ignore -p opener
    Updating crates.io index
    Removing bstr v0.2.17
    Updating globset v0.4.9 -> v0.4.10
    Updating ignore v0.4.18 -> v0.4.20
    Updating opener v0.5.0 -> v0.5.2
```

globset ac8fecbbf2
ignore https://github.com/BurntSushi/ripgrep/commits/master/crates/ignore hard to track, but drop dep on crossbeam-utils (e95254a86f), don't stat git if require_git is false (009dda1488) and added bunch of formats to ignore list
opener https://github.com/Seeker14491/opener/compare/v0.5.0...v0.5.2 nothing interesting
2023-05-30 01:28:54 +00:00
Deadbeef ab7c4b76b3 bump thiserror to use syn 2.0 2023-05-28 05:38:03 +00:00
bors dbfc95f969 Auto merge of #111348 - ozkanonur:remove-hardcoded-rustdoc-flags, r=albertlarsan68,oli-obk
new tool `rustdoc-gui-test`

Implements new tool `rustdoc-gui-test` that allows using compiletest headers for `rustdoc-gui` tests.
2023-05-27 04:20:44 +00:00
klensy 9b6a6b13c5 deps: bump crates
update iana-time-zone-haiku to drop bumch of cxx* deps
cargo update -p iana-time-zone-haiku
    Updating crates.io index
    Updating cc v1.0.77 -> v1.0.79
    Removing codespan-reporting v0.11.1
    Removing cxx v1.0.94
    Removing cxx-build v1.0.94
    Removing cxxbridge-flags v1.0.94
    Removing cxxbridge-macro v1.0.94
    Updating iana-time-zone-haiku v0.1.1 -> v0.1.2
    Removing link-cplusplus v1.0.8
    Removing scratch v1.0.5

fixes known issue https://github.com/crossbeam-rs/crossbeam/pull/972
cargo update -p crossbeam-channel
    Updating crates.io index
    Updating crossbeam-channel v0.5.6 -> v0.5.8

dedupes memoffset versions
cargo update -p crossbeam-epoch
    Updating crates.io index
    Updating crossbeam-epoch v0.9.13 -> v0.9.14
    Removing memoffset v0.7.1

dedupes bstr versions
cargo update -p ignore -p opener
    Updating crates.io index
    Removing bstr v0.2.17
    Updating globset v0.4.9 -> v0.4.10
    Updating ignore v0.4.18 -> v0.4.20
    Updating opener v0.5.0 -> v0.5.2
2023-05-26 13:03:47 +03:00
Michael Goulet bd7e8b5ef9
Rollup merge of #111152 - lukas-code:markdown-parsers-are-hard, r=GuillaumeGomez
update `pulldown-cmark` to `0.9.3`

This PR updates `pulldown-cmark` to version `0.9.3`, which does two main things:
* Pulls in https://github.com/raphlinus/pulldown-cmark/pull/643 to fix https://github.com/rust-lang/rust/issues/111117
* Allows parsing strikethrough with single tildes, e.g. `~foo~` -> ~foo~. This matches the [GFM spec](https://github.github.com/gfm/#strikethrough-extension-).

Full changelog: https://github.com/raphlinus/pulldown-cmark/pull/646
2023-05-25 13:57:59 -07:00
Manish Goregaokar 33ded73c76
Rollup merge of #111876 - danakj:builtins92, r=Mark-Simulacrum
Roll compiler_builtins to 0.1.92

This pulls in the weak-intrinsics feature (which currently defaults off), and a minor version update to libm for the compiler_builtins crate to 0.2.7.
2023-05-24 15:05:04 -07:00
bors 5ea3f0ae08 Auto merge of #111867 - RalfJung:miri, r=RalfJung
update Miri
2023-05-23 21:09:20 +00:00
danakj 0e89b1b5fe Roll compiler_builtins to 0.1.92
This pulls in the weak-intrinsics feature (which currently
defaults off), and a minor version update to libm for the
compiler_builtins crate to 0.2.7.
2023-05-23 11:14:50 -04:00
Ralf Jung 13e4766440 update lockfile 2023-05-23 12:10:18 +02:00
Luca Palmieri cd7688bd30 Verify that ItemEnum can be serialized and then deserialized using bincode 2023-05-22 18:26:20 +01:00
Lukas Markeffsky cb2ba42a10 update pulldown-cmark to 0.9.3 2023-05-22 11:35:25 +02:00
Adam Gausmann a7158ecfa9 rustc_codegen_ssa: Set e_flags for AVR architecture based on target CPU 2023-05-21 16:56:57 -05:00
bors 77f4f828a2 Auto merge of #111799 - flip1995:clippyup, r=Manishearth
Update Clippy

r? `@Manishearth`
2023-05-20 18:56:52 +00:00
Philipp Krones d780efc460
Update Cargo.lock 2023-05-20 15:39:35 +02:00
bors 4eb5225cdf Auto merge of #111413 - workingjubilee:bump-object-0-31-1, r=MarkSimulacrum
Bump object and thorin-dwp

Required to fix watchOS breakage.
2023-05-20 13:19:37 +00:00
ozkanonur c36b2092bb create new tool rustdoc-gui-test 2023-05-20 14:40:11 +03:00
Dylan DPC cdfaf69498
Rollup merge of #111561 - dtolnay:compiletestdirexists, r=Mark-Simulacrum
Include better context for "already exists" error in compiletest

I encountered the following error from `x.py test tests/ui` today.

```console
---- [ui] tests/ui/impl-trait/multiple-lifetimes/multiple-lifetimes.rs stdout ----
thread '[ui] tests/ui/impl-trait/multiple-lifetimes/multiple-lifetimes.rs' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 17, kind: AlreadyExists, message: "File exists" }', src/tools/compiletest/src/runtest.rs:134:43
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```

I found it impossible to unblock myself without knowing which directory it was stuck on.

Error message after this PR:

```console
---- [ui] tests/ui/impl-trait/multiple-lifetimes/multiple-lifetimes.rs stdout ----
thread '[ui] tests/ui/impl-trait/multiple-lifetimes/multiple-lifetimes.rs' panicked at 'called `Result::unwrap()` on an `Err` value: failed to create output base directory /git/rust/build/x86_64-unknown-linux-gnu/test/ui/impl-trait/multiple-lifetimes/multiple-lifetimes

Caused by:
    File exists (os error 17)', src/tools/compiletest/src/runtest.rs:139:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```

Now I was able to run `rm build/x86_64-unknown-linux-gnu/test/ui/impl-trait/multiple-lifetimes/multiple-lifetimes` and unblock myself.

Seems to be related to #109509 moving *tests/ui/impl-trait/multiple-lifetimes.rs* to *tests/ui/impl-trait/multiple-lifetimes/multiple-lifetimes.rs*.
2023-05-18 10:52:35 +05:30
Dylan DPC 57172a0675
Rollup merge of #111160 - chbaker0:update-serde, r=Mark-Simulacrum
Update serde in workspace and non-synced dependencies

The main workspace, bootstrap, cargo, miri, and rust-analyzer all lock serde to different versions. It's preferable to share the same version where possible, so update it.

Rustfmt is synced from another repository and has its own Cargo.lock, but since it's added to the overall workspace it should respect the version here.

Cargo is already at the latest version. Miri and rust-analyzer would require upstream updates.
2023-05-18 10:52:33 +05:30