Commit Graph

5796 Commits

Author SHA1 Message Date
bors[bot]
4f0d4c65a5
Merge #2286
2286: Alias for less verbose tests r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-11-17 15:35:36 +00:00
Aleksey Kladov
7e2f4b30db Disable doctests 2019-11-17 18:35:05 +03:00
Aleksey Kladov
52389657c5 Alias for less verbose tests 2019-11-17 18:26:52 +03:00
bors[bot]
2d32e6ba30
Merge #2285
2285: Don't store shift redundantly r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-11-17 15:25:39 +00:00
Aleksey Kladov
6a70bff451 Don't store shift redundantly 2019-11-17 18:22:34 +03:00
bors[bot]
b72abed4eb
Merge #2283
2283: Fix #2275 r=matklad a=edwin0cheng

Fix #2275 

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2019-11-17 09:35:52 +00:00
Edwin Cheng
977cf381ce Add bound check 2019-11-17 13:18:42 +08:00
bors[bot]
d0357fc3b2
Merge #2280
2280: Add ast for plain and raw string literals r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-11-16 19:51:25 +00:00
Aleksey Kladov
5b54a93fe7 Add ast for plain and raw string literals 2019-11-16 22:50:41 +03:00
bors[bot]
c27fb3a0ca
Merge #2279
2279: Better factoring of macro expansion machinery in goto def r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-11-16 19:18:46 +00:00
Aleksey Kladov
42604c673d Better factoring of macro expansion machinery in goto def 2019-11-16 22:18:07 +03:00
bors[bot]
1adc352587
Merge #2273
2273: goto in macro calls r=matklad a=matklad

