aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src
Commit message (Collapse)AuthorAgeFilesLines
* Remove dead codeAleksey Kladov2020-08-191-25/+15
|
* Future proof find-usages APIAleksey Kladov2020-08-191-1/+3
| | | | | | We might want to provide more efficient impls for check if usages exist, limiting the search, filtering and cancellation, so let's violate YAGNI a bit here.
* Apply couple of rule of thumbs to simplify highlighting codeAleksey Kladov2020-08-191-19/+16
| | | | | | | | | | | | | | | | | Main one: instead of adding a parameter to function to handle special case, make the caller handle it. Second main one: make sure that function does a reasonable thing. `highlight_def` picks a color for def, *regardless* of the context the def is use. Feeding an info from the call-site muddies the responsibilities here. Minor smells, flagging the function as having space for improvement in the first place: * many parameters, some of which are set as constants on most call-sites (introduce severalfunction instad) * boolean param (add two functions instead)
* Inline trivial functionAleksey Kladov2020-08-191-8/+6
|
* SimplifyAleksey Kladov2020-08-191-9/+4
|
* MinorAleksey Kladov2020-08-191-2/+1
|
* Minor cleanupsAleksey Kladov2020-08-191-1/+1
|
* Better nameAleksey Kladov2020-08-191-4/+4
|
* Better API factoring around self access modesAleksey Kladov2020-08-191-10/+16
|
* Add SelfParam to code_modelAleksey Kladov2020-08-194-17/+11
|
* Merge #5811bors[bot]2020-08-191-3/+3
|\ | | | | | | | | | | | | | | | | | | 5811: Minor r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * MinorAleksey Kladov2020-08-191-3/+3
| |
* | Merge #5643bors[bot]2020-08-193-43/+116
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | 5643: Add new consuming modifier, apply consuming and mutable to methods r=matklad a=Nashenas88 This adds a new `consuming` semantic modifier for syntax highlighters. This also emits `mutable` and `consuming` in two cases: - When a method takes `&mut self`, then it now has `function.mutable` emitted. - When a method takes `self`, and the type of `Self` is not `Copy`, then `function.consuming` is emitted. CC @flodiebold Co-authored-by: Paul Daniel Faria <[email protected]>
| * Add new method to Semantics, method_receiver_kind, which returns the kind of ↵Paul Daniel Faria2020-08-162-65/+104
| | | | | | | | | | | | | | self The options are Shared, Mutable, Consuming, and Copied. Use this to add proper highlighting to methods based on usage.
| * Mark mutating functions with `mutable` modifier, and owning functions with ↵Paul Daniel Faria2020-08-162-10/+41
| | | | | | | | `consuming`.
| * Add new HighlightModifier variant, ConsumingPaul Daniel Faria2020-08-161-0/+3
| |
* | Cleanup feature generationAleksey Kladov2020-08-184-16/+11
| |
* | Merge #5695bors[bot]2020-08-183-7/+26
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | 5695: Added completion for unstable features r=matklad a=Fihtangolz Added xtask for downloading list of unstable features from the unstable book and codegen for it. Also included small changes from linter. Co-authored-by: Dmitry <[email protected]> Co-authored-by: Dmitry Opokin <[email protected]>
| * \ Merge remote-tracking branch 'rust-analyzer/master'Dmitry2020-08-183-11/+83
| |\ \
| * | | synchronizing changesDmitry2020-08-143-7/+26
| | | |
* | | | Merge #5804bors[bot]2020-08-181-59/+17
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5804: Add type safety to diagnostic codes r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | | | Add type safety to diagnostic codesAleksey Kladov2020-08-181-59/+17
| | | | |
* | | | | Introduce LabelAleksey Kladov2020-08-182-9/+5
|/ / / /
* | | | MinorAleksey Kladov2020-08-183-36/+40
| | | |
* | | | Align diagnostics config with the rest of rust-analyzerAleksey Kladov2020-08-182-36/+51
| |/ / |/| |
* | | Merge #5682bors[bot]2020-08-182-10/+82
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5682: Add an option to disable diagnostics r=matklad a=popzxc As far as I know, currently it's not possible to disable a selected type of diagnostics provided by `rust-analyzer`. This causes an inconvenient situation with a false-positive warnings: you either have to disable all the diagnostics, or you have to ignore these warnings. There are some open issues related to this problem, e.g.: https://github.com/rust-analyzer/rust-analyzer/issues/5412, https://github.com/rust-analyzer/rust-analyzer/issues/5502 This PR attempts to make it possible to selectively disable some diagnostics on per-project basis. Co-authored-by: Igor Aleksanov <[email protected]>
| * | Move analysis config structure to the config.rsIgor Aleksanov2020-08-181-6/+0
| | |
| * | Make disabled diagnostics an argument of corresponding functionIgor Aleksanov2020-08-182-34/+22
| | |
| * | Merge branch 'master' into add-disable-diagnosticsIgor Aleksanov2020-08-142-9/+99
| | |
* | | Fix typo in commentDave Lage2020-08-151-1/+1
| |/ |/|
* | Rename hypothetical -> speculativeAleksey Kladov2020-08-141-1/+1
|/
* Merge #5753bors[bot]2020-08-133-59/+65
|\ | | | | | | | | | | | | | | | | | | 5753: Remove Hygiene from completion r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * Remove Hygiene from completionAleksey Kladov2020-08-133-59/+65
| |
* | display correctly 'impl Trait<T> + Trait<T>' #4814Benjamin Coenen2020-08-131-0/+19
|/ | | | Signed-off-by: Benjamin Coenen <[email protected]>
* MinorAleksey Kladov2020-08-131-6/+12
|
* Rename ra_ide -> ideAleksey Kladov2020-08-1354-0/+23586