Lukas Wirth
09db657439
Merge pull request #19127 from ChayimFriedman2/different-generic-args
...
feat: Refactor path lowering and serve a new path diagnostic
2025-02-17 08:30:10 +00:00
Chayim Refael Friedman
100e166bb1
Calculate drop glue and show it on hover
...
Also fix the `needs_drop()` intrinsic.
Unions also need this information (to err if they have a drop-needing field), but this will come in a follow-up PR.
2025-02-17 06:29:37 +02:00
Chayim Refael Friedman
353616be8b
Fix sorting of runnables
...
There were two mistakes: first, tests were sorted before test modules, and second, we re-sorted based on the name only, which cancelled the sort based on the kind.
2025-02-17 03:03:29 +02:00
Nicholas Nethercote
610f4c4046
Rename pattern_complexity attr as pattern_complexity_limit.
...
For consistency with `recursion_limit`, `move_size_limit`, and
`type_length_limit`.
2025-02-17 09:30:40 +11:00
Nicholas Nethercote
30bcf2a6b5
Add pattern_complexity_limit to Limits.
...
It's similar to the other limits, e.g. obtained via `get_limit`. So it
makes sense to handle it consistently with the other limits. We now use
`Limit`/`usize` in most places instead of `Option<usize>`, so we use
`Limit::new(usize::MAX)`/`usize::MAX` to emulate how `None` used to work.
The commit also adds `Limit::unlimited`.
2025-02-17 09:30:33 +11:00
Ben Kimock
b4b1e778c9
Move hashes from rustc_data_structure to rustc_hashes so they can be shared with rust-analyzer
2025-02-16 16:18:30 -05:00
Chayim Refael Friedman
55c04ab371
Refactor path lowering
...
And add a new diagnostic for non-`Fn` parenthesized generic args.
Path lowering started to look like a mess, with each function carrying additional parameters for the diagnostic callback (since paths can occur both in type and in expression/pattern position, and their diagnostic handling is different) and the segment index, for the diagnostics report. So I refactored it from stateless functions on `TyLoweringContext` into stateful struct, `PathLoweringContext`, that tracks the process of lowering a path from resolution til assoc types selection.
2025-02-16 19:44:50 +02:00
Lukas Wirth
2b485d7f23
Merge pull request #19137 from asuto15/highlight-extern-crate
...
fix: highlight `extern crate` in doc comments
2025-02-16 14:07:07 +00:00
Lukas Wirth
5ec9d9fd5f
Merge pull request #19155 from ShoyuVanilla/migrate-missing-match-arms
...
internal: Remove mutable syntax tree usages from `add_missing_match_arms` assist
2025-02-16 14:06:45 +00:00
Lukas Wirth
1afbc220bc
fix: Stabilize sort order of related_tests
2025-02-16 13:18:47 +01:00
Lukas Wirth
b332a053e0
Merge pull request #19161 from Veykril/push-prmuyxlnxzxo
...
fix: Improve sort order of runnables
2025-02-16 11:37:52 +00:00
Lukas Wirth
e0d1fba739
fix: Stabilize sort order of runnables
2025-02-16 12:22:26 +01:00
Lukas Wirth
e6ea353d94
Improve error recovery when method-calling an assoc function
2025-02-16 11:49:48 +01:00
Lukas Wirth
b9f76287c2
Set RUSTUP_TOOLCHAIN when loading sysroot workspace
2025-02-16 10:54:08 +01:00
Olivier FAURE
4fa6595f9a
Re-generate doctests
2025-02-15 16:26:28 +01:00
Shoyu Vanilla
7d74f2b3e9
Temporarily ignore tests with comments
2025-02-16 00:12:03 +09:00
Olivier FAURE
e4f62b6999
Implement expand_glob_reexport assist
2025-02-15 16:07:33 +01:00
Olivier FAURE
4de24de6b7
Factor out business logic of expand_glob_import
2025-02-15 13:23:32 +01:00
asuto15
c14140ab8b
fix: remove unnecessary conversion
2025-02-15 13:18:18 +09:00
asuto15
24a778f6c1
Delete library modifier to highlighting for extern crate
2025-02-15 12:06:21 +09:00
Shoyu Vanilla
8b947d7a12
internal: Remove mutable syntax tree usages from add_missing_match_arms assist
2025-02-14 02:36:05 +09:00
David Richey
a297d438bc
Apply cfg.setTest to json projects
2025-02-12 14:05:34 -06:00
asuto15
22b1977840
Delete useless comma
2025-02-13 04:33:08 +09:00
asuto15
535338d8bb
Add modifiers to highlighting for extern crate
2025-02-13 03:58:20 +09:00
Lukas Wirth
c661e5e14e
Merge pull request #19142 from Veykril/push-upwqztrsuwpz
...
Spawn toolchain querying processes in parallel
2025-02-12 16:04:57 +00:00
Lukas Wirth
172a504b56
Rename sysroot src/lib related things
2025-02-12 16:51:27 +01:00
Lukas Wirth
26a5e24507
Merge pull request #19148 from Veykril/push-ptnykrwnwwlu
...
Improve error recovery when method-calling a field
2025-02-12 15:51:04 +00:00
Lukas Wirth
c942fb6061
Improve error recovery when method-calling a field
2025-02-12 16:37:15 +01:00
Lukas Wirth
8a8ff99273
Spawn toolchain querying processes in parallel
2025-02-12 16:24:49 +01:00
Lukas Wirth
12d87252ac
Merge pull request #18928 from roife/fix-18918
...
fix: handle character boundary in search mode
2025-02-12 14:07:51 +00:00
Lukas Wirth
8e81cc0772
Merge pull request #19109 from Veykril/push-nzpuuqommpnq
...
fix: Do not show safety hints for extern items lacking semantics
2025-02-12 13:58:56 +00:00
roife
608d7e14d7
fix: handle character boundary in search mode
2025-02-12 14:47:28 +01:00
Lukas Wirth
e0814742f0
fix: Do not show safety hints for extern items lacking semantics
2025-02-12 14:43:51 +01:00
Lukas Wirth
c9838ec62d
Merge pull request #19111 from ShoyuVanilla/issue-19021
...
fix: Apply adjustments to proper expr when invoking `CoerceMany`
2025-02-12 13:42:52 +00:00
Lukas Wirth
aa64a6da0e
Merge pull request #19110 from eagr/panic-context
...
Simplify panic_context
2025-02-12 13:41:11 +00:00
Lukas Wirth
b636cf93e5
Merge pull request #19125 from ChayimFriedman2/cfg-attr-fast
...
fix: Censor cfg_attr for attribute macros
2025-02-12 13:38:24 +00:00
Lukas Wirth
622ef64f93
Merge pull request #18995 from alibektas/12210
...
fix: Lower range pattern bounds to expressions
2025-02-12 11:58:33 +00:00
Lukas Wirth
5235caf402
Merge pull request #19129 from ChayimFriedman2/snippet-macro
...
fix: Fix postfix completions inside macros
2025-02-12 11:55:46 +00:00
gohome001
d3d455d4fb
minor: don't show drop hints for other pattern
2025-02-12 17:18:42 +08:00
Lukas Wirth
5af2d6abea
Propogate error types in mir type projections
2025-02-12 09:24:33 +01:00
Chayim Refael Friedman
8aa4ae5e69
Merge pull request #19117 from gohome001/implicit-drop-inlay-hints-bug
...
Fix: don't emit implicit drop inlay hints for macro
2025-02-11 13:18:04 +00:00
Lukas Wirth
78e7515a30
Merge pull request #18998 from ChayimFriedman2/exclude
...
fix: Make `rust-analyzer.files.excludeDirs` work, actually
2025-02-11 11:41:54 +00:00
gohome001
42f11d49ee
add test case for ignoring inlay hint for macro call
2025-02-11 15:27:34 +08:00
gohome001
55dbf3949d
don't emit implicit drop inlay hints for macro
2025-02-11 15:24:46 +08:00
asuto15
de77d7f661
Fix highlighting for extern crate in doc comments
2025-02-11 15:06:56 +09:00
Lukas Wirth
f5e7172e96
Merge pull request #19124 from jyn514/range-fmt-off-by-one
...
Fix off-by-one error in RangeFormatting
2025-02-10 15:25:54 +00:00
Chayim Refael Friedman
d6f3ff1b9c
Fix postfix completions inside macros
...
Previously the receiver text was taken directly from the AST, which in macros is missing trivia, leading to corruption (or just unintended replacement of user code).
Now we upmap the range, and extract the original file text in it.
2025-02-10 16:38:13 +02:00
Bastian Kersting
50fb303dae
Extend the renaming to coerce_unsafe_ptr
2025-02-10 13:01:55 +00:00
austaras
a48cb25b1c
pass struct fields to chalk
2025-02-10 17:34:25 +08:00
Chayim Refael Friedman
f01f900ff7
Merge pull request #19088 from Hmikihiro/all_remove_duplicate_module_adt
...
fix: if item exsits on module, resolve as module instead of type
2025-02-10 09:02:30 +00:00