Aleksey Kladov
b1332670c7
Rename UseItem -> Use
2020-07-30 14:20:33 +02:00
Aleksey Kladov
96313283cd
Update tests
2020-07-30 12:33:05 +02:00
Aleksey Kladov
d032f872b6
Finish extern crates grammar
2020-07-30 12:31:07 +02:00
Aleksey Kladov
6cd2131caf
Rename Rename
2020-07-30 11:58:41 +02:00
Aleksey Kladov
2984da672e
Split ItemList & AssocItemList
2020-07-30 11:50:56 +02:00
Aleksey Kladov
6636f56e79
Rename ModuleItem -> Item
2020-07-30 00:23:03 +02:00
Aleksey Kladov
3d28292157
Switch to ungrammar from ast_src
...
The primary advantage of ungrammar is that it (eventually) allows one
to describe concrete syntax tree structure -- with alternatives and
specific sequence of tokens & nodes.
That should be re-usable for:
* generate `make` calls
* Rust reference
* Hypothetical parser's evented API
We loose doc comments for the time being unfortunately. I don't think
we should add support for doc comments to ungrammar -- they'll make
grammar file hard to read. We might supply docs as out-of band info,
or maybe just via a reference, but we'll think about that once things
are no longer in flux
2020-07-29 19:18:25 +02:00
Aleksey Kladov
38e38d9b29
Cleanup CFG API
2020-07-23 16:53:12 +02:00
Jonas Schievink
dce9987436
Check that visibility upgrade path is hit
2020-07-22 14:01:50 +02:00
Jonas Schievink
c07eaf868d
Support Trait as _
imports
2020-07-21 17:55:17 +02:00
Aleksey Kladov
c7ccfb072c
Simplify
2020-07-20 17:44:44 +02:00
Aleksey Kladov
19e78020bd
Remove insta for ra_hir_def
2020-07-17 15:54:40 +02:00
Aleksey Kladov
fcdac03033
Rewrite def map tests from insta to expect
...
Those indentation markers are annoying...
2020-07-17 14:37:51 +02:00
Aleksey Kladov
ff0312fa32
Semantical call info
2020-07-16 18:03:04 +02:00
Florian Diebold
2077004463
Remove TypeCtor interning
...
Our TypeCtor and Chalk's TypeName match now!
2020-07-15 22:07:13 +02:00
Aleksey Kladov
4c08fc9be3
Cleanup limits
2020-07-15 15:53:33 +02:00
Aleksey Kladov
8baa2b727d
Check cancellation when updating imports recursively
...
For winapi, this takes a lot of CPU time without doing queries and
causes the main event loop to stall on cancellation.
2020-07-15 15:49:20 +02:00
Aleksey Kladov
760ee8173c
Micro-optimize update
2020-07-15 15:45:34 +02:00
Jonas Schievink
05a9f377ec
Update ItemTree snapshots
2020-07-14 20:27:48 +02:00
Jonas Schievink
a09d483802
Thread varargs through r-a
2020-07-14 20:27:47 +02:00
Jonas Schievink
a4a8406c44
ItemTree: Lower tuple types despite invalid type
2020-07-14 19:57:41 +02:00
Aleksey Kladov
d47834ee1b
Guard against infinite macro expansions
...
closes #4463
2020-07-14 18:31:48 +02:00
Yuki Okushi
6f423466d1
Add a license field to all the crates
2020-07-14 10:57:26 +09:00
Aleksey Kladov
693ac892f2
Don't copy-paste impl_froms
into every crate
2020-07-13 16:21:02 +02:00
Aleksey Kladov
b20a6b582b
Rewrite item_tree tests to expect
...
insta review wouldn't update the test, so ...
2020-07-11 22:11:31 +02:00
Aleksey Kladov
66e2266d04
Extern fns are implicitly unsafe
...
closes #4865
2020-07-11 21:53:32 +02:00
Aleksey Kladov
b4443b0398
Bump macro recursion limit in release
2020-07-11 20:01:56 +02:00
Aleksey Kladov
a8891ae3ca
More tight recursion limit when expanding macros in function bodies
...
cc #4944
cc #5317
This doesn't fully close #4944 -- looks like we hit SO in syntax
highlighting, when we use `Semantics::expand_macro`.
Seems like we need to place expansion limit on the macro itself (store
it as a part of MacroCallId?)!
2020-07-11 18:39:49 +02:00
Aleksey Kladov
b85042601d
Goto type definition works for self
2020-07-10 14:08:35 +02:00
Aleksey Kladov
4399eff2d0
Re-enable IDE features for incomplete impl blocs
2020-07-09 12:14:26 +02:00
Aleksey Kladov
dab7f3d2c6
Remove relative_path dependency
2020-07-08 19:32:36 +02:00
Aleksey Kladov
4bbc385277
Switch to fully dynamically dispatched salsa
...
This improves compile times quite a bit
2020-07-07 10:14:48 +02:00
Jonas Schievink
6ee73cd334
Use SmolStr
2020-07-02 15:42:37 +02:00
Jonas Schievink
361b399b6d
Fix tests
2020-07-02 13:34:08 +02:00
Jonas Schievink
31f5b48817
Record and suggest trait items via ImportMap
2020-07-02 12:43:52 +02:00
Jonas Schievink
4ef1d533bd
ItemTree: Lower fields despite invalid type
2020-07-01 19:24:39 +02:00
Jonas Schievink
7c9b3d154c
Remove entries_without_primitives
2020-06-30 14:06:23 +02:00
Jonas Schievink
a80e8fea85
Simplify entry API usage
2020-06-30 13:54:40 +02:00
Jonas Schievink
56fb8a401a
Reorder imports
2020-06-30 13:25:15 +02:00
Jonas Schievink
0fcbc716fd
Split namespace maps in ItemScope
...
Reduces memory usage of the CrateDefMap query by ~130 MB on r-a.
2020-06-30 13:23:42 +02:00
Paul Daniel Faria
28bb8ed9cb
Cleanup changes leftover from previous tracking attempt
2020-06-27 10:16:19 -04:00
Paul Daniel Faria
2fc92fa28c
Remove track_parent and parent_map, replace with simple walk in missign unsafe validator
2020-06-27 10:13:14 -04:00
Paul Daniel Faria
f78df42f81
Fix issues caused during rebase
2020-06-27 10:13:14 -04:00
Paul Daniel Faria
2608a6fd3a
unsafe: Clean up, improve tracking, add debug_assert
...
Move unsafe_expressions to unsafe_validation.rs, replace vec tracking of
child exprs with inline macro, add debug assert to ensure tracked
children match walked children exactly
2020-06-27 10:13:14 -04:00
Paul Daniel Faria
7f2219dc76
Track expr parents during lowering, use parent map when checking if unsafe exprs are within unsafe blocks
2020-06-27 10:10:26 -04:00
Paul Daniel Faria
b9569886a9
Rename Expr::UnsafeBlock to Expr::Unsafe
2020-06-27 10:10:26 -04:00
Paul Daniel Faria
278cbf12cd
Track unsafe blocks, don't trigger missing unsafe diagnostic when unsafe exprs within unsafe block
2020-06-27 10:10:26 -04:00
bors[bot]
656cbc68a1
Merge #5033
...
5033: Order of glob imports should not affect import shadowing r=Nashenas88 a=Nashenas88
Fixes #5032
Co-authored-by: Paul Daniel Faria <Nashenas88@users.noreply.github.com>
2020-06-27 02:51:54 +00:00
Paul Daniel Faria
1f5d30ff16
Replace simple is_named with matches macro
2020-06-26 22:51:13 -04:00
Jonas Schievink
efe378d2b4
Make find_inner_item fallible
...
The ItemTree does not collect incomplete items, such as traits with no
name, so the (malformed) AST node might have no corresponding item.
2020-06-26 18:07:31 +02:00