about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2024-06-11run-make-support: bump version许杰友 Jieyou Xu (Joe)-1/+1
2024-06-11run-make-support: add #[must_use] annotations许杰友 Jieyou Xu (Joe)-0/+26
2024-06-11compiletest: compile rmake.rs with -Dunused_must_use许杰友 Jieyou Xu (Joe)-0/+4
2024-06-11Rollup merge of #126174 - GuillaumeGomez:migrate-run-make-prefer-dylib, ↵许杰友 Jieyou Xu (Joe)-1/+0
r=jieyouxu Migrate `tests/run-make/prefer-dylib` to `rmake.rs` Part of https://github.com/rust-lang/rust/issues/121876. r? ```@jieyouxu```
2024-06-11Add set_backtrace_level helper function to run_make_supportOneirical-0/+6
2024-06-11Auto merge of #16840 - Wilfred:shell_runnable, r=Veykrilbors-230/+631
Allow rust-project.json to include arbitrary shell commands for runnables This is a follow-up on #16135, resolving the feedback raised :) Allow rust-project.json to include shell runnables, of the form: ``` { "build_info": { "label": "//project/foo:my-crate", "target_kind": "bin", "shell_runnables": [ { "kind": "run", "program": "buck2", "args": ["run", "//project/foo:my-crate"] }, { "kind": "test_one", "program": "test_runner", "args": ["--name=$$TEST_NAME$$"] } ] } } ``` If these runnable configs are present for the current crate in rust-project.json, offer them as runnables in VS Code. This PR required some boring changes to APIs that previously only handled cargo situations. I've split out these changes as commits labelled 'refactor', so it's easy to see the interesting changes.
2024-06-11feature: add build system info; runnables to `rust-project.json`Wilfred Hughes-230/+631
2024-06-11Auto merge of #125736 - Oneirical:run-make-file-management, r=jieyouxubors-14/+121
run-make-support: add wrapper for `fs` operations Suggested by #125728. The point of this wrapper is to stop silent fails caused by forgetting to `unwrap` `fs` functions. However, functions like `fs::read` which return something and get stored in a variable should cause a failure on their own if they are not unwrapped (as the `Result` will be stored in the variable, and something will be done on that `Result` that should have been done to its contents). Is it still pertinent to wrap `fs::read_to_string`, `fs::metadata` and so on? Closes: https://github.com/rust-lang/rust/issues/125728 try-job: x86_64-msvc try-job: i686-mingw
2024-06-11Auto merge of #17394 - Veykril:recurse-fix, r=Veykrilbors-16/+48
fix: Fix `HirDisplay` stackoverflow for parameter Self defaults Fixes https://github.com/rust-lang/rust-analyzer/issues/10932
2024-06-11fix: Fix `HirDisplay` stackoverflow for parameter Self defaultsLukas Wirth-16/+48
2024-06-11Implement fs wrapper for run_make_supportOneirical-14/+121
2024-06-11Auto merge of #126274 - jieyouxu:rollup-uj93sfm, r=jieyouxubors-1/+130
Rollup of 5 pull requests Successful merges: - #126186 (Migrate `run-make/multiple-emits` to `rmake.rs`) - #126236 (Delegation: fix ICE on recursive delegation) - #126254 (Remove ignore-cross-compile directive from ui/macros/proc_macro) - #126258 (Do not define opaque types when selecting impls) - #126265 (interpret: ensure we check bool/char for validity when they are used in a cast) r? `@ghost` `@rustbot` modify labels: rollup
2024-06-11Auto merge of #17364 - roife:fix-issue-12917, r=Veykrilbors-125/+211
feat: show type bounds from containers when hovering on functions fix #12917. ### Changes 1. Added Support for displaying the container and type bounds from it when hovering on functions with generic types. 2. Added a user config to determine whether to display container bounds (enabled by default). 3. Added regression tests. 4. Simplified and refactored `hir/display.rs` to improve readability.
2024-06-11Rollup merge of #126265 - RalfJung:interpret-cast-validity, r=oli-obk许杰友 Jieyou Xu (Joe)-0/+125
interpret: ensure we check bool/char for validity when they are used in a cast In general, `Scalar::to_bits` is a bit dangerous as it bypasses all type information. We should usually prefer matching on the type and acting according to that. So I also refactored `unary_op` handling of integers to do that. The remaining `to_bits` uses are operations that just fundamentally don't care about the sign (and only work on integers). invalid_char_cast.rs is the key new test, the others already passed before this PR. r? `@oli-obk`
2024-06-11Rollup merge of #126186 - GuillaumeGomez:migrate-run-make-multiple-emits, ↵许杰友 Jieyou Xu (Joe)-1/+5
r=jieyouxu Migrate `run-make/multiple-emits` to `rmake.rs` Part of https://github.com/rust-lang/rust/issues/121876. r? `@jieyouxu`
2024-06-11Auto merge of #17392 - randomicon00:17242, r=Veykrilbors-6/+6
Change 'Length' to 'Len' This is a fix for #17242
2024-06-11edit: Length to Len in benchmarkrandomicon00-1/+1
2024-06-11refactor: move the logic that displays container type bounds to function fmtroife-45/+49
2024-06-11fix: skip container header if no generics paramsroife-2/+2
2024-06-11internal: simplify and rename display_xxx to write_xxx for consistencyroife-33/+18
2024-06-11feat: add hover config for showing container boundsroife-14/+60
2024-06-11feat: show type bounds from containers for functionsroife-5/+47
2024-06-11internal: simplify and refactor write_where_clauseroife-89/+98
2024-06-11edit: change 'Length' to 'Len'randomicon00-5/+5
2024-06-11Migrate `tests/run-make/prefer-dylib` to `rmake.rs`Guillaume Gomez-1/+0
2024-06-11Migrate `run-make/multiple-emits` to `rmake.rs`Guillaume Gomez-1/+0
2024-06-11Add `path` function to `run-make-support`Guillaume Gomez-0/+5
2024-06-11Auto merge of #125752 - jieyouxu:kaboom, r=Kobzolbors-71/+271
run-make: arm command wrappers with drop bombs This PR is one in a series of cleanups to run-make tests and the run-make-support library. ### Summary It's easy to forget to actually executed constructed command wrappers, e.g. `rustc().input("foo.rs")` but forget the `run()`, so to help catch these mistakes, we arm command wrappers with drop bombs on construction to force them to be executed by test code. This PR also removes the `Deref`/`DerefMut` impl for our custom `Command` which derefs to `std::process::Command` because it can cause issues when trying to use a custom command: ```rs htmldocck().arg().run() ``` fails to compile because the `arg()` is resolved to `std::process::Command::arg`, which returns `&mut std::process::Command` that doesn't have a `run()` command. This PR also: - Removes `env_var` on the `impl_common_helper` macro that was wrongly named and is a footgun (no users). - Bumps the run-make-support library to version `0.1.0`. - Adds a changelog to the support library. ### Details Especially for command wrappers like `Rustc`, it's very easy to build up a command invocation but forget to actually execute it, e.g. by using `run()`. This commit adds "drop bombs" to command wrappers, which are armed on command wrapper construction, and only defused if the command is executed (through `run`, `run_fail`). If the test writer forgets to execute the command, the drop bomb will "explode" and panic with an error message. This is so that tests don't silently pass with constructed-but-not-executed command wrappers. This PR is best reviewed commit-by-commit. try-job: x86_64-msvc
2024-06-11interpret: ensure we check bool/char for validity when they are used in a castRalf Jung-0/+125
2024-06-11run-make-support: add changelog许杰友 Jieyou Xu (Joe)-0/+67
2024-06-11run-make-support: bump version许杰友 Jieyou Xu (Joe)-1/+1
2024-06-11run-make-support: arm command with drop bombs许杰友 Jieyou Xu (Joe)-64/+137
- Update all command wrappers and command construction helpers with `#[track_caller]` where suitable to help the drop bomb panic message. - Remove `Deref`/`DerefMut` for `Command` because it was causing issues with resolving to `std::process::Command` in a method call chain.
2024-06-11Chore(deps-dev): Bump braces from 3.0.2 to 3.0.3 in /editors/codedependabot[bot]-7/+7
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3. - [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md) - [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3) --- updated-dependencies: - dependency-name: braces dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
2024-06-11Auto merge of #17374 - Veykril:configs, r=Veykrilbors-108/+142
Allow choosing logical cores for num threads config
2024-06-11Simplify some config serialization stuffLukas Wirth-101/+101
2024-06-11run-make-support: add drop bomb module许杰友 Jieyou Xu (Joe)-0/+66
2024-06-11run-make-support: remove `env_var`许杰友 Jieyou Xu (Joe)-6/+0
This is incorrectly named (it's actually `env_clear`), and is itself a gigantic footgun: removing `TMPDIR` on Unix and `TMP`/`TEMP` on Windows basically wrecks anything that relies on `std::env::temp_dir` from functioning correctly. For example, this includes rustc's codegen.
2024-06-11Rollup merge of #126257 - Zalathar:needs-matching-clang, r=jieyouxu许杰友 Jieyou Xu (Joe)-3/+3
Rename `needs-matching-clang` to `needs-force-clang-based-tests` This header is much more restrictive than its old name would suggest. As a result, most of the tests that use it don't actually run in any CI jobs. Mitigation for #126180, though at some point we still need to go back fix the affected tests to actually run.
2024-06-11Rollup merge of #126253 - Kobzol:run-make-assert-ref-self, r=jieyouxu许杰友 Jieyou Xu (Joe)-6/+6
Simplify assert matchers in `run-make-support` See [Zulip](https://rust-lang.zulipchat.com/#narrow/stream/421156-gsoc/topic/Project.3A.20Rewriting.20Makefile.20Tests.20Using.20Rust/near/443922302) for context. This should make it easier to use the matchers. r? `@jieyouxu`
2024-06-11Auto merge of #17377 - Young-Flash:hir_print, r=Veykrilbors-8/+17
internal: better print style for hir before: ![before](https://github.com/rust-lang/rust-analyzer/assets/71162630/cd5e27b3-b4b1-450f-ba50-3c4f4e345d70) after: ![after](https://github.com/rust-lang/rust-analyzer/assets/71162630/04e11345-cadd-49cb-b10c-6888ef51758e)
2024-06-11interpret: dyn trait metadata check: equate traits in a proper wayRalf Jung-0/+40
2024-06-11check for correct trait in size_and_align_ofRalf Jung-2/+2
2024-06-11Rename `needs-matching-clang` to `needs-force-clang-based-tests`Zalathar-3/+3
This header is much more restrictive than its old name would suggest. As a result, most of the tests that use it don't actually run in any CI jobs.
2024-06-11Add {{target}} substitution to compiletestLukas Wirth-3/+8
2024-06-11Take `&self` in `CompletedProcess` assert matchersJakub Beránek-6/+6
2024-06-11use strict_ instead of checked_ in a few more placesRalf Jung-15/+11
2024-06-11fmtRalf Jung-4/+2
2024-06-11Merge from rustcRalf Jung-238/+321
2024-06-11Preparing for merge from rustcRalf Jung-1/+1
2024-06-10Rollup merge of #126211 - lolbinarycat:llvm-outputs-rmake, r=jieyouxuMatthias Krüger-1/+7
migrate tests/run-make/llvm-outputs to use rmake.rs part of #121876 <!-- If this PR is related to an unstable feature or an otherwise tracked effort, please link to the relevant tracking issue here. If you don't know of a related tracking issue or there are none, feel free to ignore this. This PR will get automatically assigned to a reviewer. In case you would like a specific user to review your work, you can assign it to them by using r​? <reviewer name> -->