about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2024-07-10Auto merge of #17572 - beetrees:f16-f128, r=Veykrilbors-73/+384
Add `f16` and `f128` support Adds `f16` and `f128` support, using the `rustc_apfloat` library (also used by `rustc`) for parsing/arithmetic/displaying since the types aren't stable yet so can't be used by rust-analyzer itself. Issue: #17451
2024-07-10Auto merge of #17544 - MikeWalrus:inlay-hint-generic-param-name, r=Veykrilbors-14/+430
feat: add inlay hints for generic parameters fixes #11091 By default, only hints for const generic parameters are shown, and this can be configured through `rust-analyzer.inlayHints.genericParameterHints.enable`. Probably needs more testing.
2024-07-10Remove dead code in config.rsLukas Wirth-13/+0
2024-07-10Add `f16` and `f128` supportbeetrees-73/+384
2024-07-08Auto merge of #17558 - beetrees:fix-double-rounding, r=Veykrilbors-33/+47
fix: Fix double rounding of `f32` literals Fixes #17556 by delaying parsing until the type is known. Also adds a test to check the issue is fixed.
2024-07-08Auto merge of #17565 - mo8it:remove-version-check, r=Veykrilbors-25/+7
Remove version check before using `--keep-going` See https://github.com/rust-lang/rust-analyzer/pull/17561#issuecomment-2214227971 by `@lnicola`
2024-07-08fix: Fix double rounding of `f32` literalsbeetrees-33/+47
2024-07-08Remove version check before using `--keep-going`mo8it-25/+7
2024-07-08feat: add inlay hints for generic parametersLiao Junxuan-14/+443
fixes #11091 By default, only hints for const generic parameters are shown.
2024-07-08Auto merge of #17561 - mo8it:keep-going, r=Veykrilbors-0/+2
Add --keep-going to the check command Fixes https://github.com/rust-lang/rustlings/issues/1628 `@Veykril` I am not sure about what you meant with "unconditionally" in https://github.com/rust-lang/rustlings/issues/1628#issuecomment-2212492230, but I didn't find out how to get the version of the toolchain anyway to do a check like in [this snippet](https://github.com/rust-lang/rust-analyzer/blob/a5b21ea0aa644dffd7cf958b43f11f221d53404e/crates/project-model/src/build_scripts.rs#L125-L127). Is this check even required if rust-analyzer was installed with the toolchain? `--keep-going` was [stabilized in 1.74](https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md#cargo-174-2023-11-16)
2024-07-07Add --keep-going to the check commandmo8it-0/+2
2024-07-07Auto merge of #17555 - Veykril:grammar-inline, r=Veykrilbors-41/+1115
internal: Inline generated syntax methods
2024-07-07Inline all the thingsLukas Wirth-0/+1032
2024-07-07HasGenericArgs syntax traitLukas Wirth-41/+83
2024-07-07Auto merge of #17523 - wada314:master, r=Veykrilbors-11/+233
Add an option to use "::" for the external crate prefix. Fixes #11823 . Hi I'm very new to rust-analyzer and not sure how the review process are. Can somebody take a look at this PR? thanks!
2024-07-07Auto merge of #17554 - Veykril:lsp-violation, r=Veykrilbors-31/+187
fix: Fix callHierarchy LSP violation Fixes https://github.com/rust-lang/rust-analyzer/issues/14839
2024-07-07fix: Fix callHierarchy LSP violationLukas Wirth-31/+187
2024-07-07Auto merge of #17553 - Veykril:simplify-profile, r=Veykrilbors-1170/+1228
Move remaining codegen things to `xtask codegen`
2024-07-07Fix stale reference in architecture.mdLukas Wirth-2/+1
2024-07-07Run codegen commands as tests if their results are commitedLukas Wirth-3/+23
2024-07-07Re-implement tidy as an xtask actionLukas Wirth-60/+69
2024-07-07re-generate feature docs in releaseLukas Wirth-1/+2
2024-07-07Drop sourcegenLukas Wirth-229/+0
2024-07-07Move feature-doc generation to xtask codegenLukas Wirth-10/+17
2024-07-07Update hover test fixtureLukas Wirth-3/+14
2024-07-07Move parser test generation to xtaskLukas Wirth-18/+50
2024-07-07Allow new clippy lint in testLukas Wirth-0/+1
2024-07-07Fix stop_watch on linuxLukas Wirth-17/+29
2024-07-07Update generated lint definitionsLukas Wirth-806/+1034
2024-07-07Drop unused profile thingsLukas Wirth-33/+0
2024-07-07Auto merge of #17552 - Veykril:fn-param-comp-fix, r=Veykrilbors-1/+2
fix: Fix parameter completions using macro expanded source ranges Fixes https://github.com/rust-lang/rust-analyzer/issues/17550
2024-07-07fix: Fix parameter completions using macro expanded source rangesLukas Wirth-1/+2
2024-07-07Auto merge of #17527 - Veykril:caps-config, r=Veykrilbors-515/+525
internal: Move capability querying out of the config module
2024-07-07Move capability querying out of the config moduleLukas Wirth-515/+525
2024-07-06Auto merge of #17551 - Veykril:has-errors, r=Veykrilbors-3/+6
Also mark InferenceResult::has_errors flag when there are error types Should work around https://github.com/rust-lang/rust-analyzer/issues/15090#issuecomment-2211647133
2024-07-06Also mark InferenceResult::has_errors flag when there are error typesLukas Wirth-3/+6
2024-07-06Auto merge of #17549 - Veykril:runnables-fix, r=Veykrilbors-113/+223
fix: Fix runnables being incorrectly constructed I've misunderstood parts of the code here which caused runnables to arbitrarily break :) (I have yet to understand the conditions that made them break though, there is some odd caching involved I feel like ...) Fixes https://github.com/rust-lang/rust-analyzer/issues/17402
2024-07-06fix: Fix runnables being incorrectly constructedLukas Wirth-113/+223
2024-07-06Auto merge of #17548 - Veykril:debug-fix, r=Veykrilbors-11/+15
fix: Fix passing `message-format` after -- in debugging Fixes https://github.com/rust-lang/rust-analyzer/pull/17495#issuecomment-2211717224
2024-07-06Fix passing message-format after -- in debuggingLukas Wirth-11/+15
2024-07-06Auto merge of #17547 - Veykril:runnables-env, r=Veykrilbors-64/+102
internal: Clean up runnable lsp extension This feels like a natural addition to me, and also allows us to drop the expect-test hardcoding from the extension. Additionally, `cargoExtraArgs` is pointless, all the client will do is merge it with `cargoArgs` so the server can do that instead of delegating that to the client.
2024-07-06Don't emit current dir as cwd for runnablesLukas Wirth-17/+22
2024-07-06Flatten cargoExtraArgs away from the runnable lsp extensionLukas Wirth-38/+19
2024-07-06Add environment to runnable lsp extensionLukas Wirth-33/+85
2024-07-06Auto merge of #17508 - jjoeldaniel:landing-page, r=Veykrilbors-0/+128
feat: Add landing/faq walkthrough pages This is a basic implementation of a landing and FAQ page; I've included the bare-bones information as well as a [recommended section on inlay hints](https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frust-analyzer/topic/Landing.20Page/near/446135321). I've also added `rust-analyzer: Open Walkthrough` and `rust-analyzer: Open FAQ` commands for ease of access. I am hoping to create a small list of FAQ to include that might be useful as well as any other information I may have missed in the landing page. Feel free to share any suggestions! ![landing/faq page demo](https://github.com/rust-lang/rust-analyzer/assets/100006388/4644e4f0-4555-4b29-83c1-b048084ad63d) cc #13351
2024-07-06Auto merge of #17546 - Veykril:unresolved-self, r=Veykrilbors-1/+18
internal: Diagnose unresolved self value in path expression
2024-07-06Diagnose unresolved self value in path expressionLukas Wirth-1/+18
2024-07-05Auto merge of #17541 - ShoyuVanilla:nested-impl-traits, r=Veykrilbors-1/+112
Disallow nested impl traits Fixes #17498 The above issue is due to formatting self referencing, recursive bound like `Implemented(^0.0: TraitId(0)<[?0 := ^0.0]>)` on the codes like; ```rust trait Foo<T> {} trait Bar {} fn test(foo: impl Foo<impl Bar>) { ... } ``` When lowering predicate `impl Foo<impl Bar>` in `trait_environment_query`, the outer `impl Foo<...>` is treated as predicates, so the first `TypeRef` that passes the following code is `impl Bar`; https://github.com/rust-lang/rust-analyzer/blob/cae997e3380363a906588f14c7b4587f39cf09f5/crates/hir-ty/src/lower.rs#L376-L400 and thus the `idx` is `0` in the above context. But the following code sets `self_ty` as the `BoundVar` with `idx = 0` because the target param id for predicate `impl Foo<...>` is `0` since `impl Foo` is the first generic-like parameter of `fn test`; https://github.com/rust-lang/rust-analyzer/blob/cae997e3380363a906588f14c7b4587f39cf09f5/crates/hir-ty/src/lower.rs#L998-L1025 For the codes like; ```rust trait Foo { type Assoc; } trait Bar {} fn test(foo: impl Foo<Assoc = impl Bar>) { ... } ``` similar recursive bound doesn't happen because the following codes ***"count the number of `impl Trait` things that appear before the target of our `bound`."*** https://github.com/rust-lang/rust-analyzer/blob/cae997e3380363a906588f14c7b4587f39cf09f5/crates/hir-ty/src/lower.rs#L1168-L1199 Instead of doing similar thing like nested `impl Foo<impl Bar>` thing, this PR lowers such nested impl traits into error types in the similar manner as the rustc does in the following lines (and of course, allows lowering and inferencing nested impl traits for the cases that rustc permits); - https://github.com/rust-lang/rust/blob/e2cf31a6148725bde4ea48acf1e4fe72675257a2/compiler/rustc_ast_passes/src/ast_validation.rs#L802-L813 - https://github.com/rust-lang/rust/blob/7b21c18fe4de32a7d2faa468e6ef69abff013f85/compiler/rustc_ast_passes/src/ast_validation.rs#L1299-L1314 (Though rustc emits [E0666😈](https://doc.rust-lang.org/error_codes/E0666.html), I skipped diagnostics since gathering diagnostics in `hir-def` has no conventions so far 😅)
2024-07-04Disallow nested impl traitsShoyu Vanilla-1/+112
2024-07-03Auto merge of #17536 - Veykril:syntax-diags, r=Veykrilbors-1/+8
fix: Don't emit semantic diagnostics in files with a lot of syntax errors These will only add to the noise when something very unexpected breaks or where parser recovery fails to kick in.