about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2025-03-05Rollup merge of #136865 - jieyouxu:long-type-path-compare-mode, r=lqd许杰友 Jieyou Xu (Joe)-2/+15
Perform deeper compiletest path normalization for `$TEST_BUILD_DIR` to account for compare-mode/debugger cases, and normalize long type file filename hashes Fixes #136510. ### Summary - Whereas previously `$TEST_BUILD_DIR` is a normalization of `/path/to/build/test/<test_suite_name>/`, we now more deeply normalize. `$TEST_BUILD_DIR` now becomes a normalization of `/path/to/build/test/<test_suite_name>/<subdirs>/$name.$revision.$compare_mode.$debugger/` to normalize away path name differences when `--compare-mode` and/or `--debugger` are specified. - We also centralize the normalization of long type name hashes cf. https://github.com/rust-lang/rust/pull/136328#discussion_r1936760908. ### Review advice - Best reviewed commit-by-commit. - Split into 3 commits: - **Commit 1**: compiletest changes to have `$TEST_BUILD_DIR` more deeply normalize. - **Commit 2**: remove per-test hacks for long type path hash normalizations, and rebless tests *specifically* affected by that. - **Commit 3**: rebless other tests that were changed as a side-effect of deeper `$TEST_BUILD_DIR` normalizations. **Commit 2** is created via first finding tests that try to perform long type file hash normalizations on an ad hoc, per-test basis: ``` rg --no-ignore -l --no-ignore -F -e "long-type" tests/ui/**/*.rs ``` <details> <summary>Tests with ad hoc long-type hash normalizations</summary> ``` tests/ui/type_length_limit.rs tests/ui/traits/on_unimplemented_long_types.rs tests/ui/regions/issue-102374.rs tests/ui/recursion/recursion.rs tests/ui/recursion/issue-83150.rs tests/ui/recursion/issue-23122-2.rs tests/ui/methods/inherent-bound-in-probe.rs tests/ui/issues/issue-67552.rs tests/ui/issues/issue-37311-type-length-limit/issue-37311.rs tests/ui/issues/issue-20413.rs tests/ui/issues/issue-8727.rs tests/ui/infinite/infinite-instantiation.rs tests/ui/infinite/infinite-instantiation-struct-tail-ice-114484.rs tests/ui/higher-ranked/trait-bounds/hrtb-doesnt-borrow-self-1.rs tests/ui/higher-ranked/trait-bounds/hrtb-doesnt-borrow-self-2.rs tests/ui/higher-ranked/trait-bounds/hang-on-deeply-nested-dyn.rs tests/ui/error-codes/E0275.rs tests/ui/diagnostic-width/secondary-label-with-long-type.rs tests/ui/diagnostic-width/long-e0277.rs tests/ui/diagnostic-width/non-copy-type-moved.rs tests/ui/diagnostic-width/long-E0308.rs tests/ui/diagnostic-width/E0271.rs tests/ui/diagnostic-width/binop.rs ``` </details> These ad hoc normalizations were removed, and they are reblessed. r? `````@lqd`````
2025-03-05Rollup merge of #136581 - jieyouxu:makefile-be-gone, r=Kobzol许杰友 Jieyou Xu (Joe)-429/+18
Retire the legacy `Makefile`-based `run-make` test infra The final piece of [porting run-make tests to use Rust #121876](https://github.com/rust-lang/rust/issues/121876). Closes #121876. Closes #40713. Closes #81791 (no longer using `wc`). Closes #56475 (no longer a problem in current form of that test; we don't ignore the test on `aarch64-unknown-linux-gnu`). ### Summary This PR removes the legacy `Makefile`-based `run-make` test infra which has served us well over the years. The legacy infra is no longer needed since we ported all of `Makefile`-based `run-make` tests to the new `rmake.rs` infra. Additionally, this PR: - Removes `tests/run-make/tools.mk` since no more `Makefile`-based tests remain. - Updates `tests/run-make/README.md` and rustc-dev-guide docs to remove mention about `Makefile`-based `run-make` tests - Update test suite requirements in rustc-dev-guide on Windows to no longer need MSYS2 (they should also now run successfully on native Windows MSVC). - Update `triagebot.toml` to stop backlinking to #121876. **Thanks to everyone who helped in this effort to modernize the `run-make` test infra and test suite!** r? bootstrap
2025-03-05Merge pull request #19274 from Veykril/push-pouwrwwrlrltLukas Wirth-537/+547
Highlight unsafe operations as unsafe, not definitions
2025-03-05Use HIR unsafety information for unsafe syntax highlightngLukas Wirth-537/+547
2025-03-05Improve tracing log format in cargo_workspace.rsArthur Baars-1/+3
2025-03-05Add warning and debug information when `cargo metadata` failsArthur Baars-1/+16
The errors are silently dropped elsewhere, which make it really hard to debug issues due to dependency download failures.
2025-03-05tidy: add check to verify paths in triagebot.tomlklensy-0/+97
2025-03-05add test cases for 'letm' keyword completionTongjun Gao-0/+19
2025-03-05Use size_of from the prelude instead of importedThalia Archibald-34/+24
Use `std::mem::{size_of, size_of_val, align_of, align_of_val}` from the prelude instead of importing or qualifying them. These functions were added to all preludes in Rust 1.80.
2025-03-05minicore: Add size_of to prelude and add rust_2024 preludeThalia Archibald-0/+6
2025-03-04Use size_of from the prelude instead of importedThalia Archibald-1/+1
It was added to all preludes in Rust 1.80.
2025-03-05Merge pull request #19286 from lnicola/twiddle-ciLaurențiu Nicola-2/+1
Twiddle with the `rustup` invocation on CI
2025-03-05Merge pull request #19265 from Shourya742/2025-03-01-add-dangling-dyn-diagnosticLaurențiu Nicola-9/+103
feat: Add diagnostic for dangling dyn and impl
2025-03-05Twiddle with the rustup invocation on CILaurențiu Nicola-2/+1
2025-03-04Rollup merge of #137722 - yotamofek:pr/rustdoc/edition-2024, r=notriddleJubilee-1/+1
`librustdoc`: 2024 edition! 🎊 Like #137333 , but for rustdoc 😁
2025-03-04Rollup merge of #137667 - Kobzol:gcc-dist-build, r=onur-ozkanJubilee-0/+1
Add `dist::Gcc` build step This PR adds a `dist:Gcc` bootstrap step to distribute a prebuilt `libgccjit.so` from CI on x64 Linux. With primed sccache, the build takes ~4 minutes on CI, and produces a 50 MiB archive. I want to land this before adding something akin to `[gcc] download-ci-gcc = true`, to already have the artifacts available on CI, to make it easier to setup the download merge-base logic. r? ``@ghost``
2025-03-04Rollup merge of #137373 - Kobzol:tool-stage0-improve, r=jieyouxuJubilee-119/+69
Compile run-make-support and run-make tests with the bootstrap compiler It does not seem necessary to have to recompile run-make-support on changes to the local compiler/stdlib. This PR simplifies the implementation of a few tools, then switches rms to stage0 and also makes the handling of environment variables in run-make tests simpler. Best reviewed commit-by-commit. I can split it into multiple PRs if you want. Also tested that `COMPILETEST_FORCE_STAGE0=1 ./x test tests/run-make --stage 0` still works. Incredibly, it looks like it even passes more tests than on `master` :laughing: r? ``@jieyouxu``
2025-03-04Rollup merge of #137077 - Kobzol:citool-test-metrics, r=marcoieniJubilee-70/+3
Postprocess bootstrap metrics into GitHub job summary This PR adds a postprocessing step to each CI job that writes the build and test step bootstrap metrics into [GitHub job summary](https://github.blog/news-insights/product-news/supercharging-github-actions-with-job-summaries/). You can see an example result for dist and test jobs [here](https://github.com/rust-lang-ci/rust/actions/runs/13619495480). r? ``@ghost`` try-job: dist-x86_64-illumos try-job: x86_64-gnu
2025-03-04Auto merge of #135695 - Noratrieb:elf-raw-dylib, r=bjorn3bors-0/+12
Support raw-dylib link kind on ELF raw-dylib is a link kind that allows rustc to link against a library without having any library files present. This currently only exists on Windows. rustc will take all the symbols from raw-dylib link blocks and put them in an import library, where they can then be resolved by the linker. While import libraries don't exist on ELF, it would still be convenient to have this same functionality. Not having the libraries present at build-time can be convenient for several reasons, especially cross-compilation. With raw-dylib, code linking against a library can be cross-compiled without needing to have these libraries available on the build machine. If the libc crate makes use of this, it would allow cross-compilation without having any libc available on the build machine. This is not yet possible with this implementation, at least against libc's like glibc that use symbol versioning. The raw-dylib kind could be extended with support for symbol versioning in the future. This implementation is very experimental and I have not tested it very well. I have tested it for a toy example and the lz4-sys crate, where it was able to successfully link a binary despite not having a corresponding library at build-time. I was inspired by Björn's comments in https://internals.rust-lang.org/t/bundle-zig-cc-in-rustup-by-default/22096/27 Tracking issue: #135694 r? bjorn3 try-job: aarch64-apple try-job: x86_64-msvc-1 try-job: x86_64-msvc-2 try-job: test-various
2025-03-04Move `BuildStep` and metric logging into `build_helper`Jakub Beránek-70/+3
2025-03-04`librustdoc`: 2024 edition! 🎊Yotam Ofek-1/+1
2025-03-04change 'let mut' keyword completion into 'ietm' snippetTongjun Gao-2/+2
2025-03-04Improve keyword completion for 'let' and 'let mut'Tongjun Gao-1/+32
2025-03-04Auto merge of #137959 - matthiaskrgr:rollup-62vjvwr, r=matthiaskrgrbors-4203/+6011
Rollup of 12 pull requests Successful merges: - #135767 (Future incompatibility warning `unsupported_fn_ptr_calling_conventions`: Also warn in dependencies) - #137852 (Remove layouting dead code for non-array SIMD types.) - #137863 (Fix pretty printing of unsafe binders) - #137882 (do not build additional stage on compiler paths) - #137894 (Revert "store ScalarPair via memset when one side is undef and the other side can be memset") - #137902 (Make `ast::TokenKind` more like `lexer::TokenKind`) - #137921 (Subtree update of `rust-analyzer`) - #137922 (A few cleanups after the removal of `cfg(not(parallel))`) - #137939 (fix order on shl impl) - #137946 (Fix docker run-local docs) - #137955 (Always allow rustdoc-json tests to contain long lines) - #137958 (triagebot.toml: Don't label `test/rustdoc-json` as A-rustdoc-search) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-03Auto merge of #137927 - matthiaskrgr:rollup-yj463ns, r=matthiaskrgrbors-20/+165
Rollup of 9 pull requests Successful merges: - #132388 (Implement `#[cfg]` in `where` clauses) - #134900 (Fix parsing of ranges after unary operators) - #136938 (Remove `:` from `stack-protector-heuristics-effect.rs` Filecheck Pattern) - #137054 (Make phantom variance markers transparent) - #137525 (Simplify parallelization in test-float-parse) - #137618 (Skip `tidy` in pre-push hook if the user is deleting a remote branch) - #137741 (Stop using `hash_raw_entry` in `CodegenCx::const_str`) - #137849 (Revert "Remove Win SDK 10.0.26100.0 from CI") - #137862 (ensure we always print all --print options in help) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-03Rollup merge of #137955 - Noratrieb:rustdoc-json-long-lines, ↵Matthias Krüger-4/+17
r=aDotInTheVoid,jieyouxu Always allow rustdoc-json tests to contain long lines The rustdoc-json test syntax often requires very long lines, so the checks for long lines aren't really useful. `@aDotInTheVoid` told me she'd like this and r? jieyouxu you're gonna tell me that the implementation is terrible. at least the performance seems reasonable: 2.5s after and 2.5s before.
2025-03-03Rollup merge of #137922 - Zalathar:sharded, r=SparrowLiiMatthias Krüger-2/+1
A few cleanups after the removal of `cfg(not(parallel))` I noticed a few small things that are no longer needed after the removal of `cfg(not(parallel))` in #132282. One of the later changes adjusts several imports, so viewing the changes individually is recommended. r? SparrowLii (or reroll)
2025-03-03Rollup merge of #137921 - lnicola:sync-from-ra, r=lnicolaMatthias Krüger-4153/+5956
Subtree update of `rust-analyzer` r? `@ghost`
2025-03-03Rollup merge of #137902 - nnethercote:ast-lexer-TokenKind, r=compiler-errorsMatthias Krüger-8/+26
Make `ast::TokenKind` more like `lexer::TokenKind` This is step 2 of https://github.com/rust-lang/compiler-team/issues/831. r? `@spastorino`
2025-03-03Remove i586-pc-windows-msvcNoratrieb-1/+0
See MCP 840. I left a specialized error message that should help users that hit this in the wild (for example, because they use it in their CI).
2025-03-03Always allow rustdoc-json tests to contain long linesNoratrieb-4/+17
The rustdoc-json test syntax often requires very long lines, so the checks for long lines aren't really useful.
2025-03-03Add an anchor to directly link to the -Zmiri-tree-borrows docsJake Goulding-1/+2
2025-03-04compiletest: change `TEST_BUILD_DIR` to maximally normalize许杰友 Jieyou Xu (Joe)-2/+15
This is to make test stderr insensitive to compare-mode / debugger that changes the test build dir output name. Previously, this normalized paths up to test-suite-specific build root, e.g. `/path/to/build/test/ui/`. Now, this normalizes up to test-specific build root, e.g. `/path/to/build/test/ui/subdir/$name.$revision.$mode.$debugger/`.
2025-03-03Bump minimum supported toolchain to 1.82Laurențiu Nicola-1/+1
2025-03-03Merge pull request #19261 from Veykril/push-rnqlyrvqpolsLukas Wirth-293/+496
Support tuple struct patterns for expand_rest_pattern assist
2025-03-03Merge pull request #19243 from Veykril/push-qrrqsywkwyzpLukas Wirth-64/+96
Allow unsetting default cfgs
2025-03-03Merge pull request #19244 from Veykril/push-nmnrnlysvyvkLukas Wirth-114/+140
Warn when the used toolchain looks too old for rust-analyzer
2025-03-03Support tuple struct patterns for expand_rest_pattern assistLukas Wirth-25/+217
2025-03-03Add dangling implbit-aloo-31/+54
- Adds dangling impl diagnostics - Rename validation test from dangling_impl to dangling_iml_ref
2025-03-03Rollup merge of #132388 - frank-king:feature/where-cfg, r=petrochenkovMatthias Krüger-20/+165
Implement `#[cfg]` in `where` clauses This PR implements #115590, which supports `#[cfg]` attributes in `where` clauses. The biggest change is, that it adds `AttrsVec` and `NodeId` to the `ast::WherePredicate` and `HirId` to the `hir::WherePredicate`.
2025-03-03Remove some unnecessary aliases from `rustc_data_structures::sync`Zalathar-2/+1
With the removal of `cfg(parallel_compiler)`, these are always shared references and `std::sync::OnceLock`.
2025-03-03Merge pull request #19269 from lnicola/sync-from-rustLaurențiu Nicola-16002/+35634
minor: sync from downstream
2025-03-03Bump rustc cratesLaurențiu Nicola-20/+20
2025-03-03Merge from rust-lang/rustLaurențiu Nicola-15981/+35613
2025-03-03Preparing for merge from rust-lang/rustLaurențiu Nicola-1/+1
2025-03-03Rollup merge of #137684 - GuillaumeGomez:rustdoc-dep-info, r=notriddleMatthias Krüger-0/+7
Add rustdoc support for `--emit=dep-info[=path]` Fixes #91982. This PR adds the `--emit=dep-info` command line flag support. It will be helpful for `cargo` development. cc ````@epage```` r? ````@notriddle````
2025-03-03Rollup merge of #137103 - yotamofek:pr/jsonhtmldocck-deprecated-syntax, ↵Matthias Krüger-15/+28
r=aDotInTheVoid {json|html}docck: catch and error on deprecated syntax https://github.com/rust-lang/rust/pull/137099#pullrequestreview-2619498733
2025-03-03Merge pull request #19226 from Shourya742/2025-02-25-fix-completion-ref-matchingChayim Refael Friedman-3/+25
completion-ref-matching
2025-03-03Rename `ast::TokenKind::Not` as `ast::TokenKind::Bang`.Nicholas Nethercote-2/+2
For consistency with `rustc_lexer::TokenKind::Bang`, and because other `ast::TokenKind` variants generally have syntactic names instead of semantic names (e.g. `Star` and `DotDot` instead of `Mul` and `Range`).
2025-03-03Replace `ast::TokenKind::BinOp{,Eq}` and remove `BinOpToken`.Nicholas Nethercote-6/+24
`BinOpToken` is badly named, because it only covers the assignable binary ops and excludes comparisons and `&&`/`||`. Its use in `ast::TokenKind` does allow a small amount of code sharing, but it's a clumsy factoring. This commit removes `ast::TokenKind::BinOp{,Eq}`, replacing each one with 10 individual variants. This makes `ast::TokenKind` more similar to `rustc_lexer::TokenKind`, which has individual variants for all operators. Although the number of lines of code increases, the number of chars decreases due to the frequent use of shorter names like `token::Plus` instead of `token::BinOp(BinOpToken::Plus)`.