Commit Graph

37267 Commits

Author SHA1 Message Date
Lukas Wirth
41f0d80622 Merge pull request #21215 from ChayimFriedman2/unsized-struct
fix: Don't implement sizedness check via `all_field_tys()`
2025-12-07 08:30:54 +00:00
Chayim Refael Friedman
40727e8840 Merge pull request #21218 from ChayimFriedman2/update-supported-version
internal: Update supported Rust version to 1.90.0
2025-12-07 00:24:54 +00:00
Chayim Refael Friedman
9e1ccc2309 Update supported Rust version to 1.90.0
We no longer work properly with older versions.
2025-12-07 02:14:39 +02:00
Chayim Refael Friedman
3172d19886 Don't implement sizedness check via all_field_tys()
Since we don't implement it currently for perf reasons, but here we only need a struct's tail field, it will be wrong.
2025-12-06 21:23:21 +02:00
Lukas Wirth
2cbf3587d3 Merge pull request #21208 from ChayimFriedman2/lint-attrs-hir
internal: Handle lint attributes via hir-expand attr handling
2025-12-05 09:12:21 +00:00
Chayim Refael Friedman
753449bdae Handle lint attributes via hir-expand attr handling
This avoids code duplication.
2025-12-05 07:04:18 +02:00
Chayim Refael Friedman
d4f45d7ae2 Merge pull request #21203 from A4-Tacks/hide-placeholder-hints
Add config hide placeholders type hints
2025-12-04 21:57:01 +00:00
Chayim Refael Friedman
98418dce79 Merge pull request #21205 from eihqnh/fix/cfg-attr-index-mismatch
fix: Skip cfg attributes in macro input attribute stripping
2025-12-04 19:58:03 +00:00
eihqnh
80d84e7cca fix: Skip cfg attributes when stripping macro input attributes 2025-12-05 03:42:39 +08:00
A4-Tacks
e8ee597340 Add config hide placeholders type hints
In the inferred type hints, expand the line too long. add config to disable it.

Example
---
```json
{"rust-analyzer.inlayHints.typeHints.hideInferredTypes": true}
```

```rust
use std::collections::HashMap;
fn foo(iter: Vec<Result<HashMap<String, String>, std::io::Error>>) {
    let output = iter.into_iter().collect::<Result<Vec<_>, _>>().unwrap();
}
```

**Before this PR**

```rust
let output: Vec<HashMap<String, String>> = iter.into_iter().collect::<Result<Vec<_ = HashMap<String, String>>, _ = Error>>().unwrap();
```

**After this PR**

```rust
let output: Vec<HashMap<String, String>> = iter.into_iter().collect::<Result<Vec<_>, _>>().unwrap();
```
2025-12-05 02:09:59 +08:00
Lukas Wirth
86779be51d Merge pull request #21183 from ChayimFriedman2/define-opaque
fix: Register `define_opaque` builtin attribute macro
2025-12-04 07:57:54 +00:00
Lukas Wirth
633cff2520 Merge pull request #21195 from Veykril/push-nnzprznzurwz
fix: More proc-macro-srv proto fixes
2025-12-03 16:15:37 +00:00
Lukas Wirth
c3afa4406f fix: More proc-macro-srv proto fixes 2025-12-03 16:17:51 +01:00
Chayim Refael Friedman
0b6dc8648b Merge pull request #21198 from A4-Tacks/nested-incomplete-let-semi
Fix nested expr missing semicolon in incomplete-let
2025-12-03 11:16:26 +00:00
A4-Tacks
109251d3f5 Fix nested expr missing semicolon in incomplete-let
Example
---
```rust
fn main() {
    let x = &$0
}
```

**Before this PR**

```rust
fn main() {
    let x = &loop {
        $0
    }
}
```

**After this PR**

