bors[bot]
c6c88070c4
Merge #1068
...
1068: profiling crate first draft r=matklad a=pasa
I've made this first draft for #961
Could you look at it? Is this something what you are looking for?
It has lack of tests. I can't figure out how to test stderr output in rust right now. Do you have some clues?
Additionally I'm thinking about to implement procedural macros to annotate methods with this profiler. Will it be helpful?
Co-authored-by: Sergey Parilin <sergey.parilin@fxdd.com>
2019-04-03 09:09:11 +00:00
bors[bot]
fdbebccd71
Merge #1076
...
1076: Const body inference r=flodiebold a=Lapz
This is the second part of #887 . I've added type inference on const bodies and introduced the DefWithBody containing Function, Const and Static. I want to add tests but im unsure on how I would go about testing that completions work.
Co-authored-by: Lenard Pratt <l3np27@gmail.com>
2019-04-02 19:01:54 +00:00
Lenard Pratt
b9d2c2c21f
made ExprCollector pub(crate) and moved
...
collect_fn_body_syntax
2019-04-02 19:22:06 +01:00
Lenard Pratt
88e22e9d70
Added const bodies and static body to the ast
...
and added inference the inference test
reduce code duplication
2019-04-02 19:21:36 +01:00
Aleksey Kladov
0de89f786f
always produce source for import
2019-04-02 17:58:04 +03:00
Sergey Parilin
b74449e995
Merge remote-tracking branch 'upstream/master' into issue961_profiling
2019-04-02 17:55:14 +03:00
Sergey Parilin
9b73f80959
PR issuse resolved
2019-04-02 17:52:04 +03:00
Aleksey Kladov
49f13d3a9b
fix a panic with glob-import missing a source map
2019-04-02 13:26:09 +03:00
Aleksey Kladov
0e1e40676a
rename flavor to kind
2019-04-02 12:53:44 +03:00
Aleksey Kladov
f3a82c372c
remove flavor
2019-04-02 12:25:24 +03:00
gfreezy
4ca51cfbcf
intelligently add parens when inlining local varaibles
2019-04-01 22:53:47 +08:00
Aleksey Kladov
9e213385c9
switch to new rowan
2019-04-01 12:06:24 +03:00
Lenard Pratt
7f3bf7cc73
Added defWithBody
2019-03-30 10:50:00 +00:00
Aleksey Kladov
a3fee2bda0
more realistic test for incrementality
2019-03-26 19:54:52 +03:00
Aleksey Kladov
1325a31e34
reduce visibility
2019-03-26 19:15:39 +03:00
Aleksey Kladov
e28db444df
rename
2019-03-26 19:11:01 +03:00
Aleksey Kladov
b17217b34a
simplify
2019-03-26 18:57:57 +03:00
Aleksey Kladov
cffa3f960e
make stuff private
2019-03-26 18:47:52 +03:00
Aleksey Kladov
8f32477312
more type safety
2019-03-26 18:27:22 +03:00
Aleksey Kladov
071a19537d
strongy-typed ids for macros
2019-03-26 18:03:17 +03:00
Aleksey Kladov
fb8b354dcc
add typed ids
2019-03-26 17:25:14 +03:00
Aleksey Kladov
6e5562224e
remove some dead code
2019-03-26 16:47:52 +03:00
Aleksey Kladov
f6f2d69bb8
simplify
2019-03-26 14:54:05 +03:00
Aleksey Kladov
0b820cacab
move source_id to a separate file
2019-03-26 14:42:28 +03:00
Aleksey Kladov
e231277ab2
make macro parsing a query
2019-03-26 14:13:17 +03:00
Aleksey Kladov
e4646ce0d5
reduce visibility
2019-03-26 13:53:50 +03:00
Aleksey Kladov
5270bca5f7
store macro def inside macro id
...
This solves the problem of "macro expansion can't call into name
resolution, because name resolution calls back into macro expansion"
Because we store macro def as a part of call id, macro expansion just
knows the def!
2019-03-26 13:20:54 +03:00
Florian Diebold
99711c1863
Clean up comments / use nicer Iterator methods
2019-03-25 21:28:36 +01:00
Florian Diebold
0f7e4a7d24
Implement a very naive implements check
...
... to make the infer_trait_method_simple test have the correct result.
2019-03-25 21:28:36 +01:00
Florian Diebold
c947c15ce1
Basics for trait method resolution
2019-03-25 21:28:36 +01:00
Aleksey Kladov
309716cffe
move tests to where they belong
2019-03-25 14:29:24 +03:00
Aleksey Kladov
5ce84f3cbc
tweak diagnostics API
2019-03-25 10:52:50 +03:00
Aleksey Kladov
4c4a714328
test diagnostics
2019-03-25 10:52:50 +03:00
Aleksey Kladov
c7ffd939f6
more enterprisey diagnostics setup
2019-03-25 10:52:50 +03:00
Aleksey Kladov
7ee2887d1e
fixes
2019-03-25 10:52:50 +03:00
Aleksey Kladov
45fbab2b1a
check impls as well
2019-03-25 10:52:50 +03:00
Aleksey Kladov
79df62bc74
cleanup
2019-03-25 10:52:50 +03:00
Aleksey Kladov
3fb88e95aa
switch modules to new diagnostics
2019-03-25 10:52:50 +03:00
Aleksey Kladov
fcca35969d
allow dyn diagnostics
2019-03-25 10:52:12 +03:00
Aleksey Kladov
7e8f17188e
diagnostics
2019-03-25 10:52:12 +03:00
Marco Groppo
67055c47da
Target only the actual operator.
...
Renamed `BinExpr::op()` and `PrefixExpr::op()` to `op_kind`.
Now `op()` returns the `SyntaxNode`.
2019-03-24 22:21:22 +01:00
Florian Diebold
dbfc68cea0
Fix apply_substs assertion failure
...
Fixes #1030 .
2019-03-23 18:03:09 +01:00
Aleksey Kladov
46a21b07e6
remove obsolete diagnostic
2019-03-23 16:31:11 +03:00
Aleksey Kladov
3f0cf6ebe1
rename persistent hir database -> def database
2019-03-23 15:44:24 +03:00
Aleksey Kladov
4fd8cfd6ad
replace todo with fixme
2019-03-23 11:07:09 +03:00
yanchith
504c8c7c2e
Refactor primitive types into more orthogonal representation
2019-03-22 10:09:35 +01:00
Florian Diebold
1ee779d1f7
Assert in apply_substs that the number of parameters doesn't change
...
... and fix a small bug revealed by that.
2019-03-21 22:39:31 +01:00
Florian Diebold
cbb418ebb8
Rename name field to ctor as well
2019-03-21 22:29:12 +01:00
Florian Diebold
97be0e6c46
Some more doc comments
2019-03-21 22:23:52 +01:00
Florian Diebold
f10f5a81b3
TypeName => TypeCtor
2019-03-21 22:20:03 +01:00