Commit graph

33116 commits

Author SHA1 Message Date
Lukas Wirth
76585539f5 Cleanup Name string rendering 2025-01-21 10:05:32 +01:00
Lukas Wirth
c78cc2baa9
Merge pull request #18977 from ChayimFriedman2/fix-upmapping
fix: Fix missing upmapping in trait impls completion
2025-01-21 07:41:22 +00:00
Lukas Wirth
d1ee154c3a
Merge pull request #18989 from Giga-Bowser/syntax-tree-refresh
fix: Only refresh syntax tree view when the active document changes
2025-01-21 07:23:22 +00:00
Chayim Refael Friedman
ce1759635b 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
c272bcdb69 fix: Only refresh syntax tree view when the active document changes 2025-01-20 14:05:19 -05:00
Lukas Wirth
a3eee10638 Goto Display::fmt when invoked on to_string 2025-01-20 17:00:28 +01:00
Lukas Wirth
9aa0ee1bba
Merge pull request #18984 from Veykril/push-nszlmxoxyxss
internal: Move dual blanket impl logic from source analyzer to goto_def
2025-01-20 15:47:43 +00:00
Lukas Wirth
0fdab1be36 Bring back goto def redirect for parse -> FromStr 2025-01-20 16:32:17 +01:00
Lukas Wirth
03ea40369f Move dual blanket impl logic from source analyzer to goto_def 2025-01-20 16:24:42 +01:00
Lukas Wirth
93a5846784
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
b2f822b074
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
8a5aa80488
Merge pull request #18982 from Veykril/push-lstmvzsowxyt
Extract variable assist triggers less eagerly
2025-01-20 13:45:26 +00:00
Lukas Wirth
b795b7bb42
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
40ba51cb02
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
a06606c802 Fix import search not discarding rawness 2025-01-20 14:29:11 +01:00
Lukas Wirth
20ff27e2ba Less allocs 2025-01-20 14:29:11 +01:00
Lukas Wirth
0480ebef75 Preserve impl assoc names in ImplData 2025-01-20 14:29:11 +01:00
Lukas Wirth
76c1a376c3 Vec -> Box<[_]> 2025-01-20 14:29:11 +01:00
Lukas Wirth
51cc1a4614 Properly record meaningful imports as re-exports in symbol index 2025-01-20 14:29:11 +01:00
1hakusai1
913ec54f84 Add a test case 2025-01-20 21:22:58 +09:00
1hakusai1
5384dd8947 Use Semantics::resolve_method_call_as_callable to find implementation 2025-01-20 21:17:48 +09:00
Laurențiu Nicola
46e2d6ec01
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
Laurențiu Nicola
7b65774098
Merge pull request #18980 from lnicola/sync-from-rust
minor: Sync from downstream
2025-01-20 09:29:00 +00:00
Fabian Grünbichler
73fc468a8f 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
16d5c20225 Bump rustc crates 2025-01-20 11:12:56 +02:00
Laurențiu Nicola
a9e1e65ae8 Merge from rust-lang/rust 2025-01-20 11:09:36 +02:00
Laurențiu Nicola
67a8add5a7 Preparing for merge from rust-lang/rust 2025-01-20 11:09:18 +02:00
Chayim Refael Friedman
a2826598f5 Fix missing upmapping in trait impls completion 2025-01-19 12:47:19 +02:00
bors
053bc51c54 Auto merge of #134976 - mgsloan:improve-select-nth-unstable-docs, r=ibraheemdev
Improve `select_nth_unstable` documentation clarity

* Instead uses `before` and `after` variable names in the example
where `greater` and `lesser` are flipped.

* Uses `<=` and `>=` instead of "less than or equal to" and "greater
than or equal to" to make the docs more concise.

