David Barsky
5f900f4c22
Merge pull request #20677 from ShoyuVanilla/fix-ena
...
Fix "sync-from-ra" for `rust-lang/rust`
2025-09-16 18:36:41 +00:00
Shoyu Vanilla
0b76080c36
Fix "sync-from-ra" for rust-lang/rust
2025-09-17 03:22:52 +09:00
Lukas Wirth
57ad00b07f
Merge pull request #20612 from Veykril/veykril/push-vzuykrsxvrts
...
fix: Fix expand macro recursively not working correctly for nested macro calls
2025-09-16 07:51:08 +00:00
Lukas Wirth
0bbc55b367
Merge pull request #20402 from rust-lang/veykril/push-pursotqxutsx
...
Add more workaround hacks for incorrect startup diagnostics
2025-09-16 07:30:45 +00:00
Lukas Wirth
aecb756876
Merge pull request #20517 from Veykril/veykril/push-wrurmtqppzus
...
fix: Only compute unstable paths on nightly toolchains for IDE features
2025-09-16 07:28:47 +00:00
Lukas Wirth
015b9466c7
Add more workaround hacks for incorrect startup diagnostics
2025-09-16 09:18:03 +02:00
Lukas Wirth
8fcc577b73
Workaround lsp-types typo
2025-09-16 09:17:38 +02:00
Lukas Wirth
685f156fa6
fix: Only compute unstable paths on nightly toolchains for IDE features
2025-09-16 09:17:16 +02:00
Lukas Wirth
bd57ea0871
fix: Fix expand macro recursively not working correctly for nested macro calls
2025-09-16 09:16:42 +02:00
Chayim Refael Friedman
05f8122972
Merge pull request #20671 from ShoyuVanilla/explicit-preds-fix
...
fix: More precise clause filtering for `explicit_*_predicates_of`
2025-09-15 20:19:03 +00:00
Shoyu Vanilla
33f7ffe4da
fix: More precise clause filtering for explicit_*_predicates_of
2025-09-16 01:44:00 +09:00
Laurențiu Nicola
e38a7b43f8
Merge pull request #20669 from ChayimFriedman2/testing-guide
...
internal: Add a testing guide
2025-09-15 08:01:02 +00:00
Chayim Refael Friedman
24ece0de41
Add a testing guide
2025-09-15 10:48:26 +03:00
Chayim Refael Friedman
622b2675db
Merge pull request #20667 from ChayimFriedman2/ns-cleanup2
...
internal: Add Regression Test For The One And The Only Issue #5514
2025-09-15 06:02:57 +00:00
Chayim Refael Friedman
b9797aa325
Add Regression Test For The One And The Only Issue #5514
2025-09-15 08:50:41 +03:00
Laurențiu Nicola
6f9a6ba017
Merge pull request #20652 from ChayimFriedman2/cli-diags
...
internal: Improve `rust-analyzer diagnostics`
2025-09-15 05:42:46 +00:00
Shoyu Vanilla (Flint)
3a675445ac
Merge pull request #20665 from ChayimFriedman2/error-notable
...
fix: Don't mark unknown type as implementing every notable trait
2025-09-15 05:39:17 +00:00
Chayim Refael Friedman
c09b440f0e
Merge pull request #20666 from ChayimFriedman2/ns-cleanup1
...
minor: Add regression tests to some S-blocked-on-new-solver issues
2025-09-15 05:37:17 +00:00
Chayim Refael Friedman
40487c6a60
Add regression tests to some S-blocked-on-new-solver issues
...
That were fixed by the migration.
2025-09-15 08:25:17 +03:00
Chayim Refael Friedman
4dbb8b4c64
Don't mark unknown type as implementing every notable trait
...
Because the new solver, will return "yes" for them (which is a good thing).
2025-09-15 07:57:19 +03:00
Chayim Refael Friedman
27897e48dc
Improve rust-analyzer diagnostics
...
In my experience the `processing <module>` messages make it harder to search for the actual diagnostics, so remove them and instead print the filename only if there is a diagnostic.
Also allow choosing the minimum severity.
2025-09-14 23:22:57 +03:00
Chayim Refael Friedman
760d378e4c
Merge pull request #20654 from ShoyuVanilla/predicates
...
fix: Infinite loop while elaborting predicates
2025-09-14 11:20:04 +00:00
Shoyu Vanilla
26b8b794fb
fix: Infinite loop while elaborting predicates
2025-09-14 20:08:40 +09:00
Shoyu Vanilla (Flint)
5727ececcc
Merge pull request #20635 from iorizu/fix-double-flycheck
...
fix: Don't trigger two flychecks when saving files that are part of targets
2025-09-14 09:11:30 +00:00
Laurențiu Nicola
8192c6345f
Merge pull request #20657 from A4-Tacks/fix-before-else-incomplete-let
...
Fix extra semicolon before else in let-stmt
2025-09-13 13:49:45 +00:00
A4-Tacks
d42c81e8d1
Fix extra semicolon before else in let-stmt
...
Example
---
```rust
fn main() {
let x = if true {
()
} $0 else {};
}
```
**Before this PR**:
```rust
fn main() {
let x = if true {
()
} else if $1 {
$0
}; else {};
}
```
**After this PR**:
```rust
fn main() {
let x = if true {
()
} else if $1 {
$0
} else {};
}
```
2025-09-12 20:56:59 +08:00
Ifeanyi Orizu
8497cba0e7
Minor refactoring
2025-09-11 10:38:34 -05:00
Shoyu Vanilla (Flint)
db0420c278
Merge pull request #20642 from ChayimFriedman2/wasm-safe
...
fix: Make `#[target_feature]` always safe on WASM
2025-09-11 05:09:26 +00:00
Laurențiu Nicola
f9675f04ea
Merge pull request #20653 from A4-Tacks/gen-function-empty-gen-param
...
Fix empty generic param list for generate_function
2025-09-11 05:08:00 +00:00
A4-Tacks
d0b95bd67f
Fix empty generic param list for generate_function
...
Example
---
```rust
struct Foo<S>(S);
impl<S> Foo<S> {
fn foo(&self) {
self.bar()$0;
}
}
```
**Before this PR**:
```rust
struct Foo<S>(S);
impl<S> Foo<S> {
fn foo(&self) {
self.bar();
}
fn bar<>(&self) ${0:-> _} {
todo!()
}
}
```
**After this PR**:
```rust
struct Foo<S>(S);
impl<S> Foo<S> {
fn foo(&self) {
self.bar();
}
fn bar(&self) ${0:-> _} {
todo!()
}
}
```
2025-09-11 10:23:02 +08:00
Shoyu Vanilla (Flint)
d048a477dc
Merge pull request #20649 from ChayimFriedman2/cast-unknown
...
fix: Always coerce in a cast, even when there are unknown types
2025-09-10 02:27:53 +00:00
Chayim Refael Friedman
577203afca
Always coerce in a cast, even when there are unknown types
...
This cause the relationships between inference vars to get recorded.
2025-09-10 04:57:10 +03:00
Shoyu Vanilla (Flint)
cd529a48f7
Merge pull request #20645 from ChayimFriedman2/update-rustc
...
internal: Upgrade rustc crates
2025-09-10 01:45:46 +00:00
Shoyu Vanilla (Flint)
8b2671e0c4
Merge pull request #20647 from ChayimFriedman2/ns-projections
...
fix: Fix normalization in the new solver
2025-09-10 01:32:49 +00:00
Chayim Refael Friedman
287a6e9482
Properly handle normalization
...
Previously normalization was broken, which caused a lot of fake errors.
This fix most type mismatches of the new solver, and it also reverts many test regressions.
The downside is that now `chalk_ir::TyKind::AssociatedType`/`chalk_ir::TyKind::Alias` cannot be trusted anymore with their roles, namely: `AssociatedType` is always fully normalized and `Alias` only if it can possibly be normalized further. That seems okay as the new solver does not have this distinction at all (due to it being a lazy normalizer), so this will only hold for the migration time. This does mean we have to change some APIs, notably `hir::Type::walk()` and `TyFingerprint`, to treat `Alias` the same as `AssociatedType`.
Another small thing this commit does is to isolate processing of user-written types (currently involving replacing error types and normalizing, but in the future validation will also be needed) to separate functions.
2025-09-10 03:32:06 +03:00
Chayim Refael Friedman
0f1adf43df
An associated type is not a projection!
...
More correctly, a `TyKind::AssociatedType` is not the same as `TyKind::Projection`.
We used to map next-solver `TyKind::Alias` to Chalk's `TyKind::AssociatedType`. This is very incorrect, as `AssociatedType` is assumed to be fully normalized, and caused a lot of type mismatches.
Unfortunately fixing this causes a lot of stack overflows, because the next solver doesn't have something akin to `AssociatedType` so we normalize again and again. The reason is that is the lazy-normalization nature of the next solver, which means we need to stop normalizing everything. This will be fixed in the next commit.
2025-09-10 00:53:15 +03:00
Chayim Refael Friedman
d03fd874d0
Adopt even more custom types in the new solver
...
A lot of simplification and fun.
2025-09-10 00:48:33 +03:00
Chayim Refael Friedman
9621689e47
Upgrade rustc crates and handle changes to canonicalization
...
They have to do with diagnostics, we could probably not support them but we will also someday want good diagnostics.
The code is mostly copied from rustc.
2025-09-10 00:48:33 +03:00
David Barsky
07b68bd9c1
Merge pull request #20613 from A4-Tacks/diag-unresolved-field-fixes-ws
...
Fix indent for unresolved_field fixes
2025-09-09 18:49:52 +00:00
David Barsky
bc6e592fb4
Merge pull request #20639 from ChayimFriedman2/update-test-abs
...
fix: Resolve paths to snapshot test libraries absolutely
2025-09-09 17:16:50 +00:00
Chayim Refael Friedman
412932e629
Merge pull request #20578 from ShoyuVanilla/inftbl
...
Migrate `InferenceTable` into next-solver
2025-09-09 16:55:06 +00:00
Shoyu Vanilla
4a8bc8db38
Fix failing tests and fill-in missing details
2025-09-10 01:43:22 +09:00
jackh726
d24e8c1d38
WIP switch inference table to next-solver
2025-09-09 22:45:14 +09:00
Chayim Refael Friedman
fcab4fbabb
Make #[target_feature]
safe always on WASM
...
Even when the feature isn't enabled, as it's not UB to invoke an undefined feature in WASM (just a trap).
2025-09-09 13:49:11 +03:00
Chayim Refael Friedman
6315e315ad
Expand target info to include the architecture
...
And make it easier to expand it more in the future, if needed.
2025-09-09 13:47:26 +03:00
Chayim Refael Friedman
f91b99b471
Resolve paths to snapshot test libraries absolutely
...
That is, resolve them globally, not from the test's location.
This *should* result in more robust resolution; for example, previously the code failed to detect the presence of snapshot testing if the snapshot library was renamed in the dependency or was an indirect dependency.
2025-09-09 10:38:20 +03:00
Chayim Refael Friedman
6da1ce7869
Merge pull request #20624 from A4-Tacks/fix-syn-lifetime-bounds
...
Fix LifetimeParam::lifetime_bounds invalid implement
2025-09-09 07:35:19 +00:00
Chayim Refael Friedman
a61c419024
Merge pull request #20638 from Kobzol/book-share-cache
...
Add a FAQ entry about RA and Cargo build lock/cache conflicts
2025-09-09 07:25:56 +00:00
A4-Tacks
080f2b3f71
Fix LifetimeParam::lifetime_bounds invalid implement
...
Lifetime node example:
```
LIFETIME_PARAM@15..21
LIFETIME@15..17
LIFETIME_IDENT@15..17 "'a"
COLON@17..18 ":"
WHITESPACE@18..19 " "
TYPE_BOUND_LIST@19..21
TYPE_BOUND@19..21
LIFETIME@19..21
LIFETIME_IDENT@19..21 "'b"
```
2025-09-09 15:22:12 +08:00
Jakub Beránek
e5a51cc6c5
Add a FAQ entry about RA and Cargo interaction
2025-09-09 09:12:09 +02:00