about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2023-07-09Auto merge of #113508 - matthiaskrgr:rollup-xzrp4nt, r=matthiaskrgrbors-63/+68
Rollup of 5 pull requests Successful merges: - #111618 (Always name the return place.) - #113247 (Add Tests for native wasm exceptions) - #113273 (Use String or Int to set the opt level) - #113469 (Remove `default_free_fn` feature) - #113493 (additional io::copy specializations) r? `@ghost` `@rustbot` modify labels: rollup
2023-07-09test and fix return place alias restrictionsRalf Jung-2/+124
2023-07-09Rollup merge of #113469 - JohnTitor:rm-default-free-fn, r=AmanieuMatthias Krüger-47/+0
Remove `default_free_fn` feature Closes #73014 r? ``@Amanieu``
2023-07-09Rollup merge of #113273 - hi-rustin:rustin-patch-opt-level, r=KobzolMatthias Krüger-14/+64
Use String or Int to set the opt level Address https://github.com/rust-lang/rust/pull/112756/files#r1249345725 Use String or Int to set the opt level. r? ``@jyn514``
2023-07-09Rollup merge of #113247 - mirkootter:test-wasm-exceptions-nostd, ↵Matthias Krüger-2/+4
r=Mark-Simulacrum Add Tests for native wasm exceptions ### Motivation In PR #111322, I added support for native WASM exceptions. I was asked by ``@davidtwco`` to add some tests for it in a follow up PR, which seems like a very good idea. This PR adds three tests for this feature: * codegen: ensure the correct LLVM instructions are used * assembly: ensure the correct WASM instructions are used * run-make: ensure the exception handling works; the WASM code is run using a small nodejs script which demonstrates the exception handling ### Complications There are a few changes beside adding the tests, which were necessary * Tests for the wasm32-unknown-unknown target are (as far as I know) only run on `test-various`. Its docker image uses nodejs-15, which is very old. Experimental support for wasm-exceptions was added in nodejs16. In nodejs 18.12 (LTS), they are stable. - --> increase nodejs to 18.12 in `test-various` * codegen/assembly tests are not performed for the wasm32-unknown-unknown target yet - --> add those to `test-various` as well Due to the last point, some tests are run which have not run before (assembly+codegen tests for wasm32-unknown-unknown). I added `// ignore wasm32-bare` for those which failed ### Local testing I run all tests locally using both `test-various` and `wasm32`. As far as I know, none of the other systems run any test for wasm32 targets.
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-1138/+1361
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-1138/+1361
2023-07-09Use String or Int to set the opt levelhi-rustin-14/+64
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
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-09Auto merge of #113485 - Mark-Simulacrum:bump-version, r=Mark-Simulacrumbors-1/+1
Bump version to 1.73 r? `@Mark-Simulacrum`
2023-07-08Replace RPITIT current impl with new strategy that lowers as a GATSantiago Pastorino-3/+2
2023-07-08Auto merge of #113484 - matthiaskrgr:rollup-goq2u0d, r=matthiaskrgrbors-3/+3
Rollup of 7 pull requests Successful merges: - #112931 (Enable zlib in LLVM on aarch64-apple-darwin) - #113158 (tests: unset `RUSTC_LOG_COLOR` in a test) - #113173 (CI: include workflow name in concurrency group) - #113335 (Reveal opaques in new solver) - #113390 (CGU formation tweaks) - #113399 (Structurally normalize again for byte string lit pat checking) - #113412 (Add basic types to SMIR) r? `@ghost` `@rustbot` modify labels: rollup
2023-07-08Auto merge of #113450 - Nilstrieb:src/bootstrap/test.rs, r=flip1995bors-19/+4
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-08Fail the build if clippy tests don't passNilstrieb-0/+4
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).
2023-07-08Bump versionMark Rousskov-1/+1
2023-07-08Rollup merge of #113173 - Kobzol:ci-concurrency-group-workflow, r=pietroalbiniMatthias Krüger-1/+1
CI: include workflow name in concurrency group Currently, this won't change anything, because we only have one relevant workflow (`CI`), but for future proofing we should probably include the workflow name in the concurrency group. Found by ``@klensy`` [here](https://github.com/rust-lang/rust/pull/113059#discussion_r1247213606).
2023-07-08Rollup merge of #112931 - cbeuw:apple-zlib, r=Mark-SimulacrumMatthias Krüger-2/+2
Enable zlib in LLVM on aarch64-apple-darwin Works on macOS 13.4, Xcode version 14.3.1.0.1.1683849156 This was disabled in #75500 on Apple Silicon Developer Transition Kit, but Apple appears to have fixed their zlib now
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-08Remove `default_free_fn` featureYuki Okushi-47/+0
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
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
2023-07-07Auto merge of #2969 - oli-obk:run-dep, r=RalfJungbors-10/+11
Stop parsing ui_test annotations in `run-dep` mode fixes #2967
2023-07-07MIRIFLAGS are already passed in the `./miri` wrapperOli Scherer-5/+0
2023-07-07Remove a now-useless flagOli Scherer-1/+0
2023-07-07Silence all the boilerplate around `./miri run` and `./miri run-dep`Oli Scherer-1/+1
2023-07-07Use new std::simd fn in miri testsJubilee Young-1/+1
Old fn were slightly divergent.
2023-07-07fmtThe Miri Conjob Bot-19/+26
2023-07-07Merge from rustcThe Miri Conjob Bot-1085/+1052
2023-07-07Preparing for merge from rustcThe Miri Conjob Bot-1/+1
2023-07-07Auto merge of #112816 - Amanieu:llvm-riscv-arch, r=cuviperbors-0/+0
Update LLVM submodule This adds https://github.com/rust-lang/llvm-project/pull/147.
2023-07-07Auto merge of #112796 - Kobzol:ci-merge-msvc-cargo-tools, r=pietroalbinibors-9/+3
CI: merge msvc cargo and tools jobs The `x86_64-msvc-cargo` and `x86_64-msvc-tools` jobs both run for ~1 hour, but most of that time is actually spent in building LLVM and `rustc`, so I want to try merging them. ![image](https://github.com/rust-lang/rust/assets/4539057/8652fa2a-b8b7-41d0-8f16-555d31acd9a5)
2023-07-06Auto merge of #112779 - Kobzol:ci-merge-llvm-14, r=pietroalbinibors-76/+40
CI: merge x86_64-gnu-llvm-14 and x86_64-gnu-llvm-14-stage1 CI jobs Another attempt to shorten CI job times. Suggested by `@the8472` [here](https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/CI.20usage/near/367172221).
2023-07-06Actually use `tracing` for loggingDeadbeef-1/+1
2023-07-06Auto merge of #113323 - Kobzol:pgo-script-llvm-ci, r=jyn514bors-2/+7
Use `llvm-config` instead of `download-ci-llvm` in PGO script This should avoid CI breakage when the LLVM stamp is updated, and also it will avoid an unnecessary LLVM download from CI. r? `@jyn514`
2023-07-06Stop parsing ui_test annotations in `run-dep` modeOli Scherer-10/+17
2023-07-06Auto merge of #113406 - matthiaskrgr:rollup-0rprs5k, r=matthiaskrgrbors-2/+5
Rollup of 4 pull requests Successful merges: - #112295 (Fix the tests-listing-format-json test on Windows) - #113246 (fix compiletest crash) - #113395 (Dont ICE for `dyn* Trait: Trait` (built-in object) goals during selection in new trait solver) - #113402 (Diagnose unsorted CGUs.) r? `@ghost` `@rustbot` modify labels: rollup
2023-07-06Rollup merge of #113246 - mirkootter:fix-compiletest-crash, r=pietroalbiniMatthias Krüger-1/+1
fix compiletest crash ### Motivation When running compiler-tests locally for the `wasm32` platform, one test repeatedly crashed. It does not crash on the CI, only locally. Investigation shows that the `compiletest` itself crashes > panicked-at-attempt-to-subtract-with-overflow ```rust let mut head = replace(bytes, Vec::new()); let mut middle = head.split_off(HEAD_LEN); // The following line will panic let tail = middle.split_off(middle.len() - TAIL_LEN).into_boxed_slice(); let skipped = new_len - HEAD_LEN - TAIL_LEN; ``` ### Background The code in question collects the output of a process. Small output is kept completely, but larger output is kept only partially: the first 160 kB and the last 256 kB. The code that performs this split crashes if the data size is less than 416 kB. There is an early out based on the "filtered" length, but it is possible that the filtered length is greater than the real length. It seems that this code was written with the assumption that the filtered length is larger than the real length, which is not true in general. When running CI tests locally using `src/ci/docker/run.sh`, the filtered folder is `/checkout`, which is shorter than the placeholder length of 32 bytes. ### Note This PR should not change any behaviour. It only adds an early our for a case which will definitely crash (at least if compiletest is build with integer checks). Note that an early out makes sense here: If the real data is too small, it does not sense to split it.
2023-07-06Rollup merge of #112295 - ↵Matthias Krüger-1/+4
ForrestOfBarnes:tests-listing-format-json-windows-fix, r=pietroalbini Fix the tests-listing-format-json test on Windows tests/ui/test-attrs/tests-listing-json-format.rs was failing on Windows because each path in the json-formatted output contained "\\\\" instead of "\\". `runtest::TestCx::normalize_output` already checks the compile flags for json-related arguments to handle this case, so I added an equivalent check for the new run flag.
2023-07-06Auto merge of #113377 - BoxyUwU:move_ty_ctors_to_ty, r=compiler-errorsbors-31/+35
Move `TyCtxt::mk_x` to `Ty::new_x` where applicable Part of rust-lang/compiler-team#616 turns out there's a lot of places we construct `Ty` this is a ridiculously huge PR :S r? `@oli-obk`
2023-07-06Ignore test on appleOli Scherer-0/+1