* General attempt to remove unnecessary words and be more precise. For
example it seems slightly wrong to say "its final sorted position",
since this implies there is only one sorted position for this element.
2025-01-19 08:50:12 +00:00
Chayim Refael Friedman
044c831f7f 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
Luuk Wester
57bd824b5a Make niches into nices 2025-01-18 19:35:27 +01:00
Piotr Osiewicz
b57157ea94 lsp-server: Drop outgoing messages on background thread
Closes #18961
2025-01-18 17:47:27 +01:00
Laurențiu Nicola
248bd511ae
Merge pull request #18966 from lnicola/bump-windows-sys
minor: Bump `windows-sys`
2025-01-18 15:59:53 +00:00
Laurențiu Nicola
f2ce21c637
Merge pull request #18957 from markmurphydev/docs_vscode_syntax_tree
Update syntax tree viewer docs
2025-01-18 15:59:22 +00:00
Lukas Wirth
2cd26fd9f5
Merge pull request #18968 from Veykril/push-szvltqqttsyy
fix: `cargo rustc --print` needs `unstable-options`
2025-01-18 11:21:03 +00:00
Lukas Wirth
0f7b85a9d6 fix: cargo rustc --print needs unstable-options 2025-01-18 12:04:57 +01:00
Lukas Wirth
b1def0ce47 Extract variable assist triggers less eagerly 2025-01-18 09:52:56 +01:00
Mark Murphy
1e40500679 Update syntax tree viewer docs 2025-01-17 15:55:38 -05:00
bors
00464e393b Auto merge of #135329 - oli-obk:push-sytltwnzxlrq, r=Noratrieb
Stable Hash: Ignore all HirIds that just identify the node itself

This should provide better incremental caching, but it seems there is more to it.

These IDs also serve no purpose being in the stable hash of the item they refer to, only when referring to *another* item is it important that we hash the `HirId`. So we can at least avoid the cost during stable hashing, even if we don't benefit from it by avoiding some queries' caches from being invalidated

Unsure how to make sure we do this right by construction. Would be nice to do something type based
2025-01-17 20:53:15 +00:00
Laurențiu Nicola
d01fb4d45a Bump windows-sys 2025-01-17 21:28:11 +02:00
Laurențiu Nicola
f61bfa4d7f
Merge pull request #18963 from gvozdvmozgu/Win32_Foundation
add missing `Win32_Foundation` feature
2025-01-17 18:54:57 +00:00
gvozdvmozgu
790d4ac011 add missing Win32_Foundation feature 2025-01-17 08:44:50 -08:00
Lukas Wirth
cd199eacd0
Merge pull request #18908 from jnyfah/error-braces
Fix: Detect missing errors for } braces before else in let...else statements
2025-01-17 13:29:56 +00:00
bors
a15dab1700 Auto merge of #135047 - Flakebi:amdgpu-kernel-cc, r=workingjubilee
Add gpu-kernel calling convention

The amdgpu-kernel calling convention was reverted in commit f6b21e90d1ec01081bc2619efb68af6788a63d65 (#120495 and https://github.com/rust-lang/rust-analyzer/pull/16463) due to inactivity in the amdgpu target.

Introduce a `gpu-kernel` calling convention that translates to `ptx_kernel` or `amdgpu_kernel`, depending on the target that rust compiles for.

Tracking issue: #135467
amdgpu target tracking issue: #135024
2025-01-17 04:36:09 +00:00
bors
5028e54271 Auto merge of #134504 - oli-obk:push-rltsvnyttwll, r=compiler-errors
Use trait definition cycle detection for trait alias definitions, too

fixes #133901

In general doing this for `All` is not right, but this code path is specifically for traits and trait aliases, and there we only ever use `All` for trait aliases.
2025-01-16 18:46:28 +00:00
jnyfah
31c07e4676 CRLF to LF 2025-01-16 16:46:06 +01:00
jnyfah
b96819ca44 added tests 2025-01-16 16:19:47 +01:00
Lukas Wirth
903bc8133c
Merge pull request #18952 from lh123/add-raw-keyword-complete
feat: complete raw, const keyword
2025-01-16 14:24:53 +00:00
jnyfah
2ac6cb1521 revert blocklike changes 2025-01-16 12:54:26 +01:00
lh123
a282733b49 don't complete raw in &mut $0 2025-01-16 19:40:42 +08:00