Lukas Wirth
774a8cf08b
Fix inline_call breaking RecordExprField shorthands
2021-09-28 19:22:32 +02:00
Lukas Wirth
b6ed91a6de
Rename *Owner
traits to Has*
2021-09-27 12:54:24 +02:00
Aleksey Kladov
2bf81922f7
internal: more reasonable grammar for blocks
...
Consider these expples
{ 92 }
async { 92 }
'a: { 92 }
#[a] { 92 }
Previously the tree for them were
BLOCK_EXPR
{ ... }
EFFECT_EXPR
async
BLOCK_EXPR
{ ... }
EFFECT_EXPR
'a:
BLOCK_EXPR
{ ... }
BLOCK_EXPR
#[a]
{ ... }
As you see, it gets progressively worse :) The last two items are
especially odd. The last one even violates the balanced curleys
invariant we have (#10357 ) The new approach is to say that the stuff in
`{}` is stmt_list, and the block is stmt_list + optional modifiers
BLOCK_EXPR
STMT_LIST
{ ... }
BLOCK_EXPR
async
STMT_LIST
{ ... }
BLOCK_EXPR
'a:
STMT_LIST
{ ... }
BLOCK_EXPR
#[a]
STMT_LIST
{ ... }
2021-09-26 19:16:09 +03:00
bors[bot]
c51a3c78cf
Merge #10358
...
10358: internal: Remove inherent methods from ast nodes that do non-syntactic complex tasks r=Veykril a=Veykril
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-09-26 14:49:25 +00:00
Lukas Wirth
151afdfe5c
Remove inherent methods from ast node that carry semantic meaning
2021-09-26 16:49:03 +02:00
Lukas Wirth
215a077ee4
Remove imports when inlining all calls in a file
2021-09-26 16:01:54 +02:00
Lukas Wirth
1a50f904ef
Reject recursive calls in inline_call
2021-09-26 14:55:03 +02:00
Lukas Wirth
42eb4efb5b
Cleanup
2021-09-23 16:28:03 +02:00
hamidreza kalbasi
589c1dfa04
move function to defs.rs
2021-09-22 18:35:54 +03:30
Aleksey Kladov
73b0f9dc04
internal: remove dead code
2021-09-15 21:22:06 +03:00
Lukas Wirth
6f9de71402
fix: Use original definition ranges for ide_db::search instead of the expanded ranges
2021-09-14 02:49:06 +02:00
toyboot4e
89e46b40c3
Minor: replace old name CrateDefMap
2021-09-05 19:22:34 +09:00
Lukas Wirth
e2ede38d47
Use correct search scopes for macros
2021-09-02 17:30:55 +02:00
Jonas Schievink
bdba35cc93
fix: multi-token mapping aware find references
2021-09-01 19:19:16 +02:00
Lukas Wirth
68bf359363
fix: make goto_implementation
multi-token mapping aware
2021-09-01 14:51:37 +02:00
Dezhi Wu
ba0947dded
switch log
crate to tracing
2021-08-30 15:11:42 +08:00
Aleksey Kladov
78365c64c8
internal: slightly improve compile times
...
As per style guide, avoid monomorphisations
2021-08-29 12:53:56 +03:00
Lukas Wirth
99f1e66997
Only report unique text ranges in highlight_related
2021-08-29 01:11:29 +02:00
Lukas Wirth
72bfbb0691
Return all usages inside macros in usage searches
2021-08-29 00:49:57 +02:00
Lukas Wirth
512135920d
Highlight all related tokens in macro inputs
2021-08-29 00:49:57 +02:00
Jonas Schievink
002ef7d50a
Use ManuallyDrop
in RootDatabase
2021-08-28 23:05:40 +02:00
Lukas Wirth
c67ecbebc4
Rename fails on renaming definitions created by macros
2021-08-20 00:12:47 +02:00
Lukas Wirth
daf3094958
Emit more concise text edits in ide_db::rename
2021-08-17 15:24:01 +02:00
Lukas Wirth
995c8f50a2
some code docs for the ide_db/rename module
2021-08-16 23:06:51 +02:00
Lukas Wirth
5e533e5900
Handle all rename special cases for all record pattern fields
2021-08-16 22:48:38 +02:00
Lukas Wirth
894a09b749
Simplify
2021-08-14 18:02:51 +02:00
Aleksey Kladov
90357a9090
internal: merge hir::BinaryOp and ast::BinOp
2021-08-14 18:10:01 +03:00
Lukas Wirth
7e6eb67f0d
Substitute generic types in inline_call
2021-08-10 14:39:56 +02:00
Lukas Wirth
b7d7dd6163
Implement bool_then_to_if
assist
2021-08-10 13:17:45 +02:00
Michał Muskała
33c7c23b03
Remove unused structs in ide_db
2021-08-05 12:04:37 +01:00
Jade
e3a67ccec6
tree-wide: fix rustdoc warnings, add some links
2021-08-03 21:34:20 -07:00
Lukas Wirth
b96f1adf5c
Give TypeInfo fields and methods more appropriate names
2021-08-03 17:28:51 +02:00
Lukas Wirth
8afa2722b2
Revise TypeInfo::ty usage
2021-08-03 17:24:43 +02:00
Lukas Wirth
25ff7171c4
Introduce TypeInfo
2021-08-03 16:41:53 +02:00
Lukas Wirth
1edbaa29f9
Wrap inner tail expressions in MissingOkOrSomeInTailExpr
2021-07-31 20:00:09 +02:00
Lukas Wirth
7c7c4543da
Replace useless types
2021-07-31 14:29:15 +02:00
bors[bot]
8232804d3e
Merge #9706
...
9706: minor: perf and grammar fixes r=lnicola a=lnicola
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-07-29 16:14:10 +00:00
Lukas Wirth
2b461c50d7
Refine extraction targets of extract_function assist
2021-07-29 15:45:05 +02:00
Jonas Schievink
18f86baa62
Stop reexporting hir_def
's ItemInNs
from HIR
2021-07-28 17:39:04 +02:00
Laurențiu Nicola
636933153d
Small grammar fix
2021-07-28 12:40:21 +03:00
Lukas Wirth
456f5c6d09
Don't qualify self as crate in add_missing_impl_members assist
2021-07-27 19:29:47 +02:00
Lukas Wirth
bfe0fa009e
Resolve derive attribute input macro paths in ide layer
2021-07-24 20:35:43 +02:00
Lukas Wirth
ef6fed052c
Correctly classify Rename Names
2021-07-23 02:14:59 +02:00
bors[bot]
0bee7cb716
Merge #9453
...
9453: Add first-class limits. r=matklad,lnicola a=rbartlensky
Partially fixes #9286 .
This introduces a new `Limits` structure which is passed as an input
to `SourceDatabase`. This makes limits accessible almost everywhere in
the code, since most places have a database in scope.
One downside of this approach is that whenever you query limits, you
essentially do an `Arc::clone` which is less than ideal.
Let me know if I missed anything, or would like me to take a different approach!
Co-authored-by: Robert Bartlensky <bartlensky.robert@gmail.com>
2021-07-22 10:33:05 +00:00
Lukas Wirth
03efb50ae8
Move out fn_param tests
2021-07-21 21:39:40 +02:00
Lukas Wirth
dfdf6fd9f8
Fix some more basic clippy lints
2021-07-21 20:52:08 +02:00
Aleksey Kladov
60e7c1de83
minor: address review comments
2021-07-20 17:49:33 +03:00
Aleksey Kladov
8e0630e728
internal: remove one usage of a slow method
2021-07-20 17:02:37 +03:00
Robert Bartlensky
0b3d0cde8b
Add Limit
struct.
...
Fixes #9286 .
2021-07-19 13:26:11 +01:00
Aleksey Kladov
6f269708e8
internal: get rid of a call to slow O(N) visibility_of function
...
Instead of inferring module's declared visibility by looking at the
scope of its parent, let's just remeber the declared visibility in the
DefMap.
2021-07-12 21:13:43 +03:00