about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2023-07-14Rollup merge of #113685 - Kobzol:opt-dist-binary-sizes, r=Mark-SimulacrumMatthias Krüger-5/+45
Print artifact sizes in `opt-dist` The Python PGO script printed a nice table of artifact sizes (`librustc_driver.so`, `libLLVM.so`, ...) at the end of the CI run, which was useful to quickly see the sizes of important files. I forgot to port this functionality into the Rust (`opt-dist`) version in https://github.com/rust-lang/rust/pull/112235. This PR fixes that. r? bootstrap
2023-07-14Print artifact sizes in `opt-dist`Jakub Beránek-5/+45
2023-07-14refactor(rustc_middle): Substs -> GenericArgMahdi Dibaiee-309/+309
2023-07-13Auto merge of #113637 - Mark-Simulacrum:bootstrap-bump, r=ozkanonurbors-4/+14
Bump bootstrap to 1.72 beta
2023-07-13Rollup merge of #113613 - GuillaumeGomez:allow-dash-in-file-name, r=notriddleMatthias Krüger-4/+13
Allow to have `-` in rustdoc-json test file name I extracted this commit from https://github.com/rust-lang/rust/pull/113574. When I added the test, it kept saying that the JSON file couldn't be found. After investigating for a while, I discovered that we were expecting files to always use `_`, which is quite bad. So I added support for `-` in file names. r? ``@notriddle``
2023-07-13Rollup merge of #113603 - workingjubilee:test-for-98016, r=oli-obkMatthias Krüger-12/+13
Test simd-wide-sum for codegen error This adds the necessary test infrastructure to "build-pass" codegen tests, for the purpose of doing that for a single revision of a codegen test. When mir-opts are tested, the output may vary from the usual, and maybe for positive reasons... but we don't necessarily want to output such bad LLVMIR that LLVM starts crashing on it. Currently when enabling MIR opts at higher levels this LLVMIR is still emitted, but it was previously disabled for getting in mir-opt's way and as this new revision without `// [mir-opt3]build-pass` would make it more likely to, I would like to not see the testing for the actual results regress again just because it was bundled with an ICE check as well. This fixes https://github.com/rust-lang/rust/issues/98016
2023-07-13Rollup merge of #113598 - weihanglo:update-cargo, r=weihangloMatthias Krüger-0/+3
Update cargo 10 commits in 45782b6b8afd1da042d45c2daeec9c0744f72cc7..694a579566a9a1482b20aff8a68f0e4edd99bd28 2023-07-05 16:54:51 +0000 to 2023-07-11 22:28:29 +0000 - fix(embedded): Always generate valid package names (rust-lang/cargo#12349) - fix(embedded): Error on unsupported commands (rust-lang/cargo#12350) - chore(ci): Automatically test new packages by using `--workspace` (rust-lang/cargo#12342) - contrib docs: Add some more detail about how publishing works (rust-lang/cargo#12344) - docs: Put cargo-add change under nightly (rust-lang/cargo#12343) - Minor: Use "number" instead of "digit" when explaining Cargo's use of semver (rust-lang/cargo#12340) - Update criterion (rust-lang/cargo#12338) - Add profile strip to config docs. (rust-lang/cargo#12337) - update re: multiple versions that differ only in the metadata tag (rust-lang/cargo#12335) - doc: state `PackageId`/`SourceId` string is opaque (rust-lang/cargo#12313) r? ``@ghost``
2023-07-13Rollup merge of #113353 - compiler-errors:select-better, r=lcnrMatthias Krüger-1/+1
Implement selection for `Unsize` for better coercion behavior In order for much of coercion to succeed, we need to be able to deal with partial ambiguity of `Unsize` traits during selection. However, I pessimistically implemented selection in the new trait solver to just bail out with ambiguity if it was a built-in impl: https://github.com/rust-lang/rust/blob/9227ff28aff55b252314076fcf21c9a66f10ac1e/compiler/rustc_trait_selection/src/solve/eval_ctxt/select.rs#L126 This implements a proper "rematch" procedure for dealing with built-in `Unsize` goals, so that even if the goal is ambiguous, we are able to get nested obligations which are used in the coercion selection-like loop: https://github.com/rust-lang/rust/blob/9227ff28aff55b252314076fcf21c9a66f10ac1e/compiler/rustc_hir_typeck/src/coercion.rs#L702 Second commit just moves a `resolve_vars_if_possible` call to fix a bug where we weren't detecting a trait upcasting to occur. r? ``@lcnr``
2023-07-12Re-format let-else per rustfmt updateMark Rousskov-4/+14
2023-07-12Auto merge of #113621 - ehuss:ignore-clippy-tests, r=Nilstriebbors-0/+9
Ignore flaky clippy tests. These tests are frequently failing due to an issue in ui_test. ui_test doesn't appear to have a blanket ignore instruction that I could find, so I just approximated it with ignoring both 32 and 64 bit. Fixes #113585
2023-07-12Ignore flaky clippy tests.Eric Huss-0/+9
2023-07-12Auto merge of #112945 - compiler-errors:tighten-span-of-adjustment-error, ↵bors-15/+8
r=oli-obk (re-)tighten sourceinfo span of adjustments in MIR Diagnostics rely on the spans of MIR statements being (approximately) correct in order to give suggestions relative to that span (i.e. `shrink_to_hi` and `shrink_to_lo`). I discovered that we're *intentionally* lowering THIR exprs with their parent expr's span if they come from adjustments that are due to a parent expression. While I understand why that may be desirable to demonstrate the relationship of an adjustment and the expression that requires it, it leads to 1. very verbose borrowck output 2. incorrect spans for suggestions Some diagnostics get around that by giving suggestions relative to other spans we've collected during MIR lowering, such as the span of the method's identifier (e.g. `name` in `.name()`), but this doesn't work too well when things come from desugaring. I assume it also has lead to numerous tweaks and complications to diagnostics code down the road, which this PR doesn't necessarily aim to fix but may open the gates to fixing later... The last three commits are simplifications due to the fact that we can assume that the move span actually points to what is being moved (and a test). This regressed in #89110, which was debated somewhat in #90286. cc `@Aaron1011` who originally made this change. r? diagnostics Fixes #113547 Fixes #111016
2023-07-12Auto merge of #113569 - RalfJung:miri, r=oli-obkbors-84/+546
miri: protect Move() function arguments during the call This gives `Move` operands a meaning specific to function calls: - for the duration of the call, the place the operand comes from is protected, making all read and write accesses insta-UB. - the contents of that place are reset to `Uninit`, so looking at them again after the function returns, we cannot observe their contents Turns out we can replace the existing "retag return place" hack with the exact same sort of protection on the return place, which is nicely symmetric. Fixes https://github.com/rust-lang/rust/issues/112564 Fixes https://github.com/rust-lang/miri/issues/2927 This starts with a Miri rustc-push, since we'd otherwise conflict with a PR that recently landed in Miri. (The "miri tree borrows" commit is an unrelated cleanup I noticed while doing the PR. I can remove it if you prefer.) r? `@oli-obk`
2023-07-12Update cargoWeihang Lo-0/+3
2023-07-12Allow to have `-` in the rustdoc-json test file nameGuillaume Gomez-4/+13
2023-07-11Rollup merge of #113373 - jyn514:download-rustc-fixes, r=albertlarsan68Jubilee-7/+0
various download-rustc fixes separated out from https://github.com/rust-lang/rust/pull/112143 because it keeps getting stuck in limbo. best reviewed commit-by-commit
2023-07-11Revert "Fix `x test lint-docs` when download-rustc is enabled"jyn-7/+0
This was not the correct fix. The problem was two-fold: - `download-rustc` didn't respect `llvm.assertions` - `rust-dev` was missing a bump to `download-ci-llvm-stamp` The first is fixed in this PR and the latter was fixed a while ago. Revert this change to avoid breaking `rpath = false`.
2023-07-11Support build-pass in codegen testsJubilee Young-12/+13
2023-07-11fix handling of alignment for dyn-sized placesRalf Jung-5/+6
2023-07-11miri tree borrows: skip retag_reference early if there is no NewPermissionRalf Jung-13/+15
2023-07-11miri: protect Move() function arguments during the callRalf Jung-85/+422
2023-07-11Auto merge of #111717 - Urgau:uplift_fn_null_check, r=oli-obkbors-223/+64
Uplift `clippy::fn_null_check` lint This PR aims at uplifting the `clippy::fn_null_check` lint into rustc. ## `incorrect_fn_null_checks` (warn-by-default) The `incorrect_fn_null_checks` lint checks for expression that checks if a function pointer is null. ### Example ```rust let fn_ptr: fn() = /* somehow obtained nullable function pointer */ if (fn_ptr as *const ()).is_null() { /* ... */ } ``` ### Explanation Function pointers are assumed to be non-null, checking for their nullity is incorrect. ----- Mostly followed the instructions for uplifting a clippy lint described here: https://github.com/rust-lang/rust/pull/99696#pullrequestreview-1134072751 `@rustbot` label: +I-lang-nominated r? compiler
2023-07-10Don't use serde-derive in the rls shimJosh Stone-5/+5
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-10Do not set up wrong span for adjustmentsMichael Goulet-15/+8
2023-07-10Drop uplifted `clippy::fn_null_check`Urgau-223/+64
2023-07-10Remove the library/term exception in tidy's pal checker codebjorn3-1/+0
This crate doesn't exist anymore.
2023-07-10Merge from rustcRalf Jung-140/+1522
2023-07-10Preparing for merge from rustcRalf Jung-1/+1
2023-07-10Auto merge of #108796 - devsnek:personality-pal-exception, r=workingjubileebors-2/+0
move personality to sys this moves `personality` to sys, removing another PAL exception
2023-07-09move personality to sysGus Caplan-2/+0
2023-07-10Auto merge of #108485 - devsnek:float-pat-exception, r=workingjubileebors-2/+0
move pal cfgs in f32 and f64 to sys I'd like to push forward on `sys` being a separate crate. To start with, most of these PAL exception cases are very simple little bits of code like this, so I thought I would try tidying them up.
2023-07-09move pal cfgs in f32 and f64 to sysGus Caplan-2/+0
2023-07-09test and fix return place alias restrictionsRalf Jung-2/+124
2023-07-09Auto merge of #113488 - RalfJung:miri, r=RalfJungbors-98/+251
update Miri
2023-07-09Auto merge of #113306 - tgross35:debuginfo-better-output, r=Mark-Simulacrumbors-108/+131
Update debuginfo test runner to provide more useful output This change makes debuginfo tests more user friendly. Changes: - Print all lines that fail to match the patterns instead of just the first - Provide better error messages that also say what did match - Strip leading whitespace from directives so they are not skipped if indented - Improve documentation and improve nesting on some related items As an example, given the following intentional fail (and a few not shown): ```rust // from tests/debuginfo/rc_arc.rs // cdb-command:dx rc,d // cdb-check:rc,d : 111 [Type: alloc::rc::Rc<i32>] // cdb-check: [Reference count] : 11 [Type: core::cell FAIL::Cell<usize>] // cdb-check: [Weak reference count] : 2 [Type: core::cell FAIL::Cell<usize>] ``` The current output (tested in #113313) will show: ``` 2023-07-04T08:10:00.1939267Z ---- [debuginfo-cdb] tests\debuginfo\rc_arc.rs stdout ---- 2023-07-04T08:10:00.1942182Z 2023-07-04T08:10:00.1957463Z error: line not found in debugger output: [Reference count] : 11 [Type: core:: cell FAIL::Cell<usize>] 2023-07-04T08:10:00.1958272Z status: exit code: 0 ``` With this chane, you are able to see all failures in that check group, as well as what parts were successful. The output is now: ``` 2023-07-04T09:45:57.2514224Z error: check directive(s) from `C:\a\rust\rust\tests\debuginfo\rc_arc.rs` not found in debugger output. errors: 2023-07-04T09:45:57.2514631Z (rc_arc.rs:31) ` [Reference count] : 11 [Type: core::cell FAIL::Cell<usize>]` 2023-07-04T09:45:57.2514908Z (rc_arc.rs:32) ` [Weak reference count] : 2 [Type: core::cell FAIL::Cell<usize>]` 2023-07-04T09:45:57.2515181Z (rc_arc.rs:41) ` [Reference count] : 21 [Type: core::sync::atomic FAIL::AtomicUsize]` 2023-07-04T09:45:57.2515452Z (rc_arc.rs:50) `dyn_rc,d [Type: alloc::rc::Rc<dyn$<core::fmt FAIL::Debug> >]` 2023-07-04T09:45:57.2515695Z the following subset of check directive(s) was found successfully:: 2023-07-04T09:45:57.2516080Z (rc_arc.rs:30) `rc,d : 111 [Type: alloc::rc::Rc<i32>]` 2023-07-04T09:45:57.2516312Z (rc_arc.rs:35) `weak_rc,d : 111 [Type: alloc::rc::Weak<i32>]` 2023-07-04T09:45:57.2516555Z (rc_arc.rs:36) ` [Reference count] : 11 [Type: core::cell::Cell<usize>]` 2023-07-04T09:45:57.2516881Z (rc_arc.rs:37) ` [Weak reference count] : 2 [Type: core::cell::Cell<usize>]` ... ``` Which makes it easier to see what did and didn't succeed without manual comparison against the source test file.
2023-07-09Auto merge of #112235 - Kobzol:opt-dist, r=Mark-Simulacrumbors-0/+1337
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-09Port PGO/LTO/BOLT optimized build pipeline to RustJakub Beránek-0/+1337
2023-07-09Auto merge of #113276 - Nilstrieb:rustix, r=Mark-Simulacrumbors-0/+2
Update rustix The issue has been fixed. https://github.com/bytecodealliance/rustix/issues/716
2023-07-08Auto merge of #113450 - Nilstrieb:src/bootstrap/test.rs, r=flip1995bors-19/+0
Fail the build if clippy tests don't pass This was removed in https://github.com/rust-lang/rust/pull/113260/commits/de69d556eb5006a21f868b8c12d48f0ef1308a5a#diff-8479eab02701e686aedb15b567dc8fc31220c6e4efb9565ccc9d662b7fee2214 which caused CI to ignore clippy failures. This adds back the exit, which should cause CI to fail again if a test is broken (like right now, as clippy tests are broken on master). Also see https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/CI.20doesn't.20care.20about.20clippy.20test.20failures.20but.20only.20sometime r? flip1995
2023-07-08Delete `to_string_in_format_args_incremental.rs`Nilstrieb-19/+0
It fails CI and passes locally. It passes random directores in `-Cincremental` so maybe something's up. It shouldn't block us here.
2023-07-08Auto merge of #113376 - ↵bors-9/+9
Nilstrieb:pointer-coercions-are-not-casts-because-that-sounds-way-to-general-aaaa, r=oli-obk Rename `adjustment::PointerCast` and variants using it to `PointerCoercion` It makes it sounds like the `ExprKind` and `Rvalue` are supposed to represent all pointer related casts, when in reality their just used to share a little enum variants. Make it clear there these are only coercions and that people who see this and think "why are so many pointer related casts not in these variants" aren't insane. This enum was added in #59987. I'm not sure whether the variant sharing is actually worth it, but this at least makes it less confusing. r? oli-obk
2023-07-08Merge from rustcThe Miri Conjob Bot-42/+22
2023-07-08Preparing for merge from rustcThe Miri Conjob Bot-1/+1
2023-07-07Rollup merge of #113466 - weihanglo:update-cargo, r=weihangloMichael Goulet-0/+0
Update cargo 1 commits in 5b377cece0e0dd0af686cf53ce4637d5d85c2a10..45782b6b8afd1da042d45c2daeec9c0744f72cc7 2023-06-30 00:01:00 +0000 to 2023-07-05 16:54:51 +0000 - docs(ref): Provide guidance on version requirements (rust-lang/cargo#12323) r? ``@ghost``
2023-07-07Rollup merge of #113441 - RalfJung:assign-no-overlap, r=oli-obkMichael Goulet-0/+43
miri: check that assignments do not self-overlap r? `````@oli-obk`````
2023-07-08Eagerly resolve vars in predicate during coercion loopMichael Goulet-1/+1
2023-07-07Update cargoWeihang Lo-0/+0
2023-07-07Fix failing clippy testsAlex Macleod-41/+21
Comments out the C string literals due to https://github.com/rust-lang/rust/pull/113334 Fixes https://github.com/rust-lang/rust-clippy/issues/11121
2023-07-07Rename `adjustment::PointerCast` and variants using it to `PointerCoercion`Nilstrieb-9/+9
It makes it sound like the `ExprKind` and `Rvalue` are supposed to represent all pointer related casts, when in reality their just used to share a some enum variants. Make it clear there these are only coercion to make it clear why only some pointer related "casts" are in the enum.
2023-07-07miri: check that assignments do not self-overlapRalf Jung-0/+43