Commit graph

840 commits

Author SHA1 Message Date
Unreal Hoang
f7cd40d830
add projection to infer for loop variable 2019-07-07 22:26:51 +09:00
Florian Diebold
f854a29c9a Make EnumVariant a GenericDef and simplify some code 2019-07-06 17:43:13 +02:00
Florian Diebold
065d398701 Add trait obligations for where clauses when calling functions/methods
E.g. if we call `foo<T: Into<u32>>(x)`, that adds an obligation that `x:
Into<u32>`, etc.
2019-07-06 17:34:05 +02:00
bors[bot]
a9dcd2cdca Merge #1495
1495: use correct file for diagnostics r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-07-05 16:43:23 +00:00
Aleksey Kladov
0b5e399190 use correct file for diagnostics
closes #1475
2019-07-05 19:40:02 +03:00
bors[bot]
3775e5e27d Merge #1494
1494: properly restrict diagnostics to a single file r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-07-05 16:30:38 +00:00
Aleksey Kladov
fd30ec406b properly restrict diagnostics to a single file 2019-07-05 19:27:20 +03:00
Jeremy Kolb
001e34e6e3 Clippy trivially_copy_pass_by_ref 2019-07-05 12:02:32 -04:00
bors[bot]
ec6f71576a Merge #1491
1491: More clippy r=matklad a=kjeremy

A few more clippy changes.

I'm a little unsure of the second commit. It's the trivially_copy_pass_by_ref lint and there are a number of places in the code we could use it if it makes sense.

Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
2019-07-05 14:19:12 +00:00
Shotaro Yamada
d0e9cd2bc6 Fix clippy::redundant_clone 2019-07-05 12:45:58 +09:00
Jeremy Kolb
1a950cdbcf &self -> self
https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref
2019-07-04 23:01:40 -04:00
Jeremy Kolb
6b4ec73b7e Clippy changes 2019-07-04 23:00:00 -04:00
Jeremy Kolb
4ad9e986ad Some clippy fixes for 1.36 2019-07-04 17:43:00 -04:00
bors[bot]
cacdb0eab8 Merge #1486
1486: allow rustfmt to reorder imports r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-07-04 20:09:32 +00:00
Aleksey Kladov
1834bae5b8 allow rustfmt to reorder imports
This wasn't a right decision in the first place, the feature flag was
broken in the last rustfmt release, and syntax highlighting of imports
is more important anyway
2019-07-04 23:09:09 +03:00
Alexander Andreev
6263aa13d0 Fixed request changes 2019-07-03 22:17:43 +03:00
Alexander Andreev
02e9e46ed6 Move resolve raw name in name.rs
Added test for check module resolution with raw name
2019-07-03 22:01:41 +03:00
Alexander Andreev
018bf3d7b1 Added resolve submodules with raw name
#1211
2019-07-03 17:37:56 +03:00
Shotaro Yamada
546442df68 Add completion for type aliases 2019-07-03 03:08:39 +09:00
Aleksey Kladov
e7164e6aeb put source maps first for better stats 2019-06-30 16:35:40 +03:00
Aleksey Kladov
d70520eb38 print memory usage for queries 2019-06-30 14:49:45 +03:00
Florian Diebold
d37f960dfa Complete associated methods on enums (and unions) as well 2019-06-29 12:40:01 +02:00
Aleksey Kladov
6e2369938a make sure that CrateDefMap is independent from syntax 2019-06-26 21:50:42 +03:00
Aleksey Kladov
a198d78bd1 cache chalk queries
This gives a significant speedup, because chalk will call these
functions several times even withing a single revision. The only
significant one here is `impl_data`, but I figured it might be good to
cache others just for consistency.

The results I get are:

Before:

from scratch:   16.081457952s
no change:      15.846493ms
trivial change: 352.95592ms
comment change: 361.998408ms
const change:   457.629212ms

After:

from scratch:   14.910610278s
no change:      14.934647ms
trivial change: 85.633023ms
comment change: 96.433023ms
const change:   171.543296ms

Seems like a nice win!
2019-06-26 12:54:13 +03:00
Shotaro Yamada
9668737d05 Add comment 2019-06-25 20:57:42 +09:00
Shotaro Yamada
9e7a6bd66e Method resolution for slices 2019-06-25 02:17:44 +09:00
kjeremy
f8f136e990 Bump cargo_metadata, ena, flexi_logger 2019-06-20 15:09:39 -04:00
Aleksey Kladov
bcff61257a Add firewall query to lang items
With an intermediate query, changing one module won't cause reparsing
of all modules
2019-06-19 23:46:50 +03:00
Aleksey Kladov
0caec7d250 rename XSignature -> XData 2019-06-18 20:20:08 +03:00
Florian Diebold
ad3673d8d8 Add test for autoderef infinite recursion 2019-06-16 12:25:04 +02:00
Florian Diebold
96c2b9c41d Simplifications / cleanup from review 2019-06-16 12:25:04 +02:00
Florian Diebold
30647cd195 Some more cleanup 2019-06-15 18:36:58 +02:00
Florian Diebold
94a6aff9f8 Check that Deref has the right number of parameters 2019-06-15 18:33:30 +02:00
Florian Diebold
3e78a6e3e0 Somewhat handle variables in the derefed type, and add another test 2019-06-15 18:21:23 +02:00
Florian Diebold
ca5ed2307c Implement * operation using Deref trait 2019-06-15 18:21:23 +02:00
Florian Diebold
9c5e7dd849 Implement autoderef using the Deref trait
- add support for other lang item targets, since we need the Deref lang item
2019-06-15 18:21:23 +02:00
Florian Diebold
49489dc20c Add basic infrastructure for assoc type projection 2019-06-15 18:21:23 +02:00
Florian Diebold
6f946f9656 Add test for Deref 2019-06-15 18:21:23 +02:00
Aleksey Kladov
b8cae2cf8f check for cancellation when executing queries
Note that we can't just remove CheckCanceled trait altogether:
sometimes it's useful to check for cancellation while the query is
running! We do this, for example, in the name resolution fixed-point
loop.
2019-06-12 18:47:55 +03:00
Aleksey Kladov
ff6f6b3a52 move docs under code model 2019-06-11 18:28:51 +03:00
Aleksey Kladov
f6c227babd fix compilation 2019-06-11 18:28:51 +03:00
Aleksey Kladov
14b1f87634 minor formatting 2019-06-11 18:28:51 +03:00
Aleksey Kladov
26753f0e49 remove unneded From(..) impl 2019-06-11 18:28:51 +03:00
Aleksey Kladov
0dcaded439 move source to a seaparate file 2019-06-11 18:28:51 +03:00
Aleksey Kladov
c4512fadb1 remove inherent source impls 2019-06-11 18:28:51 +03:00
Aleksey Kladov
dd63f17027 use Source for module, part 2 2019-06-11 18:28:51 +03:00
Aleksey Kladov
0145d06515 use Source for module, part 1 2019-06-11 18:28:51 +03:00
Aleksey Kladov
178d8e96b5 use Source for StructField 2019-06-11 18:28:51 +03:00
Aleksey Kladov
8b94b429e5 use Source for MacroDef 2019-06-11 18:28:51 +03:00
Aleksey Kladov
a6e339e822 use Source for impl block 2019-06-11 18:28:51 +03:00