Ali Bektas
97251b3e28
Check if PatPtr resolves to ExprId
2025-02-09 17:31:45 +01:00
Ali Bektas
76b93c0d1f
Fix clippy errors
2025-02-09 17:31:09 +01:00
Ali Bektas
419231c79d
Remove fixme and add a missing test attribute
2025-02-09 17:31:09 +01:00
Ali Bektas
bd369a83c0
Remove dbg lines
2025-02-09 17:31:09 +01:00
Ali Bektas
18f90a9d2a
resolve_bind_pat_to_const does not early return if expr
2025-02-09 17:31:09 +01:00
Ali Bektas
574ea0296c
make SourceAnalyzer::pat_id return ExprOrPatId
...
Not all patterns are mapped to Pats. As such, it was necessary to change
the ret type Option<PatId> to Option<ExprOrPatId>
2025-02-09 17:31:09 +01:00
Ali Bektas
8956b1e1ba
Lower ast::Ident to hir::Path when lowering RangePats
2025-02-09 17:31:09 +01:00
Julian Eager
5897755f22
simplify panic_context
2025-02-08 01:39:07 +08:00
Shoyu Vanilla
11ffa88505
fix: Apply adjustments to proper expr when invoking CoerceMany
2025-02-08 02:38:41 +09:00
Lukas Wirth
039ac844f1
Merge pull request #19104 from jnyfah/some-branch
...
option to disable inlay Type hints for Closure parameters
2025-02-07 10:45:38 +00:00
jnyfah
7d1fedc4f3
minor changes
2025-02-07 10:50:45 +01:00
Lukas Wirth
ef05ca5d3b
Merge pull request #19106 from ShoyuVanilla/issue-18682
...
fix: Resolve projection types before checking casts
2025-02-07 08:13:12 +00:00
Shoyu Vanilla
b7b4dd5afc
fix: Resolve projection types before checking casts
2025-02-07 09:51:32 +09:00
David Richey
4d650702af
fix: Don't emit empty scip occurrence for builtins
2025-02-06 12:22:58 -06:00
jnyfah
6b328750e5
collapsing if statement
2025-02-06 16:18:15 +01:00
jnyfah
4522bf42ca
closure parameter inlay hints
2025-02-06 15:55:56 +01:00
Lukas Wirth
ca47cddc31
Merge pull request #19099 from Veykril/push-qxylslwltsqy
...
Use interior mutability for loaded `ProcMacrorv::expanders`
2025-02-05 11:17:21 +00:00
Lukas Wirth
5ec0057418
Use interior mutability for loaded ProcMacrorv::expanders
2025-02-05 12:01:57 +01:00
Chayim Refael Friedman
549b49fdc8
Do not include excluded files even when the client opens them
...
This require a pretty big modification, because this is a new kind of file: exists - but ignore it.
2025-02-05 11:11:25 +02:00
Lukas Wirth
fc726ced6b
Merge pull request #18912 from vishruth-thimmaiah/fix_named_struct_assist
...
fix: upmap ranges in convert_tuple_struct_to_named_struct assist
2025-02-05 08:49:53 +00:00
Laurențiu Nicola
2ad4ec5b73
Merge pull request #19094 from ChayimFriedman2/use-body
...
fix: Fix IDE resolution of `use` inside a body
2025-02-05 07:16:35 +00:00
Chayim Refael Friedman
8ea61356a9
Remove a no-longer-correct FIXME
2025-02-04 23:07:48 +02:00
Chayim Refael Friedman
74591ecefe
Fix incorrect terminology
...
Lifetimes are elided in function signatures, and inferred in bodies.
2025-02-04 23:07:35 +02:00
Chayim Refael Friedman
1432ab05d9
Refactor TyLoweringContext::substs_from_args_and_bindings() to always take a GenericDefId
2025-02-04 23:07:05 +02:00
Chayim Refael Friedman
6fb64beb80
Merge pull request #19095 from ChayimFriedman2/fixme-adt_const_params
...
minor: Add a FIXME for feature(adt_const_params)
2025-02-04 19:43:31 +00:00
Chayim Refael Friedman
9db2499bb9
Add a FIXME for feature(adt_const_params)
2025-02-04 21:28:19 +02:00
Chayim Refael Friedman
bffc169925
Fix a failing test
...
The reason this test passed previously is not because it was working as intended, but because prior to the previous commit we did not resolve the `use` at all!
Now, `use self as _` is invalid code anyway (it prints E0429), and because we fallback to the value namespace if we can't resolve in the type namespace (which is a reasonable behavior), this test now actually fails.
I don't think we want to change the fallback, so I removed `use self as _` and instead added a new test, where the value can be resolved in the type namespace.
2025-02-04 19:10:04 +02:00
Chayim Refael Friedman
134b6f2228
Fix IDE resolution of use inside a body
...
We stopped the expression search too early because `use` is an item.
2025-02-04 18:30:50 +02:00
Chayim Refael Friedman
ac6b054ca5
Make rust-analyzer.files.excludeDirs work, actually
...
I have no idea what the original writer of the code thought but the logic just seems backwards. We should not exclude a file/directory if it is equal to an include! This also meant that we had to add a `root == path` check so this stuff will actually work, which in turn meant excludes (of root files) no longer worked...
Also rename if to `rust-analyzer.files.exclude`, because it can exclude files as well.
2025-02-04 17:54:13 +02:00
Lukas Wirth
55e473abbf
Merge pull request #19093 from Veykril/push-lrvoookylnxp
...
Prevent panics from tearing down worker threads
2025-02-04 14:20:36 +00:00
Lukas Wirth
5ac4e9769c
Prevent panics from tearing down worker threads
2025-02-04 15:03:35 +01:00
Lukas Wirth
0fd4fc3522
Merge pull request #19084 from Veykril/push-muworpzpzqup
...
Split cache priming into distinct phases
2025-02-04 13:57:39 +00:00
Lukas Wirth
ab5e821d97
Expose symbol of CrateName
2025-02-04 14:38:58 +01:00
Lukas Wirth
13c17db07b
Merge pull request #19066 from alibektas/slice_pattern_type_inference
...
fix: try to infer array type from slice pattern
2025-02-03 14:03:50 +00:00
Lukas Wirth
cd0753a5ce
Merge pull request #19086 from Veykril/push-ponvylutpnww
...
fix: Fix some mir eval/lowerings
2025-02-03 13:58:34 +00:00
Lukas Wirth
d6645d11da
Fix some mir eval/lowerings
2025-02-03 14:42:41 +01:00
Lukas Wirth
b3ff41ebe4
Merge pull request #19085 from Veykril/push-sknwykqmlott
...
Do not use make use of `InferenceResult::has_errors` flag for mir building
2025-02-03 12:43:14 +00:00
Lukas Wirth
465844c3be
Do not use make use of InferenceResult::has_errors flag for mir building
...
It generaly does not work as expected right now as we fallback type parameters to errors
2025-02-03 12:26:06 +01:00
Ali Bektas
135fca9efe
Revert tests::patterns::infer_pattern
...
And apply requested changes
2025-02-03 12:23:13 +01:00
Ali Bektas
94b00c210c
Add a test to monitor whats going on
2025-02-03 12:14:13 +01:00
Ali Bektas
d8779b4a0e
Make higher levels adapt Bodys exprs having ExprOrPatId values
2025-02-03 12:14:13 +01:00
Ali Bektas
06097c3388
Make Pat::Range's start and end Option<ExprId>
2025-02-03 12:14:11 +01:00
Lukas Wirth
b7b09d2acb
Merge pull request #19062 from darichey/scip-fix-module-names
...
Fix scip indexing of module names
2025-02-03 10:05:19 +00:00
Lukas Wirth
b32ddea521
Split cache priming into distinct phases
2025-02-03 10:47:53 +01:00
Lukas Wirth
a830096546
More rustfmt hang investigations
2025-02-02 10:04:57 +01:00
Bastian Kersting
8196d260e8
Insert null checks for pointer dereferences when debug assertions are enabled
...
Similar to how the alignment is already checked, this adds a check
for null pointer dereferences in debug mode. It is implemented similarly
to the alignment check as a MirPass.
This is related to a 2025H1 project goal for better UB checks in debug
mode: https://github.com/rust-lang/rust-project-goals/pull/177 .
2025-01-31 11:13:34 +00:00
Laurențiu Nicola
3c2aca1e5e
Merge pull request #19072 from cessen/concat_uniquely
...
Fix #19071 : ensure `completion_item_hash` serializes items uniquely
2025-01-30 08:15:31 +00:00
Nathan Vegdahl
88d66a8590
Use to_ne_bytes instead of to_le_bytes
2025-01-29 20:21:57 +01:00
Nathan Vegdahl
87fb27930a
Fix typo
2025-01-29 17:47:38 +01:00
Nathan Vegdahl
b89adf07d4
Fix #19071 : ensure completion_item_hash serializes items uniquely
...
Previously it may have been possible for different completion items to
produce colliding hashes, not because of the hash but because of how
the items were serialized into byte streams for hashing. See #19071
for details.
The chances of that happening were low, if it was actually possible at
all. Nevertheless, this commit ensures that it definitely can't happen.
This commit uses a handful of techniques used to fix this, but they all
boil down to "ensure this could be re-parsed". If it's possible to parse
to recreate the original item, then by construction there is no chance
of two different items getting serialized to identical byte streams.
2025-01-29 17:22:13 +01:00