]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoMerge #2291
bors[bot] [Tue, 19 Nov 2019 17:53:27 +0000 (17:53 +0000)]
Merge #2291

2291: Show expanded macro in vscode r=matklad a=edwin0cheng

*Edited*

![new_screen_shot](https://user-images.githubusercontent.com/11014119/69169852-00550c00-0b34-11ea-9c40-8ecebdca0621.gif)

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
4 years agoMinor fix for outpu text formating
Edwin Cheng [Tue, 19 Nov 2019 17:22:28 +0000 (01:22 +0800)]
Minor fix for outpu text formating

4 years agoAdd shot doc for expand_macro module
Edwin Cheng [Tue, 19 Nov 2019 17:12:56 +0000 (01:12 +0800)]
Add shot doc for expand_macro module

4 years agoAdd document in features.md
Edwin Cheng [Tue, 19 Nov 2019 17:09:15 +0000 (01:09 +0800)]
Add document in features.md

4 years agoUse DocumentProvider instead of Hover
Edwin Cheng [Tue, 19 Nov 2019 17:06:10 +0000 (01:06 +0800)]
Use DocumentProvider instead of Hover

4 years agoImprove insert_whitespaces
Edwin Cheng [Tue, 19 Nov 2019 16:12:48 +0000 (00:12 +0800)]
Improve insert_whitespaces

4 years agoChange return type of expand_macro
Edwin Cheng [Tue, 19 Nov 2019 14:56:48 +0000 (22:56 +0800)]
Change return type of expand_macro

4 years agoChange to use Expansion::file_id and reordering
Edwin Cheng [Tue, 19 Nov 2019 14:56:28 +0000 (22:56 +0800)]
Change to use Expansion::file_id and reordering

4 years agoFix npm formatting
Edwin Cheng [Sun, 17 Nov 2019 19:39:11 +0000 (03:39 +0800)]
Fix npm formatting

4 years agoRebase
Edwin Cheng [Sun, 17 Nov 2019 19:35:46 +0000 (03:35 +0800)]
Rebase

4 years agoAdd recursive expand in vscode
Edwin Cheng [Sun, 17 Nov 2019 18:47:50 +0000 (02:47 +0800)]
Add recursive expand in vscode

4 years agoMerge #2312
bors[bot] [Tue, 19 Nov 2019 08:27:27 +0000 (08:27 +0000)]
Merge #2312

2312: Fixed string literal quoting r=matklad a=edwin0cheng

It fixed a bug which `quote!` should return a literal escaped instead of original string.

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
4 years agoRun CI on trying as well
Aleksey Kladov [Mon, 18 Nov 2019 16:33:55 +0000 (19:33 +0300)]
Run CI on trying as well

4 years agoFixed a bug for string lit in quote
Edwin Cheng [Fri, 15 Nov 2019 14:13:41 +0000 (22:13 +0800)]
Fixed a bug for string lit in quote

4 years agoMerge #2309
bors[bot] [Mon, 18 Nov 2019 20:04:36 +0000 (20:04 +0000)]
Merge #2309

2309: Goto type def through macros r=matklad a=kjeremy

Co-authored-by: kjeremy <kjeremy@gmail.com>
4 years agoGoto type def through macros
kjeremy [Mon, 18 Nov 2019 19:57:42 +0000 (14:57 -0500)]
Goto type def through macros

4 years agoMerge #2307
bors[bot] [Mon, 18 Nov 2019 19:57:06 +0000 (19:57 +0000)]
Merge #2307

2307: Support hover through macro r=matklad a=kjeremy

Allows hover to work through macros like `match_ast!`.

Co-authored-by: kjeremy <kjeremy@gmail.com>
4 years agoFix test
kjeremy [Mon, 18 Nov 2019 19:02:02 +0000 (14:02 -0500)]
Fix test

4 years agoMerge #2308
bors[bot] [Mon, 18 Nov 2019 18:21:44 +0000 (18:21 +0000)]
Merge #2308

2308: Remove the custom impl of AttrsOwner for ImplItem r=matklad a=DJMcNab

The default impl should have the same behaviour, and it can be generated by codegen.
See also `ModuleItem` and `NominalDef`.

Also see https://github.com/rust-analyzer/rust-analyzer/commit/5dbbfda34ae423229487595fd0ae9e727ae42906#r36011245

Co-authored-by: DJMcNab <36049421+djmcnab@users.noreply.github.com>
4 years agoRemove the custom impl of AttrsOwner for ImplItem
DJMcNab [Mon, 18 Nov 2019 18:13:56 +0000 (18:13 +0000)]
Remove the custom impl of AttrsOwner for ImplItem

The default impl should have the same behaviour, and it can be generated
by codegen.
See also `ModuleItem` and `NominalDef`

4 years agoSupport hover through macro
kjeremy [Mon, 18 Nov 2019 16:58:42 +0000 (11:58 -0500)]
Support hover through macro

4 years agoMerge #2305
bors[bot] [Mon, 18 Nov 2019 16:28:04 +0000 (16:28 +0000)]
Merge #2305

2305: Remove CI badge r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoRemove CI badge
Aleksey Kladov [Mon, 18 Nov 2019 16:27:41 +0000 (19:27 +0300)]
Remove CI badge

4 years agoMerge #2304
bors[bot] [Mon, 18 Nov 2019 15:50:47 +0000 (15:50 +0000)]
Merge #2304

2304: Use Source<&ast::Name> in classify_name r=matklad a=kjeremy

Co-authored-by: kjeremy <kjeremy@gmail.com>
4 years agoUse Source<&ast::Name> in classify_name
kjeremy [Mon, 18 Nov 2019 15:47:19 +0000 (10:47 -0500)]
Use Source<&ast::Name> in classify_name

4 years agoMerge #2302
bors[bot] [Mon, 18 Nov 2019 13:09:29 +0000 (13:09 +0000)]
Merge #2302

2302: Collapse TokenMap and RevTokenMap r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoCollapse TokenMap and RevTokenMap
Aleksey Kladov [Mon, 18 Nov 2019 13:08:41 +0000 (16:08 +0300)]
Collapse TokenMap and RevTokenMap

4 years agoMerge #2301
bors[bot] [Mon, 18 Nov 2019 12:41:59 +0000 (12:41 +0000)]
Merge #2301

2301: Don't create a separate bin for format hook r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoDon't create a separate bin for format hook
Aleksey Kladov [Mon, 18 Nov 2019 12:22:51 +0000 (15:22 +0300)]
Don't create a separate bin for format hook

4 years agoMerge #2300
bors[bot] [Mon, 18 Nov 2019 12:09:24 +0000 (12:09 +0000)]
Merge #2300

2300: Token-based reverse-mapping r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoToken-based reverse-mapping
Aleksey Kladov [Mon, 18 Nov 2019 12:08:39 +0000 (15:08 +0300)]
Token-based reverse-mapping

4 years agoMerge #2299
bors[bot] [Mon, 18 Nov 2019 11:37:46 +0000 (11:37 +0000)]
Merge #2299

2299: More sources r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoMore sources
Aleksey Kladov [Mon, 18 Nov 2019 11:36:11 +0000 (14:36 +0300)]
More sources

4 years agoMerge #2298
bors[bot] [Mon, 18 Nov 2019 11:24:35 +0000 (11:24 +0000)]
Merge #2298

2298: Add ra_ide_api::expand r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoAdd ra_ide_api::expand
Aleksey Kladov [Mon, 18 Nov 2019 11:23:24 +0000 (14:23 +0300)]
Add ra_ide_api::expand

This module should handle all tricky bits with mapping macro-expanded
HirFileId to original files the user actually can see in the editor

4 years agoMore Source
Aleksey Kladov [Mon, 18 Nov 2019 11:07:13 +0000 (14:07 +0300)]
More Source

4 years agoMerge #2296
bors[bot] [Mon, 18 Nov 2019 09:59:36 +0000 (09:59 +0000)]
Merge #2296

2296: Remove obsolete links r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agofix bors integration
Aleksey Kladov [Mon, 18 Nov 2019 09:59:09 +0000 (12:59 +0300)]
fix bors integration

4 years agoRemove obsolete links
Aleksey Kladov [Mon, 18 Nov 2019 09:45:33 +0000 (12:45 +0300)]
Remove obsolete links

4 years agoSwitch to Actions
Aleksey Kladov [Mon, 18 Nov 2019 08:13:31 +0000 (11:13 +0300)]
Switch to Actions

4 years agoRun npm travis through xvfb-run
cad97 [Sun, 17 Nov 2019 00:51:12 +0000 (19:51 -0500)]
Run npm travis through xvfb-run

4 years agoEnable github actions ci
cad97 [Sat, 16 Nov 2019 22:26:54 +0000 (17:26 -0500)]
Enable github actions ci

4 years agoMerge #2294
bors[bot] [Mon, 18 Nov 2019 07:36:27 +0000 (07:36 +0000)]
Merge #2294

2294: Publicise GenericParams r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoPublicise GenericParams
Aleksey Kladov [Mon, 18 Nov 2019 07:35:33 +0000 (10:35 +0300)]
Publicise GenericParams

See https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/Exposing.20GenericParam.2Ename

4 years agoMerge #2292
bors[bot] [Sun, 17 Nov 2019 19:25:51 +0000 (19:25 +0000)]
Merge #2292

2292: :arrow_up: rowan r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years ago:arrow_up: rowan
Aleksey Kladov [Sun, 17 Nov 2019 19:21:45 +0000 (22:21 +0300)]
:arrow_up: rowan

4 years agoMerge #2289
bors[bot] [Sun, 17 Nov 2019 17:17:21 +0000 (17:17 +0000)]
Merge #2289

2289: More correct expansion mapping r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoMore correct expansion mapping
Aleksey Kladov [Sun, 17 Nov 2019 17:15:55 +0000 (20:15 +0300)]
More correct expansion mapping

We can't really map arbitrary ranges, we only can map tokens

4 years agoMerge #2288
bors[bot] [Sun, 17 Nov 2019 16:12:28 +0000 (16:12 +0000)]
Merge #2288

2288: Make shift an implementation detail of mbe r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoMake shift an implementation detail of mbe
Aleksey Kladov [Sun, 17 Nov 2019 16:11:43 +0000 (19:11 +0300)]
Make shift an implementation detail of mbe

4 years agoMerge #2287
bors[bot] [Sun, 17 Nov 2019 15:45:30 +0000 (15:45 +0000)]
Merge #2287

2287: Disable doctests r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoMerge #2286
bors[bot] [Sun, 17 Nov 2019 15:35:36 +0000 (15:35 +0000)]
Merge #2286

2286: Alias for less verbose tests r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoDisable doctests
Aleksey Kladov [Sun, 17 Nov 2019 15:35:05 +0000 (18:35 +0300)]
Disable doctests

4 years agoAlias for less verbose tests
Aleksey Kladov [Sun, 17 Nov 2019 15:26:52 +0000 (18:26 +0300)]
Alias for less verbose tests

4 years agoMerge #2285
bors[bot] [Sun, 17 Nov 2019 15:25:39 +0000 (15:25 +0000)]
Merge #2285

2285: Don't store shift redundantly r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoDon't store shift redundantly
Aleksey Kladov [Sun, 17 Nov 2019 15:22:34 +0000 (18:22 +0300)]
Don't store shift redundantly

4 years agoMerge #2283
bors[bot] [Sun, 17 Nov 2019 09:35:52 +0000 (09:35 +0000)]
Merge #2283

2283: Fix #2275 r=matklad a=edwin0cheng

Fix #2275

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
4 years agoAdd bound check
Edwin Cheng [Sun, 17 Nov 2019 05:18:42 +0000 (13:18 +0800)]
Add bound check

4 years agoMerge #2280
bors[bot] [Sat, 16 Nov 2019 19:51:25 +0000 (19:51 +0000)]
Merge #2280

2280: Add ast for plain and raw string literals r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoAdd ast for plain and raw string literals
Aleksey Kladov [Sat, 16 Nov 2019 19:50:41 +0000 (22:50 +0300)]
Add ast for plain and raw string literals

4 years agoMerge #2279
bors[bot] [Sat, 16 Nov 2019 19:18:46 +0000 (19:18 +0000)]
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>
4 years agoBetter factoring of macro expansion machinery in goto def
Aleksey Kladov [Sat, 16 Nov 2019 19:18:07 +0000 (22:18 +0300)]
Better factoring of macro expansion machinery in goto def

4 years agoMerge #2273
bors[bot] [Sat, 16 Nov 2019 14:07:44 +0000 (14:07 +0000)]
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>
4 years agoGoto definition works inside macros
Aleksey Kladov [Sat, 16 Nov 2019 13:49:26 +0000 (16:49 +0300)]
Goto definition works inside macros

4 years agoMerge #2276
bors[bot] [Sat, 16 Nov 2019 13:50:34 +0000 (13:50 +0000)]
Merge #2276

2276: Source-ify name_definition r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoMerge #2274
bors[bot] [Sat, 16 Nov 2019 13:17:20 +0000 (13:17 +0000)]
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>
4 years agoMerge #2263
bors[bot] [Sat, 16 Nov 2019 12:49:20 +0000 (12:49 +0000)]
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>
4 years agoUpgrade Chalk again
Florian Diebold [Sat, 16 Nov 2019 12:21:51 +0000 (13:21 +0100)]
Upgrade Chalk again

4 years agoFix handling of the binders in dyn/impl Trait
Florian Diebold [Sat, 16 Nov 2019 11:53:13 +0000 (12:53 +0100)]
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.

4 years agoUse Chalk's dyn/impl trait support
Florian Diebold [Fri, 15 Nov 2019 20:00:27 +0000 (21:00 +0100)]
Use Chalk's dyn/impl trait support

4 years agoUpgrade Chalk
Florian Diebold [Fri, 15 Nov 2019 19:32:58 +0000 (20:32 +0100)]
Upgrade Chalk

Associated type values (in impls) are now a separate entity in Chalk, so we have
to intern separate IDs for them.

4 years agoFix format
oxalica [Sat, 16 Nov 2019 10:52:47 +0000 (18:52 +0800)]
Fix format

4 years agoSource-ify name_definition
Aleksey Kladov [Sat, 16 Nov 2019 10:50:04 +0000 (13:50 +0300)]
Source-ify name_definition

4 years agoSourcify classify_name_ref
Aleksey Kladov [Sat, 16 Nov 2019 10:33:25 +0000 (13:33 +0300)]
Sourcify classify_name_ref

4 years agoMerge #2271
bors[bot] [Fri, 15 Nov 2019 23:12:59 +0000 (23:12 +0000)]
Merge #2271

2271: Force passing Source when creating a SourceAnalyzer r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoForce passing Source when creating a SourceAnalyzer
Aleksey Kladov [Fri, 15 Nov 2019 21:56:51 +0000 (00:56 +0300)]
Force passing Source when creating a SourceAnalyzer

4 years agoMerge #2268
bors[bot] [Fri, 15 Nov 2019 22:36:10 +0000 (22:36 +0000)]
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>
4 years agoPrepare SourceAnalyzer for macros
Aleksey Kladov [Fri, 15 Nov 2019 21:40:54 +0000 (00:40 +0300)]
Prepare SourceAnalyzer for macros

4 years agoMerge #2270
bors[bot] [Fri, 15 Nov 2019 22:15:30 +0000 (22:15 +0000)]
Merge #2270

2270: Reduce some duplication r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoReduce some duplication
Aleksey Kladov [Fri, 15 Nov 2019 22:14:56 +0000 (01:14 +0300)]
Reduce some duplication

4 years agoAdd a test that uses classify_name
kjeremy [Fri, 15 Nov 2019 22:13:52 +0000 (17:13 -0500)]
Add a test that uses classify_name

4 years agoRemove wrong clone
Aleksey Kladov [Fri, 15 Nov 2019 22:00:00 +0000 (01:00 +0300)]
Remove wrong clone

4 years agoMerge #2269
bors[bot] [Fri, 15 Nov 2019 21:57:48 +0000 (21:57 +0000)]
Merge #2269

2269: Prepare SourceAnalyzer for macros r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoHandle ast::MacroCall in classify_name and impl FromSource for MacroDef
kjeremy [Fri, 15 Nov 2019 21:20:00 +0000 (16:20 -0500)]
Handle ast::MacroCall in classify_name and impl FromSource for MacroDef

Fixes #2260

4 years agoPrepare SourceAnalyzer for macros
Aleksey Kladov [Fri, 15 Nov 2019 21:40:54 +0000 (00:40 +0300)]
Prepare SourceAnalyzer for macros

4 years agoSourcify some more
Aleksey Kladov [Fri, 15 Nov 2019 21:05:10 +0000 (00:05 +0300)]
Sourcify some more

4 years agoMerge #2266
bors[bot] [Fri, 15 Nov 2019 20:25:53 +0000 (20:25 +0000)]
Merge #2266

2266: Sourcify some things r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoSourcify some things
Aleksey Kladov [Fri, 15 Nov 2019 20:24:56 +0000 (23:24 +0300)]
Sourcify some things

If we want to support macros properly, we need to get rid of those
FileIds everywhere...

4 years agoMerge #2252
bors[bot] [Fri, 15 Nov 2019 20:15:29 +0000 (20:15 +0000)]
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>
4 years agoMerge #2265
bors[bot] [Fri, 15 Nov 2019 20:05:48 +0000 (20:05 +0000)]
Merge #2265

2265: Fix add-new assist r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoAttempt to implement typed accessors
Geoffry Song [Fri, 15 Nov 2019 20:05:29 +0000 (12:05 -0800)]
Attempt to implement typed accessors

4 years agoFix add-new assist
Aleksey Kladov [Fri, 15 Nov 2019 19:48:07 +0000 (22:48 +0300)]
Fix add-new assist

4 years agoCheck exit code of `cargo watch`
oxalica [Fri, 15 Nov 2019 19:44:38 +0000 (03:44 +0800)]
Check exit code of `cargo watch`

4 years agoMerge #2264
bors[bot] [Fri, 15 Nov 2019 19:11:51 +0000 (19:11 +0000)]
Merge #2264

2264: move impls to hir-def r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoHandle errors when `cargo watch` fails
oxalica [Fri, 15 Nov 2019 18:49:44 +0000 (02:49 +0800)]
Handle errors when `cargo watch` fails

4 years agoRemove old impls infrastructure
Aleksey Kladov [Fri, 15 Nov 2019 18:28:00 +0000 (21:28 +0300)]
Remove old impls infrastructure

4 years agoStore impls in CrateDefMap
Aleksey Kladov [Fri, 15 Nov 2019 16:32:56 +0000 (19:32 +0300)]
Store impls in CrateDefMap

4 years agoAdd ImplId
Aleksey Kladov [Fri, 15 Nov 2019 16:14:50 +0000 (19:14 +0300)]
Add ImplId

4 years agoReduce visibility
Aleksey Kladov [Fri, 15 Nov 2019 16:04:00 +0000 (19:04 +0300)]
Reduce visibility

4 years agoMerge #2262
bors[bot] [Fri, 15 Nov 2019 18:19:16 +0000 (18:19 +0000)]
Merge #2262

2262: Speedup builds for users r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>