fix: tyck for non-ADT types when searching refs for `Self` kw
See e0276dc5dd (r1389848845)
For ADTs, to handle `{error}` in generic args, we should to convert them to ADT for comparisons; for others, we can directly compare the types.
StaticIndex::compute filters out modules from libraries. This makes an
exceptions for vendored libraries, ie libraries actually defined inside
the workspace being indexed.
This aims to solve https://bugzilla.mozilla.org/show_bug.cgi?id=1846041
In general StaticIndex is meant for code browsers, which likely want to
index all visible source files.
With the lack of a README on the individually published library crates and the somewhat cryptic `ra_ap_` prefix it is hard to figure out where those crates belong to, so mentioning "rust-analyzer" feels like auseful hint there.
internal: Load VFS config changes in parallel
Simple attempt to make some progress f or https://github.com/rust-lang/rust-analyzer/issues/17373
No clue if those atomic orderings are right, though I don't think they are really too relevant either.
A more complete fix would probably need to replace our `ProjectFolders` handling a bit.
fix: Insert a generic arg for `impl Trait` when lowering generic args
Fixes#17191
We are not inserting a generic arg when lowering generics like
```rust
fn foo<T: B<impl A>(..) { ... }
```
but when we are lowering predicates we do;
aa00ddcf65/crates/hir-ty/src/lower.rs (L1697-L1718)aa00ddcf65/crates/hir-ty/src/lower.rs (L310)
and this mismatch causes index out of bound panic while substituting the predicates
feat: Use oldest rustup rust-analyzer when toolchain override is present
Selects a rust-toolchain declared RA based on its date. The earliest (oldest) RA wins and becomes the one that the workspace uses as a whole.
In terms of precedence:
nightly > stable-with-version > stable
With stable-with-version, we invoke the RA with a `--version` arg and attempt to extract a date. Given the same date as a nightly, the nightly RA will win.
Fixes#17663
fix: Insert a tail `Ok(())` for expr block instead of wrapping with `Ok`
Fixes#17728
When type mismatch is `Result<(), E>, ()` or `Option<()>, ()` and target expr is a block expression, it is more reasonable to insert a wrapped unit - `Ok(())` or `Some(())` - as the tail expression of that block than wrapping the entire block with `Ok` or `Some`