about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2024-10-15Add doc(plugins), doc(passes), etc. to INVALID_DOC_ATTRIBUTESMateusz Maćkowski-37/+2
2024-10-15line-index method to allow clamping column to line lengthJohannes Altmanninger-1/+32
Part of #18240
2024-10-15Make some float methods unstable `const fn`Eduardo Sánchez Muñoz-39/+0
Some float methods are now `const fn` under the `const_float_methods` feature gate. In order to support `min`, `max`, `abs` and `copysign`, the implementation of some intrinsics had to be moved from Miri to rustc_const_eval.
2024-10-15Auto merge of #131727 - RalfJung:miri-sync, r=RalfJungbors-876/+1347
Miri subtree update r? `@ghost`
2024-10-15Auto merge of #18278 - ShoyuVanilla:never-place, r=Veykrilbors-102/+637
Do not consider match/let/ref of place that evaluates to ! to diverge, disallow coercions from them too Resolves #18237
2024-10-15fix: autofix for missing wrapped unit in return exprroife-0/+38
2024-10-15Rollup merge of #130635 - eholk:pin-reborrow-sugar, r=compiler-errorsMatthias Krüger-4/+34
Add `&pin (mut|const) T` type position sugar This adds parser support for `&pin mut T` and `&pin const T` references. These are desugared to `Pin<&mut T>` and `Pin<&T>` in the AST lowering phases. This PR currently includes #130526 since that one is in the commit queue. Only the most recent commits (bd450027eb4a94b814a7dd9c0fa29102e6361149 and following) are new. Tracking: - #130494 r? `@compiler-errors`
2024-10-15Rollup merge of #131703 - alex:patch-1, r=KobzolMatthias Krüger-1/+3
Resolved python deprecation warning in publish_toolstate.py `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-15Rollup merge of #131681 - Zalathar:fix-run-make-stamp, r=jieyouxuMatthias Krüger-8/+2
Fix up-to-date checking for run-make tests 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 incorrectly considered up-to-date and would no longer run in subsequent test invocations. Fixes #129971. r? jieyouxu
2024-10-15Rollup merge of #131652 - compiler-errors:modifiers, r=Nadrieril,jieyouxuMatthias Krüger-34/+33
Move polarity into `PolyTraitRef` rather than storing it on the side Arguably we could move these modifiers into `TraitRef` instead of `PolyTraitRef`, but I see `TraitRef` as simply the *path* part of the trait ref. It doesn't really matter -- refactoring this further is much easier now.
2024-10-15Rollup merge of #131095 - GuillaumeGomez:switch-to-env-variables, r=notriddleMatthias Krüger-28/+17
Use environment variables instead of command line arguments for merged doctests Fixes [#130796](https://github.com/rust-lang/rust/issues/130796). Before merging this one, let's first ensure it has a smaller impact compared to command line arguments (results can be seen [here](https://github.com/rust-lang/rust/pull/130285)). I'll start a crater run once CI passed. cc ``@ehuss`` r? ``@notriddle``
2024-10-14use new check_min_arg_count helper in more placesRalf Jung-35/+17
2024-10-14Auto merge of #3973 - RalfJung:os-unfair-lock, r=RalfJungbors-122/+297
ensure that a macOS os_unfair_lock that is moved while being held is not implicitly unlocked Fixes https://github.com/rust-lang/miri/issues/3859 We mark an os_unfair_lock that is moved while being held as "poisoned", which means it is not considered forever locked. That's not quite what the real implementation does, but allowing arbitrary moves-while-locked would likely expose a ton of implementation details, so hopefully this is good enough.
2024-10-14ensure that a macOS os_unfair_lock that is moved while being held is not ↵Ralf Jung-59/+178
implicitly unlocked
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-14Delay ambiguous intra-doc link resolution after `Cache` has been populatedGuillaume Gomez-56/+263
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-2656/+3778
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-24/+24
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