![goto](https://user-images.githubusercontent.com/1711539/68984944-2a50ba80-0824-11ea-896c-c0ea8edcd0d6.gif)

This builds on the awesome infrastructure created by @edwin0cheng 

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-11-16 14:07:44 +00:00
Aleksey Kladov
2eaa8c94a8 Goto definition works inside macros 2019-11-16 17:00:54 +03:00
bors[bot]
786cae520a
Merge #2276
2276: Source-ify name_definition r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-11-16 13:50:34 +00:00
bors[bot]
5d9bce6e88
Merge #2274
2274: Chalk upgrade & dyn/impl support r=matklad a=flodiebold

 - upgrade Chalk, which is a bit more involved than usual this time -- associated type values (in impls) are now a separate entity in Chalk, so we have to intern separate IDs for them...
 - use Chalk's dyn/impl Trait support
 - fix our handling of binders/bound variables -- before, we didn't use them for anything except Chalk queries, but now that we use them in dyn/impl Trait types and pass that to Chalk, we have to be a bit more careful

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2019-11-16 13:17:20 +00:00
bors[bot]
7ad4461081
Merge #2263
2263: Handle `cargo watch` errors caused by `cargo-watch` itself r=matklad a=oxalica

Currently, it silently fails when `cargo-watch` is installed but broken.

This PR handles missing cases and prompt the error message when failed.


Co-authored-by: oxalica <oxalicc@pm.me>
2019-11-16 12:49:20 +00:00
Florian Diebold
ee190388ab Upgrade Chalk again 2019-11-16 13:25:54 +01:00
Florian Diebold
351c29d859 Fix handling of the binders in dyn/impl Trait
We need to be more careful now when substituting bound variables (previously, we
didn't have anything that used bound variables except Chalk, so it was not a
problem).

This is obviously quite ad-hoc; Chalk has more infrastructure for handling this
in a principled way, which we maybe should adopt.
2019-11-16 13:25:54 +01:00
Florian Diebold
9c2a9a9a06 Use Chalk's dyn/impl trait support 2019-11-16 13:11:29 +01:00
Florian Diebold
e21b82e035 Upgrade Chalk
Associated type values (in impls) are now a separate entity in Chalk, so we have
to intern separate IDs for them.
2019-11-16 13:11:29 +01:00
oxalica
b4fae56a25
Fix format 2019-11-16 18:52:47 +08:00
Aleksey Kladov
3b7cf9226d Source-ify name_definition 2019-11-16 13:50:04 +03:00
Aleksey Kladov
272af56a5c Sourcify classify_name_ref 2019-11-16 13:33:25 +03:00
bors[bot]
d9d99369b2
Merge #2271
2271: Force passing Source when creating a SourceAnalyzer r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-11-15 23:12:59 +00:00
Aleksey Kladov
d898ecb8f2 Force passing Source when creating a SourceAnalyzer 2019-11-16 02:12:35 +03:00
bors[bot]
69f3b01dc5
Merge #2268
2268: Handle ast::MacroCall in classify_name and impl FromSource for MacroDef r=matklad a=kjeremy

Fixes #2260

Co-authored-by: kjeremy <kjeremy@gmail.com>
2019-11-15 22:36:10 +00:00
Aleksey Kladov
1c819fc8f6 Prepare SourceAnalyzer for macros 2019-11-16 01:31:40 +03:00
bors[bot]
ad10c4b8e2
Merge #2270
2270: Reduce some duplication r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-11-15 22:15:30 +00:00
Aleksey Kladov
f36ac059f3 Reduce some duplication 2019-11-16 01:14:56 +03:00
kjeremy
06984ed116 Add a test that uses classify_name 2019-11-15 17:13:52 -05:00
Aleksey Kladov
892671926b Remove wrong clone 2019-11-16 01:00:00 +03:00
bors[bot]
d843455de2
Merge #2269
2269: Prepare SourceAnalyzer for macros r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-11-15 21:57:48 +00:00
kjeremy
60fd260e7f Handle ast::MacroCall in classify_name and impl FromSource for MacroDef
Fixes #2260
2019-11-15 16:47:58 -05:00
Aleksey Kladov
0404e647e6 Prepare SourceAnalyzer for macros 2019-11-16 00:40:54 +03:00
Aleksey Kladov
bd8af6a413 Sourcify some more 2019-11-16 00:05:10 +03:00
bors[bot]
920848940a
Merge #2266
2266: Sourcify some things r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-11-15 20:25:53 +00:00
Aleksey Kladov
4c90b7e2ec Sourcify some things
If we want to support macros properly, we need to get rid of those
FileIds everywhere...
2019-11-15 23:24:56 +03:00
bors[bot]
86469d4195
Merge #2252
2252: Fix parsing of "postfix" range expressions. r=matklad a=goffrie

Right now they are handled in `postfix_dot_expr`, but that doesn't allow it to
correctly handle precedence. Integrate it more tightly with the Pratt parser
instead.

Also includes a drive-by fix for parsing `match .. {}`.

Fixes #2242.

Co-authored-by: Geoffry Song <goffrie@gmail.com>
2019-11-15 20:15:29 +00:00
bors[bot]
9c3e35df33
Merge #2265
2265: Fix add-new assist r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-11-15 20:05:48 +00:00
Geoffry Song
5645c153e0 Attempt to implement typed accessors 2019-11-15 12:05:29 -08:00
Aleksey Kladov
20186cdf89 Fix add-new assist 2019-11-15 22:57:19 +03:00
oxalica
4c175fbe8a
Check exit code of cargo watch 2019-11-16 03:44:38 +08:00
bors[bot]
1889b3c7b5
Merge #2264
2264: move impls to hir-def r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-11-15 19:11:51 +00:00
oxalica
503920532d
Handle errors when cargo watch fails 2019-11-16 02:49:44 +08:00
Aleksey Kladov
b21829f7ed Remove old impls infrastructure 2019-11-15 21:35:03 +03:00
Aleksey Kladov
ea3540c1a8 Store impls in CrateDefMap 2019-11-15 21:19:32 +03:00
Aleksey Kladov
080dd31f84 Add ImplId 2019-11-15 21:19:32 +03:00
Aleksey Kladov
aeb5e061a8 Reduce visibility 2019-11-15 21:19:32 +03:00
bors[bot]
0516a32ed0
Merge #2262
2262: Speedup builds for users r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-11-15 18:19:16 +00:00
Aleksey Kladov
b8b81846ca Speedup builds for users 2019-11-15 21:18:44 +03:00