about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2024-07-21Auto merge of #17653 - Veykril:std-find-path, r=Veykrilbors-6/+69
Prefer standard library paths over shorter extern deps re-exports This should generally speed up path finding for std items as we no longer bother looking through all external dependencies. It also makes more sense to prefer importing std items from the std dependencies directly. Fixes https://github.com/rust-lang/rust-analyzer/issues/17540
2024-07-21Prefer standard library paths over shorter extern deps re-exportsLukas Wirth-6/+69
2024-07-21Auto merge of #17650 - ObsidianMinor:fix/17645, r=Veykrilbors-5/+47
Fix path resolution for child mods of those expanded by `include!` Child modules wouldn't use the correct candidate paths due to a branch that doesn't seem to be doing what it's intended to do. Removing the branch fixes the problem and all existing test cases pass. Having no knowledge of how any of this works, I believe this fixes #17645. Using another test that writes the included mod directly into `lib.rs` instead, I found the difference can be traced to the candidate files we use to look up mods. A separate branch for if the file comes from an `include!` macro doesn't take into account the original mod we're contained within: ```rust None if file_id.macro_file().map_or(false, |it| it.is_include_macro(db.upcast())) => { candidate_files.push(format!("{}.rs", name.display(db.upcast()))); candidate_files.push(format!("{}/mod.rs", name.display(db.upcast()))); } ``` I'm not sure why this branch exists. Tracing the branch back takes us to 3bb9efb but it doesn't say *why* the branch was added. The test case that was added in this commit passes with the branch removed, so I think it's just superfluous at this point.
2024-07-21Auto merge of #128011 - matthiaskrgr:rollup-0vmf75y, r=matthiaskrgrbors-92/+187
Rollup of 8 pull requests Successful merges: - #127720 ([`macro_metavar_expr_concat`] Allow `concat` in repetitions) - #127734 (Windows: move BSD socket shims to netc) - #127752 (Ignore allocation bytes in one more mir-opt test) - #127839 (Fix git safe-directory path for docker images) - #127867 (Add `wasm32-wasip2` to `build-manifest` tool) - #127958 (Cleanup rmake.rs setup in compiletest) - #127975 (Fix trait bounds display) - #128005 (Remove _tls_used hack) r? `@ghost` `@rustbot` modify labels: rollup
2024-07-20Auto merge of #128007 - Mark-Simulacrum:bump-version, r=Mark-Simulacrumbors-0/+1
Bump to 1.82 https://forge.rust-lang.org/release/process.html#bump-the-stable-version-number-t-6-days-friday-the-week-before r? `@Mark-Simulacrum`
2024-07-20Allow deprecated temporarily to unblock version bumpMark Rousskov-0/+1
2024-07-20Auto merge of #127663 - Oneirical:fuzzy-testure, r=jieyouxubors-9/+0
Migrate 9 more very similar FFI `run-make` tests to 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). For the tracking issue: - return-non-c-like-enum-from-c - pass-non-c-like-enum-to-c - c-static-dylib - c-static-rlib - extern-fn-generic - extern-fn-with-union - lto-no-link-whole-rlib - linkage-attr-on-static - issue-28595
2024-07-20Fix path resolution for child mods of those expanded by `include!`Sydney Acksman-5/+47
Child modules wouldn't use the correct candidate paths due to a branch that doesn't seem to be doing what it's intended to do. Removing the branch fixes the problem and all existing test cases pass.
2024-07-20Auto merge of #17649 - ShoyuVanilla:issue-17585, r=Veykrilbors-0/+21
fix: Panic in debug profile for tuple deconstruct with arity mismatch Fixes #17585, which doesn't affect daily use cases but quite annoying in development of r-a itself like writing tests. This PR applies similar approach as in #17534, skipping match usefulness check for patterns containing errors
2024-07-21fix: Panic in debug profile for tuple deconstruct with arity mismatchShoyu Vanilla-0/+21
2024-07-20Rollup merge of #127958 - jieyouxu:compiletest-rmake-cleanup, r=KobzolMatthias Krüger-92/+186
Cleanup rmake.rs setup in compiletest While debugging rmake.rs tests I realized that the rmake.rs setup itself in compiletest is very messy and confused. Now that I know some of the bootstrap steps and the rmake.rs tests themselves better, I realized there are cleanups that are possible: - Rework how `source_root` and `build_root` are calculated. They should now be less fragile then before. - Shuffle around path calculations to make them more logically grouped and closer to eventual use site(s). - Cleanup executable extension calculation with `std::env::consts::EXE_EXTENSION`. - Cleanup various dylib search path handling: renamed variables to better reflect their purpose, minimized mutability scope of said variables. - Prune useless env vars passed to both `rustc` and recipe binary commands. - Vastly improve the documentation for the setup of rmake.rs tests, including assumed bootstrap-provided build layouts, rmake.rs test layout, dylib search paths, intended purpose of passed env vars and the `COMPILETEST_FORCE_STAGE0=1 ./x test run-make --stage 0` stage0 sysroot special handling. This PR is best reviewed commit-by-commit. Fixes https://github.com/rust-lang/rust/issues/127920. r? bootstrap (or Kobzol, or Mark, or T-compiler) try-job: aarch64-apple try-job: armhf-gnu try-job: dist-x86_64-linux try-job: test-various try-job: x86_64-mingw try-job: x86_64-msvc try-job: x86_64-gnu-llvm-18
2024-07-20Rollup merge of #127867 - alexcrichton:add-wasm32-wasip2-to-dist-manifest, ↵Matthias Krüger-0/+1
r=Mark-Simulacrum Add `wasm32-wasip2` to `build-manifest` tool This is an accidental omission of mine from #126967 which means that `rustup target add wasm32-wasip2` isn't working on today's nightlies.
2024-07-20Move `test-float-parse` to the global workspaceTrevor Gross-1/+1
Since `test-float-parse` is now implemented in Rust, we can move it into the global workspace and check dependency licenses.
2024-07-20Rollup merge of #127964 - jieyouxu:rmake-rustfmt-skip, r=nnethercoteMatthias Krüger-0/+6
run_make_support: skip rustfmt for lib.rs To avoid them getting reordered once https://github.com/rust-lang/rust/pull/125443 goes through. r? ``@nnethercote`` (since you were working on this)
2024-07-20Rollup merge of #127463 - onur-ozkan:precompiled-rustdoc, r=KobzolMatthias Krüger-1/+1
use precompiled rustdoc with CI rustc When CI rustc is enabled and rustdoc sources are unchanged, we can use the precompiled rustdoc from the CI rustc's sysroot. This speeds up bootstrapping quite a lot by avoiding unnecessary rustdoc compilation.
2024-07-20compiletest/rmake: simplify path calculations许杰友 Jieyou Xu (Joe)-36/+10
2024-07-20compiletest/rmake: avoid double test directory for rmake.rs tests许杰友 Jieyou Xu (Joe)-2/+8
This is important for other tests that have various things like modes, revisions and the like. These features are not supported in run-make tests, so we don't need the double layering.
2024-07-20compiletest/rmake: improve comments许杰友 Jieyou Xu (Joe)-30/+7
2024-07-20compiletest/rmake: prune unused `RUST_BUILD_STAGE` and explain env vars ↵许杰友 Jieyou Xu (Joe)-6/+20
passed to recipes
2024-07-20Inject win arm32 shims into metadata generationChris Denton-0/+19
2024-07-20Rename rust-analyzer commandsJosh McKinney-9/+9
The commands `editor.action.triggerParameterHints` and `editor.action.rename` are now renamed to `rust-analyzer.triggerParameterHints` and `rust-analyzer.rename` This change helps make it clear that these commands are specific to rust-analyzer and not part of the default set of commands provided by VSCode. Fixes: https://github.com/rust-lang/rust-analyzer/issues/17644
2024-07-20Add missing dyn parse special cases in 2015 editionLukas Wirth-70/+162
2024-07-20Auto merge of #17641 - nyurik:optimize-refs, r=Veykrilbors-12/+12
Avoid ref when using format! in compiler Clean up a few minor refs in `format!` macro, as it has a performance cost. Apparently the compiler is unable to inline `format!("{}", &variable)`, and does a run-time double-reference instead (format macro already does one level referencing). Inlining format args prevents accidental `&` misuse. See https://github.com/rust-lang/rust-clippy/issues/10851
2024-07-20Keep references in format! when the target is unsizedLukas Wirth-1/+1
2024-07-20Fix some typosLaurențiu Nicola-3/+2
2024-07-20Rollup merge of #127693 - Rejyr:migrate-crate-hash-rustc-version-rmake, ↵Matthias Krüger-1/+0
r=jieyouxu Migrate `crate-hash-rustc-version` to `rmake` Part of #121876. r? ``@jieyouxu`` try-job: x86_64-gnu-llvm-18 try-job: dist-x86_64-linux
2024-07-20Merge from rustcThe Miri Cronjob Bot-5212/+8482
2024-07-20Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2024-07-20minor: tweak commentYoung-Flash-1/+2
2024-07-20internal: add test case for inlay hint support for block expr with lifetime ↵Young-Flash-0/+23
label
2024-07-20feat: add inlay hint support for block expr with lifetime labelYoung-Flash-1/+8
2024-07-19Update cargoWeihang Lo-0/+0
2024-07-19Auto merge of #127968 - fmease:upd-jsondocck-directive-style, r=GuillaumeGomezbors-47/+51
Update jsondocck directives to follow ui_test-style Context: Comment chain in #125813. Follow-up to #126788. Use the same temporary approach of "double parsing" until we figure out how we want to support compiletest/ui_test directive "add-ons" for child test runners like HtmlDocCk and JsonDocCk. I didn't touch much of jsondocck because I want to refactor it some other time (for robustness, maintainability and better diagnostics; basically by following a similar design of my WIP HtmlDocCk-next, cc #125780). r? `@GuillaumeGomez`
2024-07-19rewrite compiler-lookup-paths-2 to rmakeOneirical-1/+0
2024-07-19Auto merge of #17639 - Veykril:salsa-perf, r=Veykrilbors-403/+1241
Some more small salsa memory improvements This does limit our lru limits to 2^16 but if you want to set them higher than that you might as well not set them at all. Also makes `LRU` opt-in per query now, allowing us to drop all the unnecessary LRU stuff for most queries
2024-07-19Avoid ref when using format! in compilerYuri Astrakhan-13/+13
Clean up a few minor refs in `format!` macro, as it has a performance cost. Apparently the compiler is unable to inline `format!("{}", &variable)`, and does a run-time double-reference instead (format macro already does one level referencing). Inlining format args prevents accidental `&` misuse.
2024-07-19rewrite c-unwind-abi-catch-panic to rmakeOneirical-1/+0
2024-07-19Add back equality check that went missingLukas Wirth-1/+8
2024-07-19Fix edition used for include macro parsingLukas Wirth-13/+17
2024-07-19Parse contextual dyn keyword properly in edition 2015Lukas Wirth-11/+164
2024-07-19rewrite test-benches to rmakeOneirical-1/+0
2024-07-20internal: move NavigationTarget::from_expr to goto_definitionroife-27/+33
2024-07-20fix: sort references in testsroife-22/+97
2024-07-20fix: handle highlightings inside macro calls & only highlight kws in current ↵roife-220/+278
file
2024-07-20fix: ensure that highlight_related works for macro_exprroife-6/+13
2024-07-20use token_ancestors_with_macros to simplify goto-def on kwroife-83/+45
2024-07-20fix: navigate to label directly when perform 'goto-def' on control-flow kwroife-3/+3
See https://github.com/rust-lang/rust-analyzer/pull/17542#discussion_r1667656190
2024-07-20feat: find references on control-flow kwsroife-1/+253
2024-07-20fix: keyword highlighting in macro expansionroife-0/+133
2024-07-20fix: incorrect highlighting of try blocks with control flow kwsroife-138/+242