```rust
fn main() {
    let x = &loop {
        $0
    };
}
```
2025-12-03 19:06:03 +08:00
Chayim Refael Friedman
3429867541 Merge pull request #21197 from ChayimFriedman2/result-alias-display
minor: Introduce a type alias for `HirDisplay`'s `Result`
2025-12-03 10:22:17 +00:00
Chayim Refael Friedman
c817e359e9 Introduce a type alias for HirDisplay's Result
Simplify the code a bit.
2025-12-03 12:12:54 +02:00
Lukas Wirth
42d6802133 Merge pull request #21164 from Wilfred/multiple_discover_requests
fix: Allow multiple discover operations
2025-12-03 08:51:11 +00:00
Lukas Wirth
686320cc52 Merge pull request #21188 from Wilfred/fix_rustdoc_and_add_ci
Fix rustdoc warnings and add CI
2025-12-03 08:51:04 +00:00
Laurențiu Nicola
f42c15ba54 Merge pull request #21157 from Wilfred/task_queue_naming
minor: Use 'deferred task' terminology consistently
2025-12-02 19:35:25 +00:00
Laurențiu Nicola
a65c212c50 Merge pull request #21189 from Wilfred/mdbook_toc_simplify
internal: Remove mdbook-toc usage
2025-12-02 07:57:01 +00:00
Laurențiu Nicola
34f47d9298 Merge pull request #21191 from chuck-sys/fix/spelling
fix(spelling): underling -> underlying
2025-12-02 07:32:29 +00:00
Cheuk Yin Ng
beb694b977 fix(spelling): underling -> underlying 2025-12-01 23:21:18 -08:00
Chayim Refael Friedman
b35437dc93 Merge pull request #21182 from ChayimFriedman2/param-env
internal: Remove `TraitEnvironment`
2025-12-02 02:53:34 +00:00
Lukas Wirth
f25db5500b Merge pull request #21190 from Veykril/push-puqrkvrtqxnz
fix: Fix proc-macro-srv passing invalid extra none group to proc-macros
2025-12-01 15:38:00 +00:00
Lukas Wirth
5ca77bd0bc fix: Fix proc-macro-srv passing invalid extra none group to proc-macros 2025-12-01 16:28:18 +01:00
Wilfred Hughes
5f0be6f1c4 Remove mdbook-toc usage
Now that there's a table of contents rendered in the left sidebar,
there doesn't seem to be much value in rendering a table of contents
on the page too.

The sidebar TOC was added in mdbook 0.5:
https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#05-migration-guide
2025-12-01 14:27:20 +00:00
Wilfred Hughes
d2505d9c15 fix: Allow multiple discover operations
Previously, rust-analyzer would drop discover requests that arrived
before we'd finished processing the previous request.

Fix this by allowing multiple discover requests to be active. Keep
track of the number of discover operations for the quiescence check,
and keep the process handles until they terminate.
2025-12-01 13:17:05 +00:00
Wilfred Hughes
86bc07e91a Fix rustdoc warnings and add CI
rustdoc has a separate environment variable for banning warnings, so
set that in the GitHub action configuration.

https://github.com/rust-lang/cargo/issues/8424#issuecomment-1070988443

Fix all the rustdoc warnings on unknown types or functions. I've
updated references wherever it's obvious, otherwise I've replaced the
rustdoc link with plain backticks.

There were also some cases where rustdoc links referred to private
APIs. I've disabled the rustdoc private API warning in those crates.
2025-12-01 13:06:15 +00:00
Wilfred Hughes
3f74f22e4a Use 'deferred task' terminology consistently 2025-12-01 11:18:18 +00:00
Laurențiu Nicola
d690155841 Merge pull request #21186 from lnicola/exactly-one
minor: Use `Itertools::exactly_one` in a couple more places
2025-12-01 11:03:31 +00:00
Laurențiu Nicola
8404d0da19 Use Itertools::exactly_one in a couple more places 2025-12-01 12:53:39 +02:00
Laurențiu Nicola
72b935f64a Merge pull request #21185 from rust-lang/rustc-pull
Rustc pull update
2025-12-01 10:40:59 +00:00
Laurențiu Nicola
cbdd9c9102 Merge pull request #21171 from Veykril/push-puuqoostoysw
minor: Option-box `crate_lang_items` query result
2025-12-01 10:40:41 +00:00
The rustc-josh-sync Cronjob Bot
4f45c093e1 Merge ref 'dfe1b8c97bcd' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: dfe1b8c97bcde283102f706d5dcdc3649e5e12e3
Filtered ref: d3d1f3831e
Upstream diff: 1be6b13be7...dfe1b8c97b

