Paul Daniel Faria
0b657ddbfe
Revert resolution of all glob imports first, replace with tracking of glob imports and shadowing when more specific
2020-06-25 09:27:00 -04:00
Paul Daniel Faria
70d4829560
Order of glob imports should not affect import shadowing
2020-06-25 09:23:34 -04:00
Jonas Schievink
43cad21623
Don't allocate common visibilities
2020-06-24 16:54:20 +02:00
Jonas Schievink
4b03b39d5b
draw the rest of the owl
2020-06-24 16:53:16 +02:00
Jonas Schievink
864b650f92
ItemTree: use a newtyped ID
2020-06-24 16:53:16 +02:00
Jonas Schievink
f9e5ba7d40
Remove now-broken incremental test
...
The ItemTree tracks impl and trait items, so the CrateDefMap now needs
recomputing when those change
2020-06-24 16:53:16 +02:00
Jonas Schievink
0e2602f75e
Remove raw item query
2020-06-24 16:53:16 +02:00
Jonas Schievink
7054e89d18
Fix test
2020-06-24 16:53:16 +02:00
Jonas Schievink
9d24412929
Move collector
2020-06-24 16:53:14 +02:00
Jonas Schievink
e24de2007f
collector changes WIP
2020-06-24 16:52:37 +02:00
Paul Daniel Faria
43c6f6c039
Fix formatting issue with glob shadow test
2020-06-24 08:50:59 -04:00
Paul Daniel Faria
dfd79907b8
Use a macro in push_res to simplify code, simplify glob_shadowed_def assertion
2020-06-24 08:20:41 -04:00
Paul Daniel Faria
38af81f183
Account for updated module ids when determining whether a resolution is "changed"
2020-06-23 22:10:01 -04:00
Aleksey Kladov
6996ec860b
Drop rarely used fixture functionality
2020-06-23 18:37:26 +02:00
Aleksey Kladov
dad1333b48
New VFS
2020-06-23 17:51:06 +02:00
Florian Diebold
584bddef0c
Don't panic on crates depending on themselves
...
Fixes #3883 .
2020-06-19 18:38:03 +02:00
Aleksey Kladov
42be05a335
Simplify
2020-06-18 16:02:45 +02:00
Aleksey Kladov
3c72fc0573
Anchor file-system operations to the file, and not to the source root.
...
Anchoring to the SourceRoot wont' work if the path is absolute:
#[path = "/tmp/foo.rs"]
mod foo;
Anchoring to a file will.
However, we *should* anchor, instead of just producing an abs path.
I can imagine a situation where, for example, rust-analyzer processes
crates from different machines (or, for example, from in-memory git
branch), where the same absolute path in different crates might refer
to different files in the end!
2020-06-16 18:45:58 +02:00
Aleksey Kladov
fac7b0e252
Don't guess macro expansion crate
2020-06-11 12:13:14 +02:00
Aleksey Kladov
bba374bab2
More direct signature for resolve_path
2020-06-05 15:07:30 +02:00
Aleksey Kladov
e63c00f100
Rename resolve_relative_path -> resolve_path
...
For things like `concant!(env!("OUT_DIR"))`, we need to support abs paths
2020-06-05 14:58:30 +02:00
kjeremy
bee4f8f9fe
Pass trivially copy types as copy
2020-05-26 14:12:13 -04:00
Aleksey Kladov
ecac5d7de2
Switch to new magic marks
2020-05-20 13:02:53 +02:00
Edwin Cheng
cf821cc332
Change union resolve types only
2020-05-05 01:19:54 +08:00
Edwin Cheng
e921195d93
Change favor_types to has_constructor
2020-05-05 01:15:27 +08:00
Edwin Cheng
af001677d1
Fix test
2020-05-05 00:17:30 +08:00
Edwin Cheng
8d96db3417
Favor types for Record in name resolution
2020-05-05 00:17:22 +08:00
Edwin Cheng
291d03949b
Add test in name resolutions
2020-05-02 10:06:17 +08:00
Edwin Cheng
7bbdeb43a4
Make AttrQuery copyable
2020-05-01 20:58:24 +08:00
Edwin Cheng
e4267967a8
Support local_inner_macros
2020-05-01 11:23:03 +08:00
Jonas Schievink
5cc9546ca0
Record definitions in extern
blocks
2020-04-23 23:36:23 +02:00
Aleksey Kladov
f980b07529
Make incremental nameres test harder
2020-04-11 17:54:46 +02:00
Aleksey Kladov
38c67e5c0d
Avoid cyclic queries in name resolution when processing enums
2020-04-11 17:52:26 +02:00
Aleksey Kladov
55356332bf
Remove code duplication
2020-04-11 17:18:42 +02:00
Aleksey Kladov
c8b4c36f81
Semicolon token
2020-04-10 16:10:28 +02:00
Aleksey Kladov
2bfb65db93
Be consistent about token accesors
2020-04-09 18:48:13 +02:00
Luca Barbieri
60f4d7bd8c
Provide more complete AST accessors to support usage in rustc
2020-04-09 11:50:37 +02:00
bors[bot]
b1594f1080
Merge #3727
...
3727: Introduce ra_proc_macro r=matklad a=edwin0cheng
This PR implemented:
1. Reading dylib path of proc-macro crate from cargo check , similar to how `OUTDIR` is obtained.
2. Added a new crate `ra_proc_macro` and implement the foot-work for reading result from external proc-macro expander.
3. Added a struct `ProcMacroClient` , which will be responsible to the client side communication to the External process.
Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2020-03-26 17:09:32 +00:00
Edwin Cheng
db162df264
Remove deps on tt_mbe
2020-03-27 00:46:40 +08:00
Aleksey Kladov
db34abeb85
Get rid of ItemOrMacro
2020-03-26 16:10:01 +01:00
Aleksey Kladov
b7aaefb5a4
Minor incremental tests cleanup
2020-03-26 15:44:31 +01:00
Edwin Cheng
d0b6ed4441
Add ProcMacroClient
2020-03-26 03:29:45 +08:00
Edwin Cheng
2adc9a8d5f
Remove collect proc_macro definitions
2020-03-25 20:14:22 +08:00
Edwin Cheng
8afb445357
Rename to CustomDerive
2020-03-25 19:50:12 +08:00
Edwin Cheng
34dc8d25c1
Add basic custom derive lowering
2020-03-25 19:50:12 +08:00
Aleksey Kladov
f840fcb2f5
Simplify Arena to use a generic index
2020-03-19 18:46:30 +01:00
Aleksey Kladov
de7662c852
Check that no file contains trailing ws
...
rustfmt allows trailing spaces in string literals unfortunately.
2020-03-17 11:42:54 +01:00
Aleksey Kladov
9faea2364d
Use dyn Trait
for working with databse
...
It improves compile time in `--release` mode quite a bit, it doesn't
really slow things down and, conceptually, it seems closer to what we
want the physical architecture to look like (we don't want to
monomorphise EVERYTHING in a single leaf crate).
2020-03-16 17:42:30 +01:00
Florian Diebold
89eb9e8002
Protect against infinite macro expansion in def collector
...
There was a test for this, but it wasn't actually working because the first
recursive expansion failed. (The comma...)
Even with this limit, that test (when fixed) still takes some time to pass
because of the exponential growth of the expansions, so I disabled it and added
a different one without growth.
2020-03-13 14:50:03 +01:00
Josh Mcguigan
7208498d54
fix issue 3444
2020-03-12 17:16:28 -07:00