summary refs log tree commit diff
path: root/src/tools/rust-analyzer/crates/ide-db
AgeCommit message (Collapse)AuthorLines
2025-03-16Suppress must_use for ControlFlow in rust-analyzerMichael Goulet-2/+2
2025-03-10Merge pull request #19331 from lnicola/sync-from-rustLaurențiu Nicola-34/+0
minor: Sync from downstream
2025-03-10Merge pull request #19330 from ChayimFriedman2/normalize-projectionLukas Wirth-39/+58
fix: Normalize projections in evaluated const display and layout calculation
2025-03-10Merge from rust-lang/rustLaurențiu Nicola-34/+0
2025-03-06Warn the user when a rename will change the meaning of the programChayim Refael Friedman-16/+80
Specifically, when a rename of a local will change some code that refers it to refer another local, or some code that refer another local to refer to it. We do it by introducing a dummy edit with an annotation. I'm not a fond of this approach, but I don't think LSP has a better way.
2025-03-06Pass the target crate in `HirFormatter`Chayim Refael Friedman-39/+58
This is required to format evaluated consts, because we need trait env, and it needs the crate (currently it uses the last crate in topological order, which is wrong, the next commit will fix that).
2025-03-05Rollup merge of #137728 - Darksonn:no-tuple-unsize, r=oli-obk许杰友 Jieyou Xu (Joe)-34/+0
Remove unsizing coercions for tuples See https://github.com/rust-lang/rust/issues/42877#issuecomment-2686010847 and below comments for justification. Tracking issue: #42877 Fixes: #135217
2025-03-05Merge pull request #19274 from Veykril/push-pouwrwwrlrltLukas Wirth-5/+17
Highlight unsafe operations as unsafe, not definitions
2025-03-05Use HIR unsafety information for unsafe syntax highlightngLukas Wirth-5/+17
2025-03-05Use size_of from the prelude instead of importedThalia Archibald-4/+3
Use `std::mem::{size_of, size_of_val, align_of, align_of_val}` from the prelude instead of importing or qualifying them. These functions were added to all preludes in Rust 1.80.
2025-03-01More precise macro modifiers for syntax highlightingLukas Wirth-4/+6
2025-02-27fix doc testsBenjaminBrienen-3/+5
2025-02-27enable doctestBenjaminBrienen-1/+0
2025-02-27Delete tuple unsizingAlice Ryhl-34/+0
2025-02-23Remove `limit` crate in favor `usize`Lukas Wirth-5/+3
2025-02-17Merge from rust-lang/rustLaurențiu Nicola-2/+2
2025-02-17Rename `pattern_complexity` attr as `pattern_complexity_limit`.Nicholas Nethercote-2/+2
For consistency with `recursion_limit`, `move_size_limit`, and `type_length_limit`.
2025-02-12fix: Do not show safety hints for extern items lacking semanticsLukas Wirth-1/+1
2025-02-04Expose symbol of `CrateName`Lukas Wirth-5/+8
2025-02-03Split cache priming into distinct phasesLukas Wirth-31/+83
2025-01-28Merge pull request #19063 from ↵David Barsky-7/+0
davidbarsky/davidbarsky/backout-struct-default-fields internal: backout `hir-*` changes from #19001
2025-01-28Merge pull request #19015 from Wilfred/mdbookLukas Wirth-10/+7
manual: Convert to mdbook
2025-01-27Back out "feat: Implement `default-field-values`"David Barsky-7/+0
This backs out commit 7de0b2e75a541b98f735ee6fcd12d326be38d23f.
2025-01-27feat: Implement `default-field-values`Shoyu Vanilla-0/+7
2025-01-26Add GenericDefId::StaticIdLukas Wirth-0/+2
2025-01-25Merge pull request #19028 from Veykril/push-vuytpkvqzwzsLukas Wirth-0/+3
fix: Fix flyimport not filtering via stability of import path
2025-01-25Fix flyimport not filtering via stability of import pathLukas Wirth-0/+3
2025-01-25Merge pull request #19026 from Veykril/push-wrxrutptywzxLukas Wirth-0/+33
Only collect implicit visibile use symbols if they have renames
2025-01-25Only collect implicit visibile use symbols if they have renamesLukas Wirth-0/+33
Otherwise this will pollute the index too much with unnecessary symbols
2025-01-24manual: Convert to mdbookWilfred Hughes-10/+7
Split manual.adoc into markdown files, one for each chapter. For the parts of the manual that are generated from source code doc comments, update the comments to use markdown syntax and update the code generators to write to `generated.md` files. For the weekly release, stop copying the .adoc files to the `rust-analyzer/rust-analyzer.github.io` at release time. Instead, we'll sync the manual hourly from this repository. See https://github.com/rust-analyzer/rust-analyzer.github.io/pull/226 for the sync. This PR should be merged first, and that PR needs to be merged before the next weekly release. This change is based on #15795, but rebased and updated. I've also manually checked each page for markdown syntax issues and fixed any I encountered. Co-authored-by: Lukas Wirth <lukastw97@gmail.com> Co-authored-by: Josh Rotenberg <joshrotenberg@gmail.com>
2025-01-24minor: Suggest better names when a type is a sequenceWilfred Hughes-0/+83
Previously, we'd suggest a type of `vec` for a value of type `Vec<T>`, which is rarely what the user wants. We also had no suggestions for values of type `&[T]`. Instead, try to pluralise the inner type name, and fall back to `items`.
2025-01-24Merge pull request #19016 from Veykril/push-moqnsytyrupuLukas Wirth-10/+12
fix: Fix `ItemScope` not recording glob imports
2025-01-24Fix `ItemScope` not recording glob importsLukas Wirth-10/+12
This caused us other code to incorrectly assume in dealing with a declaration when in fact it was dealing with a glob imported definition
2025-01-21Merge pull request #18986 from Veykril/push-zlwvwlowpzqmLukas Wirth-0/+7
Goto `Display::fmt` when invoked on `to_string`
2025-01-21Cleanup `Name` string renderingLukas Wirth-16/+12
2025-01-20Goto `Display::fmt` when invoked on `to_string`Lukas Wirth-0/+7
2025-01-20Move dual blanket impl logic from source analyzer to goto_defLukas Wirth-0/+12
2025-01-20Fix import search not discarding rawnessLukas Wirth-9/+21
2025-01-20Less allocsLukas Wirth-19/+30
2025-01-20Preserve impl assoc names in ImplDataLukas Wirth-6/+7
2025-01-20Vec -> Box<[_]>Lukas Wirth-7/+4
2025-01-20Properly record meaningful imports as re-exports in symbol indexLukas Wirth-68/+41
2025-01-16Merge pull request #18951 from Veykril/push-zpvunsvlpuxtLukas Wirth-8/+24
Add missing `#[rust_analyzer::rust_fixture]` annotations
2025-01-16Generalize some type walking in hover type actionsLukas Wirth-0/+16
2025-01-16Add missing `#[rust_analyzer::rust_fixture]` annotationsLukas Wirth-8/+24
2025-01-15Early exit in search properlyLukas Wirth-3/+8
2025-01-10Re-implement rust string highlighting via tool attributeLukas Wirth-6/+12
2025-01-10Merge pull request #18904 from Veykril/push-yztnorquuyzwLukas Wirth-1/+1
Improve hover module path rendering
2025-01-10Implement implicit sized bound inlay hintsLukas Wirth-0/+4
2025-01-10Improve hover module path renderingLukas Wirth-1/+1