about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2024-07-07doc fixups from reviewMaybe Waffle-9/+7
2024-07-07add miri tests and a fixmeMaybe Waffle-0/+112
2024-07-07Refactor & fixup interpreter implementation of tail callsMaybe Waffle-70/+162
2024-07-07Add support for `mir::TerminatorKind::TailCall` in clippyMaybe Waffle-1/+2
2024-07-07Fix unconditional recursion lint wrt tail callsMaybe Waffle-2/+58
2024-07-07Refactor common part of evaluating `Call`&`TailCall` in the interpreterMaybe Waffle-63/+56
2024-07-07Support tail calls in the interpreterMaybe Waffle-1/+281
2024-07-07Properly handle drops for tail callsDrMeepster-18/+1443
2024-07-07Support tail calls in mir via `TerminatorKind::TailCall`Maybe Waffle-88/+328
2024-07-04Auto merge of #127120 - Kobzol:bootstrap-cmd-refactor-3, r=onur-ozkanbors-348/+401
Bootstrap command refactoring: consolidate output modes (step 3) This PR is a continuation to https://github.com/rust-lang/rust/pull/126731. It consolidates the output modes of bootstrap (`Print` vs `CaptureAll` vs `CaptureStdout`) and simplifies the logic around error printing (now a command error is always printed if the failure is not ignored). It also ports even more usages of `Command` to `BootstrapCommand`, most notably the git helpers and many usages of the `output` function. The last commit was added because the third commit made two variants of the `Tool` enum unused (no idea why, but it seems to have been a false positive that they were used before). It can be reviewed now, but I would wait with merging until at least a few days after https://github.com/rust-lang/rust/pull/126731, just to catch any potential issues from that PR before we move further. As a next step, I want to clean up the API of the command a little bit to make usage easier (currently it's a bit verbose), and then continue with the rest of the tasks from the tracking issue. As always, best reviewed commit by commit. Tracking issue: https://github.com/rust-lang/rust/issues/126819 r? `@onur-ozkan` try-job: aarch64-apple
2024-07-04Auto merge of #127305 - jhpratt:rollup-3p5wf3h, r=jhprattbors-23/+74
Rollup of 5 pull requests Successful merges: - #126792 (wasm64 build with target-feature=+simd128,+atomics) - #127195 (Remove unqualified form import of io::Error in process_vxworks.rs and fallback on remove_dir_impl for vxworks) - #127287 (jsondocck: Use correct index for error message.) - #127289 (rustdoc-json: Better representation of lifetime bounds in where clauses.) - #127303 (chore: remove repeat words) r? `@ghost` `@rustbot` modify labels: rollup
2024-07-04Do not consider LLDB version to be valid if it is emptyJakub Beránek-8/+3
When dry run is enabled, the command for finding LLDB version would succeed, but return an empty string. This was inadvertently enabling a code path that should only be executed when the LLDB is actually present and its version is valid. This commit makes sure that if the version is empty, LLDB will be considered not found.
2024-07-04Rollup merge of #127303 - cuishuang:master, r=jhprattJacob Pratt-2/+2
chore: remove repeat words
2024-07-04Rollup merge of #127289 - aDotInTheVoid:rustdoc-json-lt, r=GuillaumeGomezJacob Pratt-8/+47
rustdoc-json: Better representation of lifetime bounds in where clauses. As suggested [on zulip][1] (CC `@its-the-shrimp),` there's no need to use `GenericBound` here, as the only bound a lifetime can have is that it outlives other lifetimes. While we're making breaking changes here, I also renamed it from using "region" to "lifetime", as this is more user-aligned. See [this comment][2] for details. [1]: https://rust-lang.zulipchat.com/#narrow/stream/266220-t-rustdoc/topic/.60ItemEnum.3A.3AOpaqueTy.60/near/448871430 [2]: https://github.com/rust-lang/rust/issues/100961#issuecomment-2206565556 r? `@GuillaumeGomez`
2024-07-04Rollup merge of #127287 - aDotInTheVoid:jsondocck-index, r=GuillaumeGomezJacob Pratt-1/+3
jsondocck: Use correct index for error message. If you misused a count command like ``@count` $some.selector '"T'"`, you would panic with OOB: ``` thread 'main' panicked at src/tools/jsondocck/src/main.rs:76:92: index out of bounds: the len is 2 but the index is 2 ``` This is because 57c85bd97da3 removed the file param, but didn't update the error case. We now error with: ``` Invalid command: Second argument to `@count` must be a valid usize (got `"T"`) on line 20 ``` As some point I want to rewrite this code to avoid indexing in general, but this is a nice small fix. r? `@GuillaumeGomez`
2024-07-04Rollup merge of #127195 - biabbas:vxworks_cleanup, r=jhprattJacob Pratt-2/+4
Remove unqualified form import of io::Error in process_vxworks.rs and fallback on remove_dir_impl for vxworks Hi all, This is to address issue #127084. On inspections it was found that io::Error refrences were all of qualified form and there was no need to add a unqualified form import. Also to successfully build rust for vxworks, we need to fallback on the remove_impl_dir implementations. Thank you.
2024-07-04Rollup merge of #126792 - wooden-worm:master, r=Mark-SimulacrumJacob Pratt-10/+18
wasm64 build with target-feature=+simd128,+atomics Fixes https://github.com/rust-lang/rust/issues/126778
2024-07-04chore: remove repeat wordscuishuang-2/+2
Signed-off-by: cuishuang <imcusg@gmail.com>
2024-07-04Auto merge of #127293 - ldm0:ldm_coroutine, r=saethlinbors-19/+21
Use `IndexVec` for coroutine local mapping Resolves a old FIXME
2024-07-04Auto merge of #127226 - mat-1:optimize-siphash-round, r=nnethercotebors-10/+12
Optimize SipHash by reordering compress instructions This PR optimizes hashing by changing the order of instructions in the sip.rs `compress` macro so the CPU can parallelize it better. The new order is taken directly from Fig 2.1 in [the SipHash paper](https://eprint.iacr.org/2012/351.pdf) (but with the xors moved which makes it a little faster). I attempted to optimize it some more after this, but I think this might be the optimal instruction order. Note that this shouldn't change the behavior of hashing at all, only statements that don't depend on each other were reordered. It appears like the current order hasn't changed since its [original implementation from 2012](https://github.com/rust-lang/rust/commit/fada46c4214f26dbdc0fd150a713aced476e75b5#diff-b751133c229259d7099bbbc7835324e5504b91ab1aded9464f0c48cd22e5e420R35) which doesn't look like it was written with data dependencies in mind. Running `./x bench library/core --stage 0 --test-args hash` before and after this change shows the following results: Before: ``` benchmarks: hash::sip::bench_bytes_4 7.20/iter +/- 0.70 hash::sip::bench_bytes_7 9.01/iter +/- 0.35 hash::sip::bench_bytes_8 8.12/iter +/- 0.10 hash::sip::bench_bytes_a_16 10.07/iter +/- 0.44 hash::sip::bench_bytes_b_32 13.46/iter +/- 0.71 hash::sip::bench_bytes_c_128 37.75/iter +/- 0.48 hash::sip::bench_long_str 121.18/iter +/- 3.01 hash::sip::bench_str_of_8_bytes 11.20/iter +/- 0.25 hash::sip::bench_str_over_8_bytes 11.20/iter +/- 0.26 hash::sip::bench_str_under_8_bytes 9.89/iter +/- 0.59 hash::sip::bench_u32 9.57/iter +/- 0.44 hash::sip::bench_u32_keyed 6.97/iter +/- 0.10 hash::sip::bench_u64 8.63/iter +/- 0.07 ``` After: ``` benchmarks: hash::sip::bench_bytes_4 6.64/iter +/- 0.14 hash::sip::bench_bytes_7 8.19/iter +/- 0.07 hash::sip::bench_bytes_8 8.59/iter +/- 0.68 hash::sip::bench_bytes_a_16 9.73/iter +/- 0.49 hash::sip::bench_bytes_b_32 12.70/iter +/- 0.06 hash::sip::bench_bytes_c_128 32.38/iter +/- 0.20 hash::sip::bench_long_str 102.99/iter +/- 0.82 hash::sip::bench_str_of_8_bytes 10.71/iter +/- 0.21 hash::sip::bench_str_over_8_bytes 11.73/iter +/- 0.17 hash::sip::bench_str_under_8_bytes 10.33/iter +/- 0.41 hash::sip::bench_u32 10.41/iter +/- 0.29 hash::sip::bench_u32_keyed 9.50/iter +/- 0.30 hash::sip::bench_u64 8.44/iter +/- 1.09 ``` I ran this on my computer so there's some noise, but you can tell at least `bench_long_str` is significantly faster (~18%). Also, I noticed the same compress function from the library is used in the compiler as well, so I took the liberty of copy-pasting this change to there as well. Thanks `@semisol` for porting SipHash for another project which led me to notice this issue in Rust, and for helping investigate. <3
2024-07-04Auto merge of #127127 - notriddle:notriddle/pulldown-cmark-0.11, ↵bors-94/+385
r=GuillaumeGomez rustdoc: update to pulldown-cmark 0.11 r? rustdoc This pull request updates rustdoc to the latest version of pulldown-cmark. Along with adding new markdown extensions (which this PR doesn't enable), the new pulldown-cmark version also fixes a large number of bugs. Because all text files successfully parse as markdown, these bugfixes change the output, which can break people's existing docs. A crater run, https://github.com/rust-lang/rust/pull/121659, has already been run for this change. The first commit upgrades and fixes rustdoc. The second commit adds a lint for the footnote and block quote parser changes, which break the largest numbers of docs in the Crater run. The strikethrough change was mitigated in pulldown-cmark itself. Unblocks https://github.com/rust-lang/rust-clippy/pull/12876
2024-07-03Auto merge of #127296 - matthiaskrgr:rollup-1t1isa7, r=matthiaskrgrbors-234/+477
Rollup of 6 pull requests Successful merges: - #127092 (Change return-type-notation to use `(..)`) - #127184 (More refactorings to rustc_interface) - #127190 (Update LLVM submodule) - #127253 (Fix incorrect suggestion for extra argument with a type error) - #127280 (Disable rmake test rustdoc-io-error on riscv64gc-gnu) - #127294 (Less magic number for corountine) r? `@ghost` `@rustbot` modify labels: rollup
2024-07-03Rollup merge of #127294 - ldm0:ldm_coroutine2, r=lcnrMatthias Krüger-6/+7
Less magic number for corountine
2024-07-03Rollup merge of #127280 - ↵Matthias Krüger-2/+7
ferrocene:hoverbear/disable-rmake-rustdoc-io-error, r=jieyouxu Disable rmake test rustdoc-io-error on riscv64gc-gnu In https://github.com/rust-lang/rust/pull/126917 we disabled `inaccessible-temp-dir` on `riscv64gc-gnu` because the container runs the build as `root` (just like the `armhf-gnu` builds). Tests creating an inaccessible test directory are not possible, since `root` can always touch those directories. https://github.com/rust-lang/rust/blob/553a69030e5a086eb3841d020db8c9c463948c72/src/ci/docker/host-x86_64/disabled/riscv64gc-gnu/Dockerfile#L99 This means the tests are run as `root`. As `root`, it's perfectly normal and reasonable to violate permission checks this way: ```bash $ sudo mkdir scratch $ sudo chmod o-w scratch $ sudo mkdir scratch/backs $ ``` Because of this, this PR makes the test ignored on `riscv64gc` (just like on `armhf-gnu`) for now. As an alternative, I believe the best long-term strategy would be to not run the tests as `root` for this job. Some preliminary exploration was done in https://github.com/rust-lang/rust/pull/126917#issuecomment-2189933970, however that appears a larger lift. ## Testing > [!NOTE] > `riscv64gc-unknown-linux-gnu` is a [**Tier 2 with Host Tools** platform](https://doc.rust-lang.org/beta/rustc/platform-support.html), all tests may not necessarily pass! This change should only ignore `inaccessible-temp-dir` and not affect other tests. You can test out the job locally: ```sh DEPLOY=1 ./src/ci/docker/run.sh riscv64gc-gnu ``` r? `@jieyouxu`
2024-07-03Rollup merge of #127253 - chenyukang:yukang-fix-126246-fn-parameters-check, ↵Matthias Krüger-0/+171
r=estebank Fix incorrect suggestion for extra argument with a type error Fixes #126246 I tried to fix it in the `find_errors` of ArgMatrix, but seems it's hard to avoid breaking some other test cases. The root cause is we eliminate the first argument even with a type error at here: https://github.com/rust-lang/rust/blob/6292b2af620dbd771ebb687c3a93c69ba8f97268/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs#L664 So the left argument is always treated as extra one. But if there is already a type error, an error message will be generated firstly, which make this issue a trivial one.
2024-07-03Rollup merge of #127190 - DianQK:llvm-backport, r=nikicMatthias Krüger-0/+0
Update LLVM submodule Fixes #112548 and unlock #125642. r? ``@cuviper`` or ``@nikic``
2024-07-03Rollup merge of #127184 - bjorn3:interface_refactor2, r=NadrierilMatthias Krüger-47/+44
More refactorings to rustc_interface Follow up to https://github.com/rust-lang/rust/pull/126834
2024-07-03Rollup merge of #127092 - compiler-errors:rtn-dots-redux, r=estebankMatthias Krüger-179/+248
Change return-type-notation to use `(..)` Aligns the syntax with the current wording of [RFC 3654](https://github.com/rust-lang/rfcs/pull/3654). Also implements rustfmt support (along with making a match exhaustive). Tracking: * https://github.com/rust-lang/rust/issues/109417
2024-07-04Less magic number for corountineLiu Dingming-6/+7
2024-07-03Auto merge of #127044 - Oneirical:fantestic-journey, r=Kobzol,jieyouxubors-76/+134
Migrate `dylib-chain`, `rlib-chain`, `issue-47384`, `msvc-opt-minsize` and `test-harness` `run-make` tests to ui/rmake 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
2024-07-04Use `IndexVec` for coroutine local mappingLiu Dingming-19/+21
2024-07-03rustdoc-json: Better representation of lifetime bounds in where clauses.Alona Enraght-Moony-8/+47
As suggested [on zulip][1], there's no need to use `GenericBound` here, as the only bound a lifetime can have is that it outlives other lifetimes. While we're making breaking changes here, I also renamed it from using "region" to "lifetime", as this is more user-aligned. See [this comment][2] for details. [1]: https://rust-lang.zulipchat.com/#narrow/stream/266220-t-rustdoc/topic/.60ItemEnum.3A.3AOpaqueTy.60/near/448871430 [2]: https://github.com/rust-lang/rust/issues/100961#issuecomment-2206565556
2024-07-03jsondocck: Use correct index for error message.Alona Enraght-Moony-1/+3
If you misused a count command like `@count $some.selector '"T'"`, you would panic with OOB: ``` thread 'main' panicked at src/tools/jsondocck/src/main.rs:76:92: index out of bounds: the len is 2 but the index is 2 ``` Fixing this typo, we now get. ``` Invalid command: Second argument to @count must be a valid usize (got `"T"`) on line 20 ``` As some point I want to rewrite this code to avoid indexing in general, but this is a nice small fix.
2024-07-03Rebase on masterJakub Beránek-1/+5
2024-07-03Simplify and generalize implementation of output modeJakub Beránek-38/+42
2024-07-03Review changesJakub Beránek-18/+18
2024-07-03Handle execution of dry run commandsJakub Beránek-8/+23
2024-07-03Refactor command outcome handlingJakub Beránek-51/+93
To handle the case of failing to start a `BootstrapCommand`.
2024-07-03Allow unused `Tool` variantsJakub Beránek-0/+1
2024-07-03Remove various usages of the `output` functionJakub Beránek-132/+120
2024-07-03Remove temporary `BootstrapCommand` trait implsJakub Beránek-143/+114
2024-07-03Make `git` helper return `BootstrapCmd`Jakub Beránek-80/+112
2024-07-03Improve documentationJakub Beránek-3/+4
2024-07-03Auto merge of #127036 - cjgillot:sparse-state, r=oli-obkbors-80/+141
Make jump threading state sparse Continuation of https://github.com/rust-lang/rust/pull/127024 Both dataflow const-prop and jump threading involve cloning the state vector a lot. This PR replaces the data structure by a sparse vector, considering: - that jump threading state is typically very sparse (at most 1 or 2 set entries); - that dataflow const-prop is disabled by default; - that place/value map is very eager, and prone to creating an overly large state. The first commit is shared with the previous PR to avoid needless conflicts. r? `@oli-obk`
2024-07-03Disable rmake test rustdoc-io-error on riscv64gc-gnuAna Hobden-2/+7
2024-07-03Auto merge of #127278 - matthiaskrgr:rollup-fjexkdr, r=matthiaskrgrbors-274/+559
Rollup of 8 pull requests Successful merges: - #126803 (Change `asm-comments` to `verbose-asm`, always emit user comments) - #127050 (Make mtime of reproducible tarballs dependent on git commit) - #127145 (Add `as_lang_item` to `LanguageItems`, new trait solver) - #127202 (Remove global error count checks from typeck) - #127233 (Some parser cleanups) - #127248 (Add parse fail test using safe trait/impl trait) - #127264 (Small `run-make-support` API improvements) - #127270 (bootstrap: pass correct struct size to winapi) r? `@ghost` `@rustbot` modify labels: rollup
2024-07-03Rollup merge of #127270 - klensy:PROCESS_MEMORY_COUNTERS, r=KobzolMatthias Krüger-12/+5
bootstrap: pass correct struct size to winapi Into K32GetProcessMemoryInfo (https://learn.microsoft.com/en-us/windows/win32/api/psapi/nf-psapi-getprocessmemoryinfo) passed in pointer to PROCESS_MEMORY_COUNTERS, but size of PROCESS_MEMORY_COUNTERS_EX, whoops.
2024-07-03Rollup merge of #127264 - GuillaumeGomez:run-make-support-api-improvements, ↵Matthias Krüger-4/+7
r=Kobzol Small `run-make-support` API improvements r? `@Kobzol`
2024-07-03Rollup merge of #127248 - spastorino:unsafe-extern-tests, r=compiler-errorsMatthias Krüger-0/+47
Add parse fail test using safe trait/impl trait Added 2 more tests to be sure that nothing weird happens using `safe` on items. Needed to do this in separate tests as they give parsing errors.
2024-07-03Rollup merge of #127233 - nnethercote:parser-cleanups, r=petrochenkovMatthias Krüger-120/+98
Some parser cleanups Cleanups I made while looking closely at this code. r? ``@petrochenkov``