This merge was created using https://github.com/rust-lang/josh-sync.
2025-12-01 04:34:35 +00:00
The rustc-josh-sync Cronjob Bot
6085b48608 Prepare for merging from rust-lang/rust
This updates the rust-version file to dfe1b8c97bcde283102f706d5dcdc3649e5e12e3.
2025-12-01 04:29:36 +00:00
Chayim Refael Friedman
a4612ce527 Register define_opaque builtin attribute macro
So that we'll correctly treat it as an attribute.

I don't like that we have to register every builtin macro even if we don't need it, but that's what we got.
2025-12-01 02:31:30 +02:00
Chayim Refael Friedman
8f3104262a Remove TraitEnvironment
We don't need it anymore; `ParamEnv` is enough.

A lot of code relied on getting the crate from the `TraitEnvironment`. Some had it readily available from other sources, some changed to take a new struct `ParamEnvAndCrate`.
2025-12-01 01:51:19 +02:00
Lukas Wirth
d646b23f00 Merge pull request #21179 from Veykril/push-xnrqmltklpxs
internal: Ensure proc-macro-api version check works with postcard across protocol versions
2025-12-01
2025-11-30 17:55:49 +00:00
Lukas Wirth
f8a7fd5a4d internal: Ensure proc-macro-api version check works with postcard across protocol versions 2025-11-30 18:46:29 +01:00
Chayim Refael Friedman
2d3f2e516f Merge pull request #21177 from dfaure-kdab/fix-for-static
gdb pretty printer: fix printing when using Repr::Static
2025-11-30 09:45:25 +00:00
David Faure
3be2b2aaa5 internal: fix gdb pretty printer when using Repr::Static
I missed a ["__0"] to access the str in the Static case.

Also, simplify the code to rely on the pretty printer for str
rather than accessing data_ptr/length directly. This makes it
more robust against changes in str.

Output before: "<SmolStr Static error: There is no member named data_ptr.>"
Output after: "preferred-width"
2025-11-30 10:35:07 +01:00
Chayim Refael Friedman
2ca0461fa8 Merge pull request #21172 from ChayimFriedman2/no-block
internal: Remove the block from `DbInterner`
2025-11-30 09:28:20 +00:00
Chayim Refael Friedman
74f4164fa8 Remove the block from DbInterner
Turns out we're not using it anymore.
2025-11-30 11:18:45 +02:00
Lukas Wirth
05f8b070b8 Merge pull request #21159 from ChayimFriedman2/fix-dyn-projections
fix: Rewrite dyn trait lowering to follow rustc
2025-11-30 08:52:40 +00:00
bors
d3d1f3831e Auto merge of #149327 - lolbinarycat:rustdoc-types-fixup, r=notriddle
yet another improvment to rustdoc js typechecking

biggest improvment is the docs for `FunctionType` and the signatures for functions that accept names of crates were both slightly wrong, this has now been fixed.
2025-11-30 07:16:47 +00:00
Chayim Refael Friedman
75ca520a6a Merge pull request #21170 from ChayimFriedman2/multi-target-feature
fix: Support multiple `enable` in `#[target_feature]`
2025-11-30 02:22:32 +00:00
Lukas Wirth
06705a628d minor: Option-box crate_lang_items query result 2025-11-29 20:55:23 +01:00
Chayim Refael Friedman
f4bc77484c Support multiple enable in #[target_feature] 2025-11-29 21:23:04 +02:00
Lukas Wirth
66c11a2880 Merge pull request #21169 from Veykril/push-psyltyvxtpoz
internal: New style salsa infer query
2025-11-29 19:11:24 +00:00