Commit Graph

27838 Commits

Author SHA1 Message Date
Shoyu Vanilla
763714145a Add a new failing test 2024-02-27 00:15:25 +09:00
bors
96505787b4 Auto merge of #16678 - roife:fix-issue-16660, r=lnicola
fix: panic when inlining callsites inside macros' parameters

Close #16660, #12429, #10695.

When `inline_into_callers` encounters callsites in macros parameters, it can lead to panics. Since there is no perfect way to handle macros, this PR directly filters out these cases.
2024-02-26 14:44:22 +00:00
roife
61b576c5ab fix: fmt 2024-02-26 22:36:47 +08:00
bors
f7f63ccd8d Auto merge of #16680 - lnicola:salsa-doc-test, r=Veykril
internal: Remove salsa compile_fail tests

I can't figure out how to reproduce them, but hopefully fixes these:

![image](https://github.com/rust-lang/rust-analyzer/assets/308347/462dbfc3-5414-42fd-b81d-a3d699fa9a8d)
2024-02-26 14:08:38 +00:00
bors
40bf8bf757 Auto merge of #16679 - Veykril:block-mod, r=Veykril
fix: Fix modules in blocks not resolving in ide layer

Fixes https://github.com/rust-lang/rust-analyzer/issues/16511
2024-02-26 13:56:01 +00:00
Lukas Wirth
91554e0ae7 fix: Fix modules in blocks not resolving in ide layer 2024-02-26 14:54:47 +01:00
bors
2251d06200 Auto merge of #16673 - szepeviktor:patch-1, r=lnicola
Narrow down typos ignores

- remove ignored files
- check dotfiles
- reorder config sections: files, regexp, words, IDs
- remove non-existent ignores
2024-02-26 13:41:48 +00:00
Viktor Szépe
18801171b2 Narrow down typos ignores 2024-02-26 13:40:01 +00:00
Laurențiu Nicola
1ef7a9971d Remove salsa compile_fail tests 2024-02-26 15:26:55 +02:00
roife
38a50cf1a4 test: callsites inside inline_into_callers 2024-02-26 20:24:44 +08:00
roife
36298c622e fix:do not handle callsites in macros' parameters 2024-02-26 20:23:36 +08:00
bors
8929853df7 Auto merge of #16647 - Young-Flash:fix_replace_filter_map_next_with_find_map, r=Veykril
fix: replace_filter_map_next_with_find_map shouldn't work for dyn trait

close https://github.com/rust-lang/rust-analyzer/issues/16596
2024-02-26 11:31:44 +00:00
Young-Flash
7a58a23f16 internal: format code 2024-02-26 19:10:50 +08:00
Young-Flash
fd0cddf655 internal: move strip_references into dyn trait check 2024-02-26 18:57:46 +08:00
bors
e1983d2b90 Auto merge of #16669 - ShoyuVanilla:merge-borrow-kind-unique, r=Veykril
Merge `BorrowKind::Unique` into `BorrowKind::Mut`

Resolves #15170
2024-02-26 10:57:42 +00:00
bors
6903a5c7d6 Auto merge of #16665 - MabezDev:prio-rustup-when-searching, r=Veykril
Prioritise rustup sysroots over system ones

`get_path_for_executable` will now first check `$CARGO_HOME` before falling back to searching `$PATH`.

`rustup` is the recommended way to manage rust toolchains, therefore should be picked before the system toolchain.

Closes #16661
2024-02-26 10:45:11 +00:00
bors
4585b461e5 Auto merge of #16670 - rikhuijzer:rh/inlay-hints-nvim, r=Veykril
Document nvim 0.10 `inlay_hint`

It took me a few hours to figure out how to enable inlay type hints on Nvim 0.10 with `lspconfig`. `rustaceanvim` has already dropped support for them (https://github.com/mrcjkb/rustaceanvim/discussions/46#discussioncomment-7518669) and most other plugins, like `rust-tools`, are depreciated in favor of `rustaceanvim`.

This PR documents how to enable the inlay hints on Neovim 0.10 and later. I've tested this and changing the `on_attach` function is the only step that is required.
2024-02-26 10:32:30 +00:00
bors
309e087426 Auto merge of #16627 - Young-Flash:issue_template, r=Veykril
update bug report issue template
2024-02-26 10:18:15 +00:00
Rik Huijzer
4060377c07 Add note 2024-02-25 18:05:52 +01:00
Rik Huijzer
ea837d181e Document nvim 0.10 inlay_hint 2024-02-25 17:59:19 +01:00
Shoyu Vanilla
a336bdc142 Merge BorrowKind::Unique into BorrowKind::Mut 2024-02-26 01:57:03 +09:00
bors
5346002d07 Auto merge of #16668 - lnicola:sync-from-rust, r=lnicola
internal: sync from downstream
2024-02-25 16:29:22 +00:00
Laurențiu Nicola
fb31610ae8 Merge branch 'master' into sync-from-rust 2024-02-25 18:27:30 +02:00
Scott Mabin
9f1d4aa4b9 prioritise rustup sysroots over system ones
`get_path_for_executable` will now first check `$CARGO_HOME` before falling back to searching `$PATH`.

rustup is the recommended way to manage rust toolchains, therefore should be picked before the
system toolchain.
2024-02-24 21:19:10 +00:00
bors
4a8d0f7f56 Auto merge of #16654 - graemer957:feature/short_version_flag, r=lnicola
Add short flag -V for consistency with other rust tooling

Minor change to add the `-V` short flag to `rust-analyzer` to bring it in-line with other rust tooling such as:

> rustc -V
```bash
rustc 1.76.0 (07dca489a 2024-02-04)
```

> rustup -V
```bash
rustup 1.26.0 (5af9b9484 2023-04-05)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.76.0 (07dca489a 2024-02-04)`
```

> cargo -V
```bash
cargo 1.76.0 (c84b36747 2024-01-18)
```
2024-02-24 09:51:32 +00:00
Graeme Read
30429f8ece
feat: Add short flag -V for consistency with other rust tooling 2024-02-24 06:45:00 +00:00
dfireBird
6f4354f6ad
add assist for filling fields by replacing ellipsis in record syntax 2024-02-24 11:59:48 +05:30
bors
03b3cb6be9 Auto merge of #16652 - davidbarsky:david/deadlock-fix-for-16643, r=Veykril
internal: fix deadlock introduced by #16643

This fixes a deadlock introduced by #16643 ([backtrace](https://gist.github.com/davidbarsky/00f17598f5496a9c41aff31fec1c42d6)). `maybe_changed_after` calls back into other queries, so the cloning here is unfortunately inevitable.

(Zulip conversation: https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frust-analyzer/topic/Fixing.20proc-macro.20dirtying.20with.20unindexed.20projects)
2024-02-23 20:39:13 +00:00
David Barsky
64779737db internal: fix deadlock introduced by #16643 2024-02-23 15:34:23 -05:00
bors
12144045fe Auto merge of #16650 - Veykril:metrics-rustc, r=Veykril
Fix: Fix metrics CI failing
2024-02-23 19:23:45 +00:00
Lukas Wirth
0c3a524acb Fix: Fix metrics CI failing 2024-02-23 20:22:01 +01:00
bors
838523dcc2 Auto merge of #16621 - txase:no-build-with-bootstrap, r=Veykril
fix: Recompiles due to RUSTC_BOOTSTRAP

Some packages (e.g. thiserror) force a recompile if the value of the `RUSTC_BOOTSTRAP` env var changes. RA sets the variable to 1 in order to enable rustc / cargo unstable options. This causes flapping recompiles when building outside of RA.

Fixes #15057
2024-02-23 18:46:33 +00:00
bors
c45b3550c3 Auto merge of #16649 - Veykril:metrics-rustc, r=Veykril
internal: Disable rustc test metrics

The CI job for them frequently gets stuck and I am unsure why
2024-02-23 18:33:46 +00:00
Lukas Wirth
d9a08624aa internal: Disable rustc test metrics 2024-02-23 19:31:53 +01:00
bors
84c5481349 Auto merge of #16648 - Veykril:metrics-rustc, r=Veykril
internal: Pin commit of rust-lang/rust for rustc-test metrics
2024-02-23 16:27:56 +00:00
Lukas Wirth
c6a6e63a45 internal: Pin commit of rust-lang/rust for rustc-test metrics 2024-02-23 17:24:29 +01:00
bors
cbc579e51f Auto merge of #16643 - Veykril:salsa-opt, r=Veykril
internal: Optimize salsa memory usage

Reduces memory on self by ~20mb for me, there is a few more mb to save here if we made LRU caching opt-in, as currently every entry in a memoized query will store an `AtomicUsize` for the LRU.
2024-02-23 15:18:58 +00:00
Lukas Wirth
cc4d0e1bd1 Optimize salsa some more 2024-02-23 16:17:39 +01:00
Young-Flash
b132190a9c make clippy happy 2024-02-23 21:18:24 +08:00
Young-Flash
0978d165f3 add test case 2024-02-23 21:05:55 +08:00
Young-Flash
4220f90edf fix: replace_filter_map_next_with_find_map shouldn't work for dyn trait 2024-02-23 21:05:55 +08:00
bors
deddea0d90 Auto merge of #16646 - cuishuang:master, r=lnicola
remove repetitive words
2024-02-23 12:54:06 +00:00
cui fliter
6dca7948f7 remove repetitive words
Signed-off-by: cui fliter <imcusg@gmail.com>
2024-02-23 18:45:03 +08:00
bors
6648f19c56 Auto merge of #16645 - Veykril:deadlock, r=Veykril
fix: Fix deadlock in `recreate_crate_graph` <-> `file_line_index`

Fixes https://github.com/rust-lang/rust-analyzer/issues/16614
2024-02-23 09:13:31 +00:00
Lukas Wirth
9b7284dca7 fix: Fix deadlock in recreate_crate_graph <-> file_line_index 2024-02-23 10:10:48 +01:00
bors
1f54f714ca Auto merge of #16637 - Veykril:fix-proc-macro-srv-literals, r=Veykril
fix: Fix proc-macro server not accounting for string delimiters correctly

Fixes https://github.com/rust-lang/rust-analyzer/issues/16622

Note that this is a bug a in the proc-macro server, so this won't be fixed until the next subtree sync
2024-02-22 21:35:48 +00:00
Lukas Wirth
efa6948b57 Fix rust-analyzer not enabling rust-analyzer spans on the proc-macro server 2024-02-22 22:34:03 +01:00
Lukas Wirth
cdfb73ab9c fix: Fix proc-macro server not accounting for string delimiters correctly 2024-02-22 22:34:03 +01:00
Lukas Wirth
f89d17b426 Remove ops_salsa_runtime_mut, replace it with direct synthetic_write API 2024-02-22 10:42:30 +01:00
Young-Flash
2e87f31fe9 add HoverDisplayConfig 2024-02-22 17:37:40 +08:00