Lukas Wirth
3e6a9330d8
Merge pull request #19012 from ShoyuVanilla/arbitrary-self
...
feat: Implement `arbitrary-self-types`
2025-01-24 14:04:34 +00:00
Shoyu Vanilla
024da87502
feat: Implement arbitrary-self-types
2025-01-24 22:50:59 +09:00
Lukas Wirth
b7997e06ba
Merge pull request #19017 from Veykril/push-uktrsknwmsvy
...
fix: Fix flycheck panicking with "once" invocation strategy
2025-01-24 13:37:17 +00:00
Lukas Wirth
c3e88ae1c6
Merge pull request #18993 from ChayimFriedman2/iter-config
...
feat: Provide a config to control auto-insertion of `await` and `iter()`
2025-01-24 13:31:30 +00:00
Lukas Wirth
5d9df43c72
Merge pull request #18994 from Wilfred/failed_rustc_cfg_as_warning
...
internal: Treat cfg fetching failures as a warning
2025-01-24 13:31:00 +00:00
Lukas Wirth
2a9e6fbe90
Merge pull request #19016 from Veykril/push-moqnsytyrupu
...
fix: Fix `ItemScope` not recording glob imports
2025-01-24 13:25:39 +00:00
Lukas Wirth
dfd94903c8
fix: Fix flycheck panicking with "once" invocation strategy
...
We only ever have one flycheck runner no matter the number of workspaces, so just kick off flycheck for it immediately
2025-01-24 14:23:11 +01:00
Lukas Wirth
99b0ab5f52
Fix ItemScope not recording glob imports
...
This caused us other code to incorrectly assume in dealing with a declaration when in fact it was dealing with a glob imported definition
2025-01-24 14:11:45 +01:00
David Richey
27084a25a4
Check cfg when collecting macro defs
2025-01-23 17:36:45 -06:00
Laurențiu Nicola
a32f64dc30
Rephrase comment
2025-01-23 13:52:39 +02:00
Teodor Tanasoaia
2eef052f04
increase AUTODEREF_RECURSION_LIMIT to 20
...
The limit was introduced in https://github.com/rust-lang/rust-analyzer/pull/1408#discussion_r294059044 to avoid infinite cycles but it effectively caps the number of derefs to 10. Types like `ID3D12Device14` from the `windows` crate run into this because it derefs to `ID3D12Device13`, 13 to 12 and so on. Increasing it to 20 is a quick fix; a better cycle detection method would be nicer long term.
2025-01-22 22:21:02 +01:00
Wilfred Hughes
98582b23ab
manual: Document all rust-project.json fields
...
Ensure that all the fields that rust-analyzer understands are in the
manual, they all have doc comments, and they use consistent
punctuation (`;` rather than mixing `,` and `;`).
Whilst we're here, fix the `sysroot_src` example and add 2024 as a
legal value for Rust edition.
2025-01-21 12:00:13 -08:00
Wilfred Hughes
c5ccf86e90
internal: Treat cfg fetching failures as a warning
...
If the user doesn't have rustc on $PATH, rust-analyzer won't be able
to run `rustc --print cfg`. This isn't really an error, as
rust-analyzer can still proceed without it.
This is particularly noticeable when loading crates defined in a
rust-project.json. Until the configuration is loaded, the opened files
are briefly treated as detached files and users see this error.
Environments with rust-project.json generally have a sysroot and rustc
elsewhere, so the error confuses users.
2025-01-21 11:07:07 -08:00
Chayim Refael Friedman
5059c1a870
Provide a config to control auto-insertion of await and iter()
2025-01-21 18:51:09 +02:00
Chayim Refael Friedman
feb3fb5f19
Sort completion items that skip await and iter() behind those that don't
...
I don't think my ranking is perfect, because it places them even behind snippet completions, but this is something.
2025-01-21 11:44:38 +02:00
Lukas Wirth
4308352b42
Merge pull request #18986 from Veykril/push-zlwvwlowpzqm
...
Goto `Display::fmt` when invoked on `to_string`
2025-01-21 09:25:05 +00:00
Lukas Wirth
54d1d318d3
Cleanup Name string rendering
2025-01-21 10:05:32 +01:00
Lukas Wirth
0870bfbfc7
Merge pull request #18977 from ChayimFriedman2/fix-upmapping
...
fix: Fix missing upmapping in trait impls completion
2025-01-21 07:41:22 +00:00
Chayim Refael Friedman
f98e971520
Fix another bug with completion of trait items inside macros
...
This time, when completing the keyword (e.g. `fn` + whitespace).
The bug was actually a double-bug:
First, we did not resolve the impl in the macro-expanded file but in the real file, which of course cannot work.
Second, in analysis the whitespace was correlated with the `impl` and not the incomplete `fn`, which caused fake (where we insert an identifier after the whitespace) and real expansions to go out of sync, which failed analysis. The fix is to skip whitespaces in analysis.
2025-01-20 21:21:42 +02:00
Giga Bowser
1d5af89654
fix: Only refresh syntax tree view when the active document changes
2025-01-20 14:05:19 -05:00
Lukas Wirth
e9b410d29c
Goto Display::fmt when invoked on to_string
2025-01-20 17:00:28 +01:00
Lukas Wirth
4bc683dfd2
Bring back goto def redirect for parse -> FromStr
2025-01-20 16:32:17 +01:00
Lukas Wirth
48d17b4181
Move dual blanket impl logic from source analyzer to goto_def
2025-01-20 16:24:42 +01:00
Lukas Wirth
1eb9d15e42
Merge pull request #18967 from Veykril/push-pwonkmwqmmol
...
Properly record meaningful imports as re-exports in symbol index
2025-01-20 13:46:52 +00:00
Lukas Wirth
fe034eddc2
Merge pull request #18934 from 1hakusai1/goto_definition_from_into
...
feat: Add the ability to jump from `into` to `from` definitions
2025-01-20 13:46:47 +00:00
Lukas Wirth
5770977d72
Merge pull request #18982 from Veykril/push-lstmvzsowxyt
...
Extract variable assist triggers less eagerly
2025-01-20 13:45:26 +00:00
Lukas Wirth
2233c31531
Merge pull request #18972 from osiewicz/drop-outgoing-messages-on-background-thread
...
lsp-server: Drop outgoing messages on background thread
2025-01-20 13:39:29 +00:00
Lukas Wirth
64d4181a3c
Merge pull request #18976 from ChayimFriedman2/non-module-generic-args
...
fix: Fix a bug where enum variants were not considered properly in type ns resolution
2025-01-20 13:35:03 +00:00
Lukas Wirth
4193abc3fe
Fix import search not discarding rawness
2025-01-20 14:29:11 +01:00
Lukas Wirth
7ddeabaa74
Less allocs
2025-01-20 14:29:11 +01:00
Lukas Wirth
dbf7ccc889
Preserve impl assoc names in ImplData
2025-01-20 14:29:11 +01:00
Lukas Wirth
70e93ed898
Vec -> Box<[_]>
2025-01-20 14:29:11 +01:00
Lukas Wirth
241fd2ff4d
Properly record meaningful imports as re-exports in symbol index
2025-01-20 14:29:11 +01:00
1hakusai1
f7096db910
Add a test case
2025-01-20 21:22:58 +09:00
1hakusai1
55aee5470b
Use Semantics::resolve_method_call_as_callable to find implementation
2025-01-20 21:17:48 +09:00
Laurențiu Nicola
618b913663
Merge pull request #18981 from Fabian-Gruenbichler/proc-macro-srv-portability
...
proc-macro-srv: make usage of RTLD_DEEPBIND portable
2025-01-20 09:35:11 +00:00
Fabian Grünbichler
5f4f6fb961
proc-macro-srv: make usage of RTLD_DEEPBIND portable
...
the constant is wrong on some platforms (e.g., on mips64el it's 0x10, and 0x8
is RTLD_NOLOAD which makes all this functionality broken), the libc crate takes
care of those differences for us.
fallback to not setting the flag in non-glibc environments - some of them might
have support for it using a different value that we don't know about, and some
of them lack it entirely.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2025-01-20 10:19:24 +01:00
Laurențiu Nicola
3af5c080e6
Bump rustc crates
2025-01-20 11:12:56 +02:00
Laurențiu Nicola
4cf9f491aa
Merge from rust-lang/rust
2025-01-20 11:09:36 +02:00
Laurențiu Nicola
b81474b722
Preparing for merge from rust-lang/rust
2025-01-20 11:09:18 +02:00
bors
9a1d156f38
Auto merge of #135742 - RalfJung:miri-sync, r=RalfJung
...
Miri subtree update
r? `@ghost`
2025-01-19 20:46:10 +00:00
Ralf Jung
544695506c
fix location of pipe module
2025-01-19 10:05:51 -07:00
bors
39dc268459
Auto merge of #135714 - rust-lang:cargo_update, r=clubby789
...
Weekly `cargo update`
Automation to keep dependencies in `Cargo.lock` current.
The following is the output from `cargo update`:
```txt
compiler & tools dependencies:
Locking 13 packages to latest compatible versions
Updating anstyle-wincon v3.0.6 -> v3.0.7
Updating bitflags v2.7.0 -> v2.8.0
Updating chrono-tz v0.10.0 -> v0.10.1
Updating js-sys v0.3.76 -> v0.3.77
Updating log v0.4.22 -> v0.4.25
Updating miniz_oxide v0.8.2 -> v0.8.3
Updating uuid v1.11.1 -> v1.12.0
Updating valuable v0.1.0 -> v0.1.1
Updating wasm-bindgen v0.2.99 -> v0.2.100
Updating wasm-bindgen-backend v0.2.99 -> v0.2.100
Updating wasm-bindgen-macro v0.2.99 -> v0.2.100
Updating wasm-bindgen-macro-support v0.2.99 -> v0.2.100
Updating wasm-bindgen-shared v0.2.99 -> v0.2.100
note: pass `--verbose` to see 41 unchanged dependencies behind latest
library dependencies:
Locking 1 package to latest compatible version
Updating miniz_oxide v0.8.2 -> v0.8.3
note: pass `--verbose` to see 4 unchanged dependencies behind latest
rustbook dependencies:
Locking 12 packages to latest compatible versions
Updating anstyle-wincon v3.0.6 -> v3.0.7
Updating bitflags v2.7.0 -> v2.8.0
Updating cc v1.2.8 -> v1.2.10
Updating js-sys v0.3.76 -> v0.3.77
Updating log v0.4.22 -> v0.4.25
Updating miniz_oxide v0.8.2 -> v0.8.3
Adding rustversion v1.0.19
Updating wasm-bindgen v0.2.99 -> v0.2.100
Updating wasm-bindgen-backend v0.2.99 -> v0.2.100
Updating wasm-bindgen-macro v0.2.99 -> v0.2.100
Updating wasm-bindgen-macro-support v0.2.99 -> v0.2.100
Updating wasm-bindgen-shared v0.2.99 -> v0.2.100
```
2025-01-19 14:19:27 +00:00
Chayim Refael Friedman
8b25ab0c5a
Fix missing upmapping in trait impls completion
2025-01-19 12:47:19 +02:00
The Miri Cronjob Bot
96788aa2b5
Merge from rustc
2025-01-19 05:15:09 +00:00
The Miri Cronjob Bot
5a64c2a592
Preparing for merge from rustc
2025-01-19 05:07:59 +00:00
Chayim Refael Friedman
31e8419de6
Fix a bug where enum variants were not considered properly in type ns resolution
...
They should be considered just as well as in value ns, for example for struct literals.
2025-01-19 06:31:23 +02:00
github-actions
715c3d4fcf
cargo update
...
compiler & tools dependencies:
Locking 13 packages to latest compatible versions
Updating anstyle-wincon v3.0.6 -> v3.0.7
Updating bitflags v2.7.0 -> v2.8.0
Updating chrono-tz v0.10.0 -> v0.10.1
Updating js-sys v0.3.76 -> v0.3.77
Updating log v0.4.22 -> v0.4.25
Updating miniz_oxide v0.8.2 -> v0.8.3
Updating uuid v1.11.1 -> v1.12.0
Updating valuable v0.1.0 -> v0.1.1
Updating wasm-bindgen v0.2.99 -> v0.2.100
Updating wasm-bindgen-backend v0.2.99 -> v0.2.100
Updating wasm-bindgen-macro v0.2.99 -> v0.2.100
Updating wasm-bindgen-macro-support v0.2.99 -> v0.2.100
Updating wasm-bindgen-shared v0.2.99 -> v0.2.100
note: pass `--verbose` to see 41 unchanged dependencies behind latest
library dependencies:
Locking 1 package to latest compatible version
Updating miniz_oxide v0.8.2 -> v0.8.3
note: pass `--verbose` to see 4 unchanged dependencies behind latest
rustbook dependencies:
Locking 12 packages to latest compatible versions
Updating anstyle-wincon v3.0.6 -> v3.0.7
Updating bitflags v2.7.0 -> v2.8.0
Updating cc v1.2.8 -> v1.2.10
Updating js-sys v0.3.76 -> v0.3.77
Updating log v0.4.22 -> v0.4.25
Updating miniz_oxide v0.8.2 -> v0.8.3
Adding rustversion v1.0.19
Updating wasm-bindgen v0.2.99 -> v0.2.100
Updating wasm-bindgen-backend v0.2.99 -> v0.2.100
Updating wasm-bindgen-macro v0.2.99 -> v0.2.100
Updating wasm-bindgen-macro-support v0.2.99 -> v0.2.100
Updating wasm-bindgen-shared v0.2.99 -> v0.2.100
2025-01-19 00:21:55 +00:00
Rémy Rakic
ca1c17c88d
Revert "Auto merge of #134330 - scottmcm:no-more-rvalue-len, r=matthewjasper"
...
This reverts commit e108481f74 , reversing
changes made to 303e8bd768 .
2025-01-18 22:09:34 +00:00
Piotr Osiewicz
06f6d8bcbc
lsp-server: Drop outgoing messages on background thread
...
Closes #18961
2025-01-18 17:47:27 +01:00