about summary refs log tree commit diff
path: root/src/tools/rust-analyzer
AgeCommit message (Collapse)AuthorLines
2024-06-16feat: add space after specific keywords in completionroife-24/+193
2024-06-15fix: handle character boundaries for wide chars in extend_selectionroife-1/+21
2024-06-15Created expand_allowed_builtins, updated expand_macro to call this functionIshan Jain-3/+20
2024-06-14Auto merge of #17417 - Wilfred:intern_macros_salsa, r=Veykrilbors-32/+36
refactor: Prefer plain trait definitions over macros for impl_intern_value_trivial `impl_intern_value_trivial` can be defined with a trait directly, so prefer that over a macro definition.
2024-06-14allow format_args! expansionIshan Jain-1/+2
2024-06-14fixed testsIshan Jain-1/+7
2024-06-14added testsIshan Jain-0/+26
2024-06-13Prefer plain trait definitions over macros for salsaWilfred Hughes-32/+36
2024-06-13internal: Fix rustdoc warningsWilfred Hughes-32/+33
`cargo doc` generates a bunch of warnings on rust-analyzer. Fix all the bare URL and empty code block warnings.
2024-06-13fix: Only show unlinked-file diagnostic on first line during startupWilfred Hughes-3/+23
This partially reverts #17350, based on the feedback in #17397. If we don't have an autofix, it's more annoying to highlight the whole line. This heuristic fixes the diagnostic overwhelming the user during startup.
2024-06-13Auto merge of #17407 - davidbarsky:david/fix-17402, r=Veykrilbors-8/+9
fix: avoid doubling cargo args in runnables Fixes #17402. Sorry about this—I think I missed up the rebase!
2024-06-13fix: avoid doubling cargo args in runnablesDavid Barsky-8/+9
2024-06-13fix: add a breaker to avoid infinite loops from source root cyclesDavid Hewitt-0/+9
2024-06-13hir/semantics: Only allow expansion of specific built in macrosIshan Jain-2/+30
2024-06-12use is_none_or in some places in the compilerRalf Jung-0/+1
2024-06-12Auto merge of #17406 - Veykril:modpath-clone, r=Veykrilbors-19/+41
internal: Don't unnecessarily clone ModPaths out of interning wrappers
2024-06-12internal: Don't unnecessarily clone ModPaths out of interning wrappersLukas Wirth-19/+41
2024-06-12Auto merge of #17405 - Veykril:modpath-clone, r=Veykrilbors-30/+29
internal: Don't unnecessarily clone ModPaths in early name res
2024-06-12internal: Don't unnecessarily clone ModPaths in early name resLukas Wirth-30/+29
2024-06-12Auto merge of #17398 - Veykril:bogus-file, r=Veykrilbors-70/+40
internal: Remove FileId::BOGUS
2024-06-12internal: Remove FileId::BOGUSLukas Wirth-70/+40
2024-06-11Auto merge of #16840 - Wilfred:shell_runnable, r=Veykrilbors-230/+631
Allow rust-project.json to include arbitrary shell commands for runnables This is a follow-up on #16135, resolving the feedback raised :) Allow rust-project.json to include shell runnables, of the form: ``` { "build_info": { "label": "//project/foo:my-crate", "target_kind": "bin", "shell_runnables": [ { "kind": "run", "program": "buck2", "args": ["run", "//project/foo:my-crate"] }, { "kind": "test_one", "program": "test_runner", "args": ["--name=$$TEST_NAME$$"] } ] } } ``` If these runnable configs are present for the current crate in rust-project.json, offer them as runnables in VS Code. This PR required some boring changes to APIs that previously only handled cargo situations. I've split out these changes as commits labelled 'refactor', so it's easy to see the interesting changes.
2024-06-11feature: add build system info; runnables to `rust-project.json`Wilfred Hughes-230/+631
2024-06-11Auto merge of #17394 - Veykril:recurse-fix, r=Veykrilbors-16/+48
fix: Fix `HirDisplay` stackoverflow for parameter Self defaults Fixes https://github.com/rust-lang/rust-analyzer/issues/10932
2024-06-11fix: Fix `HirDisplay` stackoverflow for parameter Self defaultsLukas Wirth-16/+48
2024-06-11Auto merge of #17364 - roife:fix-issue-12917, r=Veykrilbors-125/+211
feat: show type bounds from containers when hovering on functions fix #12917. ### Changes 1. Added Support for displaying the container and type bounds from it when hovering on functions with generic types. 2. Added a user config to determine whether to display container bounds (enabled by default). 3. Added regression tests. 4. Simplified and refactored `hir/display.rs` to improve readability.
2024-06-11Auto merge of #17392 - randomicon00:17242, r=Veykrilbors-6/+6
Change 'Length' to 'Len' This is a fix for #17242
2024-06-11edit: Length to Len in benchmarkrandomicon00-1/+1
2024-06-11refactor: move the logic that displays container type bounds to function fmtroife-45/+49
2024-06-11fix: skip container header if no generics paramsroife-2/+2
2024-06-11internal: simplify and rename display_xxx to write_xxx for consistencyroife-33/+18
2024-06-11feat: add hover config for showing container boundsroife-14/+60
2024-06-11feat: show type bounds from containers for functionsroife-5/+47
2024-06-11internal: simplify and refactor write_where_clauseroife-89/+98
2024-06-11edit: change 'Length' to 'Len'randomicon00-5/+5
2024-06-11Chore(deps-dev): Bump braces from 3.0.2 to 3.0.3 in /editors/codedependabot[bot]-7/+7
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3. - [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md) - [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3) --- updated-dependencies: - dependency-name: braces dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
2024-06-11Auto merge of #17374 - Veykril:configs, r=Veykrilbors-108/+142
Allow choosing logical cores for num threads config
2024-06-11Simplify some config serialization stuffLukas Wirth-101/+101
2024-06-11Auto merge of #17377 - Young-Flash:hir_print, r=Veykrilbors-8/+17
internal: better print style for hir before: ![before](https://github.com/rust-lang/rust-analyzer/assets/71162630/cd5e27b3-b4b1-450f-ba50-3c4f4e345d70) after: ![after](https://github.com/rust-lang/rust-analyzer/assets/71162630/04e11345-cadd-49cb-b10c-6888ef51758e)
2024-06-10Auto merge of #17381 - roife:fix-issue-17378, r=Veykrilbors-3/+23
fix: ensure that the parent of a SourceRoot cannot be itself fix #17378. In `FileSetConfig.map`, different roots might be mapped to the same `root_id` due to deduplication in `ProjectFolders::new`: ```rust // Example from rustup /Users/roife/code/rustup/target/debug/build/rustup-863a063426b56c51/out /Users/roife/code/rustup ``` In `source_root_parent_map`, r-a might encounter paths where their SourceRootId (i.e. `root_id`) is identical, yet one the them is the parent of the another. This situation can cause the `root_id` to be its own parent, potentially leading to an infinite loop. This PR resolves such cases by adding a check.
2024-06-10fix: ensure that the parent of a SourceRoot cannot be itselfroife-3/+23
2024-06-10Remove extra parse cache from Semantics againLukas Wirth-9/+1
2024-06-10Thread more HasSource::source calls through Semantics for cachingLukas Wirth-84/+121
2024-06-10Auto merge of #17372 - Veykril:parallel-diagnostics, r=Veykrilbors-62/+150
feat: Compute native diagnostics in parallel
2024-06-09Don't intern attribute inputs as their spans make them uniqueLukas Wirth-6/+6
2024-06-09minor: use push_str insteadYoung-Flash-12/+5
2024-06-09internal: tweak test caseYoung-Flash-5/+7
2024-06-09Fix divide by zeroLukas Wirth-1/+2
2024-06-09Register virtual workspace Cargo.toml files in the VFSLukas Wirth-37/+77
2024-06-09Allow choosing logical cores for num threads configLukas Wirth-9/+43