about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2024-10-14move lazy_sync helper methods to be with InterpCxRalf Jung-79/+103
2024-10-14De-duplicate and move `adjust_nan` to `InterpCx`Eduardo Sánchez Muñoz-4/+0
2024-10-14Auto merge of #3968 - YohDeadfall:variadic-arg-helper, r=RalfJungbors-84/+85
Added a variadic argument helper `@RalfJung,` as you wished (:
2024-10-14add test ensuring a moved mutex deadlocksRalf Jung-0/+32
2024-10-14Resolved python deprecation warning in publish_toolstate.pyAlex Gaynor-1/+3
`utcnow()` is deprecated in favor of passing a timezone to `now()`. `utcnow()` would return a tz-naive datetime, while this returns a tz-aware datetime. For the purposes of the formatting we do, these are the same.
2024-10-14Added a variadic argument helperYoh Deadfall-84/+85
2024-10-14Avoid some needless monomorphizationsOli Scherer-10/+7
2024-10-15minor: `ra-salsa` in `profile.dev.package`Shoyu Vanilla-1/+1
2024-10-14pick more clear names for the typesRalf Jung-22/+19
2024-10-14turns out relaxed accesses suffice hereRalf Jung-2/+2
2024-10-14make lazy_sync_get_data also take a closure to initialize if neededRalf Jung-51/+32
2024-10-14Windows InitOnce: also store ID outside addressable memoryRalf Jung-165/+114
2024-10-14macOS os_unfair_lock: also store ID outside addressable memoryRalf Jung-49/+42
2024-10-14pthread_cond: also store ID outside addressable memoryRalf Jung-172/+109
2024-10-14pthread_rwlock: also store ID outside addressable memoryRalf Jung-135/+112
2024-10-14pthread_mutex: store mutex ID outside adressable memory, so it can be trustedRalf Jung-127/+181
2024-10-15Do not consider match/let/ref of place that evaluates to ! to diverge, ↵Shoyu Vanilla-102/+637
disallow coercions from them too
2024-10-14clippyRalf Jung-0/+2
2024-10-14Rollup merge of #131679 - Zalathar:ct-docs, r=jieyouxuMatthias Krüger-13/+114
compiletest: Document various parts of compiletest's `lib.rs` This adds some much-needed comments to many of the items in compiletest's `lib.rs`, giving a better overview of how a compiletest invocation actually proceeds. To make review easier I have refrained from renames or functional changes, though I couldn't resist getting rid of one obviously-redundant `Arc::clone` in `make_test_closure`.
2024-10-14Merge from rustcRalf Jung-1832/+2515
2024-10-14Preparing for merge from rustcRalf Jung-1/+1
2024-10-14Auto merge of #18292 - roife:fix-issue-17427, r=Veykrilbors-12/+41
feat: handle self-param outside of methods when renaming close #17427
2024-10-14feat: handle self-param outside of methods when renamingroife-12/+41
2024-10-14Auto merge of #18239 - davidbarsky:davidbarsky/push-lswkwuyrpuqv, r=davidbarskybors-538/+540
chore: rename `salsa` to `ra_salsa` Laying some groundwork to start before I import the new Salsa crate. Here's why: 1. As part of the migration, `@darichey,` `@Wilfred,` and I will create new Salsa equivalents of the existing databases/query groups. We'll get them to compile crate-by-crate. 2. Once we wrote all equivalents of all queries, we'd start to refactor usage sites of the vendored Salsa to use the new Salsa databases. 3. Starting porting usage sites of old Salsa to the new Salsa. 4. Remove the vendored `ra_salsa`; declare victory.
2024-10-14chore: rename salsa to ra_salsaDavid Barsky-538/+540
2024-10-14internal: switch remaining OpQueues to use named structsDavid Barsky-10/+23
2024-10-14Move trait bound modifiers into ast::PolyTraitRefMichael Goulet-10/+9
2024-10-14Move trait bound modifiers into hir::PolyTraitRefMichael Goulet-20/+20
2024-10-14Auto merge of #18291 - roife:fix-issue-18212, r=Veykrilbors-20/+141
feat: respect references.exclude_tests in call-hierarchy close #18212 ### Changes 1. feat: respect `references.exclude_tests` in call-hierarchy 2. Modified the description of `references.exclude_tests`
2024-10-14Auto merge of #18275 - darichey:fix-test-case-hang, r=Veykrilbors-2/+5
Skip #[test_case] expansion Fixes #18274, although I don't fully understand if this is the best fix (it's not clear to me why this didn't cause issues before https://github.com/rust-lang/rust-analyzer/pull/18085).
2024-10-14Auto merge of #18265 - kouhe3:master, r=Veykrilbors-0/+30
Add support for LLDB-DAP
2024-10-14Auto merge of #18252 - ShoyuVanilla:issue-15799, r=Veykrilbors-1/+37
fix: Do not consider mutable usage of deref to `*mut T` as deref_mut Fixes #15799 We are doing some heuristics for deciding whether the given deref is deref or deref_mut here; https://github.com/rust-lang/rust-analyzer/blob/5982d9c420d0dc90739171829f0d2e9c80d98979/crates/hir-ty/src/infer/mutability.rs#L182-L200 But this heuristic is erroneous if we are dereferencing to a mut ptr and normally those cases are filtered out here as builtin; https://github.com/rust-lang/rust-analyzer/blob/5982d9c420d0dc90739171829f0d2e9c80d98979/crates/hir-ty/src/mir/lower/as_place.rs#L165-L177 Howerver, this works not so well if the given dereferencing is double dereferencings like the case in the #15799. ```rust struct WrapPtr(*mut u32); impl core::ops::Deref for WrapPtr { type Target = *mut u32; fn deref(&self) -> &Self::Target { &self.0 } } fn main() { let mut x = 0u32; let wrap = WrapPtr(&mut x); unsafe { **wrap = 6; } } ``` Here are two - outer and inner - dereferences here, and the outer dereference is marked as deref_mut because there is an assignment operation. And this deref_mut marking is propagated into the inner dereferencing. In the later MIR lowering, the outer dereference is filtered out as it's expr type is `*mut u32`, but the expr type in the inner dereference is an ADT, so this false-mutablility is not filtered out. This PR cuts propagation of this false mutablilty chain if the expr type is mut ptr. Since this happens before the resolve_all, it may have some limitations when the expr type is determined as mut ptr at the very end of inferencing, but I couldn't find simple fix for it 🤔
2024-10-14Fix up-to-date checking for run-make testsZalathar-8/+2
This special case in `output_base_dir` had the unfortunate side-effect of causing all run-make tests to share the same `stamp` file. So as soon as any one of them succeeded, all of the failed tests would be considered up-to-date and would no longer run in subsequent test invocations.
2024-10-14Auto merge of #18242 - Veykril:veykril/push-tnynzqsmtnqw, r=Veykrilbors-185/+174
internal: Don't resolve extern crates in import fix point resolution The fix point loop won't progress them given the potential extern crate candidates are set up at build time.
2024-10-14Auto merge of #18229 - mrkajetanp:rustfmt-path, r=Veykrilbors-3/+3
fix: Join rustfmt overrideCommand with project root When providing a custom rustfmt command, join it with the project root instead of the workspace root. This fixes rust-analyzer getting the wrong invocation path in projects containing subprojects. This makes the behaviour consistent with how a custom path provided in rust-analyzer.procMacro.server behaves already. Resolves issue #18222
2024-10-14Auto merge of #18217 - ChayimFriedman2:cast-unknown-ptr, r=Veykrilbors-25/+48
fix: Comment out cast checks for unknown ptr kind Just like we don't check for types containing unknown. Fixes #18214. See also https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frust-analyzer/topic/Another.20case.20of.20.2318064.3F.
2024-10-14Auto merge of #18152 - CryZe:highlight-async-block-exit-points, r=Veykrilbors-73/+101
feat: Highlight exit points of async blocks Async blocks act similar to async functions in that the await keywords are related, but also act like functions where the exit points are related. Fixes #18147
2024-10-14Auto merge of #18226 - SabrinaJewson:fix-impl-use, r=Veykrilbors-1/+29
Correctly parse `use` in generic parameters Fixes: #18225
2024-10-14Document various parts of compiletest's `lib.rs`Zalathar-13/+114
2024-10-14Remove `ResultsCursor::contains`.Nicholas Nethercote-2/+2
It's hardly worth it, and it needs to be removed so that `GenKillAnalysis` can be removed.
2024-10-14Rollup merge of #131593 - RalfJung:alloc-no-clone, r=saethlinMatthias Krüger-4/+12
miri: avoid cloning AllocExtra We shouldn't be cloning Miri allocations, so make `AllocExtra::clone` panic instead, and adjust the one case where we *do* clone (the leak check) to avoid cloning. This is in preparation for https://github.com/rust-lang/miri/pull/3966 where I am adding something to `AllocExtra` that cannot (easily) be cloned. r? ``@saethlin``
2024-10-13Add wrap/unwrap return type in OptionGiga Bowser-0/+2348
2024-10-13unicode-table-generator: sync comments许杰友 Jieyou Xu (Joe)-4/+2
These comments were updated on master but not through this tool, so the comments in the tool became outdated. Sync the comments to stay consistent.
2024-10-13unicode-table-generator: match bin name with tool name许杰友 Jieyou Xu (Joe)-1/+1
Bootstrap assumes that the binary name is the same as tool name, just makes everyone's lives easier.
2024-10-13Rollup merge of #131642 - jieyouxu:build-fail-check-fail, r=KobzolMatthias Krüger-7/+26
Special case error message for a `build-fail` test that failed check build A `build-fail` test requires that a check build (roughly `--emit=metadata`, no codegen) succeeds but fails later. Previously, if its check build failed, the user will see the error message ``` error: test compilation failed although it shouldn't! ``` which is confusing. Because the test is `build-fail`, we want the test compilation to fail! This error message doesn't account for the difference between a check build and a complete build, so let's special case the error message for a `build-fail` test whose check build failed to instead say ``` error: `build-fail` test is required to pass check build, but check build failed ``` Fixes #130894.
2024-10-13Rollup merge of #131641 - RalfJung:unicode-bitset-static, r=dtolnayMatthias Krüger-4/+4
switch unicode-data bitsets back to 'static' Back in https://github.com/rust-lang/rust/pull/101401, these were changed to `const` to make some functions `const fn`. However, `@dtolnay` was [not happy](https://github.com/rust-lang/rust/issues/101400#issuecomment-1742500968) about this. Meanwhile, `const fn` can access immutable statics like these, so we can change this back. Part of https://github.com/rust-lang/rust/issues/101400.
2024-10-13Rollup merge of #131638 - Zalathar:debuggers, r=jieyouxuMatthias Krüger-274/+290
compiletest: Move debugger setup code out of `lib.rs` These functions contain a few hundred lines of code for dealing with debuggers (for `debuginfo` tests), and don't really belong in the crate root. Moving them out to their own module makes `lib.rs` easier to follow.
2024-10-13Rollup merge of #131614 - jieyouxu:rmake-no-rev, r=KobzolMatthias Krüger-5/+14
Error on trying to use revisions in `run-make` tests Currently, `run-make` tests do not support revisions.
2024-10-13Rollup merge of #131585 - Zalathar:original-line, r=jieyouxuMatthias Krüger-29/+10
compiletest: Remove the one thing that was checking a directive's `original_line` This special handling of `ignore-tidy*` was introduced during the migration to `//`@`` directives (#120881), and has become unnecessary after the subsequent removal of the legacy directive check (#131392).
2024-10-13switch unicode-data back to 'static'Ralf Jung-4/+4