]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoRemove Arc from RawVisibility
Florian Diebold [Thu, 26 Dec 2019 15:42:57 +0000 (16:42 +0100)]
Remove Arc from RawVisibility

Now that it's not used as a direct query return value anymore, it doesn't need
to be cheaply cloneable anymore.

4 years agoFix cross-crate glob privacy handling
Florian Diebold [Thu, 26 Dec 2019 15:31:38 +0000 (16:31 +0100)]
Fix cross-crate glob privacy handling

4 years agoRemove visibility query, instead add struct field visibility to data
Florian Diebold [Thu, 26 Dec 2019 15:22:15 +0000 (16:22 +0100)]
Remove visibility query, instead add struct field visibility to data

Methods should be handled the same, and for items the visibility will be in the
def map.

4 years agoRename ResolvedVisibility -> Visibility
Florian Diebold [Thu, 26 Dec 2019 15:00:10 +0000 (16:00 +0100)]
Rename ResolvedVisibility -> Visibility

4 years agoRename Visibility -> RawVisibility
Florian Diebold [Thu, 26 Dec 2019 14:57:14 +0000 (15:57 +0100)]
Rename Visibility -> RawVisibility

4 years agoHandle privacy for modules
Florian Diebold [Thu, 26 Dec 2019 14:49:13 +0000 (15:49 +0100)]
Handle privacy for modules

4 years agoCheck for `todo!` macros in no_todo
Florian Diebold [Wed, 25 Dec 2019 17:33:56 +0000 (18:33 +0100)]
Check for `todo!` macros in no_todo

4 years agoTake visibility into account for glob imports
Florian Diebold [Wed, 25 Dec 2019 17:05:16 +0000 (18:05 +0100)]
Take visibility into account for glob imports

4 years agoKeep track of visibility during def collection
Florian Diebold [Wed, 25 Dec 2019 14:00:10 +0000 (15:00 +0100)]
Keep track of visibility during def collection

4 years agoCollect visibility of items during nameres
Florian Diebold [Tue, 24 Dec 2019 22:45:14 +0000 (23:45 +0100)]
Collect visibility of items during nameres

4 years agoAdd doc comment
Florian Diebold [Tue, 24 Dec 2019 21:11:50 +0000 (22:11 +0100)]
Add doc comment

4 years agoMake enum variant fields public
Florian Diebold [Tue, 24 Dec 2019 21:10:44 +0000 (22:10 +0100)]
Make enum variant fields public

4 years agoHide completions for private struct fields
Florian Diebold [Tue, 24 Dec 2019 20:46:07 +0000 (21:46 +0100)]
Hide completions for private struct fields

4 years agoAdd visibility in code model for fields
Florian Diebold [Tue, 24 Dec 2019 20:45:58 +0000 (21:45 +0100)]
Add visibility in code model for fields

4 years agoAdd logic for resolving and checking visibility
Florian Diebold [Tue, 24 Dec 2019 20:23:22 +0000 (21:23 +0100)]
Add logic for resolving and checking visibility

4 years agoAdd infrastructure for visibility on syntax and hir_def level
Florian Diebold [Tue, 24 Dec 2019 19:32:42 +0000 (20:32 +0100)]
Add infrastructure for visibility on syntax and hir_def level

4 years agoMerge #2658
bors[bot] [Wed, 25 Dec 2019 20:26:08 +0000 (20:26 +0000)]
Merge #2658

2658: Only add features flags if non-empty r=matklad a=edwin0cheng

This prevent error when disabled  `all-features` in a cargo workspace, because of `--features is not allowed in the root of a virtual workspace` when running `cargo metadata`.

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
4 years agoMerge #2663
bors[bot] [Wed, 25 Dec 2019 19:26:18 +0000 (19:26 +0000)]
Merge #2663

2663: Fill in type params in 'add missing impl members' assist r=flodiebold a=flodiebold

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
4 years agoMerge #2662
bors[bot] [Wed, 25 Dec 2019 00:14:51 +0000 (00:14 +0000)]
Merge #2662

2662: Notify that latest version of VS Code is required r=matklad a=spebern

Suggested in #2660.

Co-authored-by: bold <bold@cryptoguru.com>
4 years agoFill in type params in 'add missing impl members' assist
Florian Diebold [Tue, 24 Dec 2019 15:44:32 +0000 (16:44 +0100)]
Fill in type params in 'add missing impl members' assist

4 years agoMerge #2661
bors[bot] [Tue, 24 Dec 2019 16:28:46 +0000 (16:28 +0000)]
Merge #2661

2661: Implement infer await from async function r=flodiebold a=edwin0cheng

This PR is my attempt for trying to add support for infer `.await` expression from an `async` function, by desugaring its return type to `Impl Future<Output=RetType>`.

Note that I don't know it is supposed to desugaring it in that phase, if it is not suitable in current design, just feel free to reject it :)

r=@flodiebold

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
4 years agoRemove AsyncOwner
Edwin Cheng [Tue, 24 Dec 2019 16:25:18 +0000 (00:25 +0800)]
Remove AsyncOwner

4 years agoCheck if parameters is empty
Edwin Cheng [Tue, 24 Dec 2019 15:39:44 +0000 (23:39 +0800)]
Check if parameters is empty

4 years agoAdd FIXME
Edwin Cheng [Tue, 24 Dec 2019 15:39:17 +0000 (23:39 +0800)]
Add FIXME

4 years agoFormatting
Edwin Cheng [Tue, 24 Dec 2019 11:52:48 +0000 (19:52 +0800)]
Formatting

4 years agoNotify that latest version of VS Code is required
bold [Tue, 24 Dec 2019 12:04:42 +0000 (20:04 +0800)]
Notify that latest version of VS Code is required

4 years agoImplement infer await from async func
Edwin Cheng [Tue, 24 Dec 2019 11:45:28 +0000 (19:45 +0800)]
Implement infer await from async func

4 years agoMerge #2659
bors[bot] [Mon, 23 Dec 2019 23:47:32 +0000 (23:47 +0000)]
Merge #2659

2659: Update lsp-types and rayon r=kjeremy a=kjeremy

Brings in https://github.com/gluon-lang/lsp-types/pull/129 for https://github.com/rust-analyzer/rust-analyzer/issues/2651#issuecomment-568554427

Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
4 years agoUpdate lsp-types and rayon
Jeremy Kolb [Mon, 23 Dec 2019 23:46:04 +0000 (18:46 -0500)]
Update lsp-types and rayon

4 years agoOnly add features flags if non-empty
Edwin Cheng [Mon, 23 Dec 2019 16:27:48 +0000 (00:27 +0800)]
Only add features flags if non-empty

4 years agoMerge #2655
bors[bot] [Mon, 23 Dec 2019 14:38:59 +0000 (14:38 +0000)]
Merge #2655

2655: lsp-types 0.67 r=matklad a=kjeremy

Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
4 years agolsp-types 0.67
Jeremy Kolb [Mon, 23 Dec 2019 14:33:49 +0000 (09:33 -0500)]
lsp-types 0.67

4 years agoMerge #2636
bors[bot] [Mon, 23 Dec 2019 10:58:06 +0000 (10:58 +0000)]
Merge #2636

2636: Chalk update and refactoring r=flodiebold a=flodiebold

This updates the Chalk integration to https://github.com/rust-lang/chalk/pull/311, which will presumably get merged soon, and refactors it some more, most notably introducing our own `TypeFamily` instead of reusing `ChalkIr`. It's still mostly the same as `ChalkIr` though, except for using Salsa `InternId`s directly.

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
4 years agoMerge #2652
bors[bot] [Mon, 23 Dec 2019 10:19:32 +0000 (10:19 +0000)]
Merge #2652

2652: Bump lsp-types to 0.66.0 (fixes #2651) r=matklad a=udoprog

Co-authored-by: John-John Tedro <udoprog@tedro.se>
4 years agoBump lsp-types to 0.66.0 (fixes #2651)
John-John Tedro [Mon, 23 Dec 2019 10:02:54 +0000 (11:02 +0100)]
Bump lsp-types to 0.66.0 (fixes #2651)

4 years agoFilter out error predicates in type bounds as well
Florian Diebold [Sat, 21 Dec 2019 18:15:06 +0000 (19:15 +0100)]
Filter out error predicates in type bounds as well

4 years agoIntroduce our own Chalk TypeFamily, instead of using ChalkIr
Florian Diebold [Sat, 21 Dec 2019 14:00:44 +0000 (15:00 +0100)]
Introduce our own Chalk TypeFamily, instead of using ChalkIr

It's not very different, except we can directly use Salsa IDs instead of casting
them. This means we need to refactor the handling of errors to get rid of
UNKNOWN_TRAIT though.

4 years agoRefactor Chalk integration some more
Florian Diebold [Sat, 21 Dec 2019 13:46:15 +0000 (14:46 +0100)]
Refactor Chalk integration some more

4 years agoUpdate Chalk, clean up Chalk integration a bit
Florian Diebold [Sat, 21 Dec 2019 13:29:33 +0000 (14:29 +0100)]
Update Chalk, clean up Chalk integration a bit

4 years agoMerge #2648
bors[bot] [Sun, 22 Dec 2019 21:42:54 +0000 (21:42 +0000)]
Merge #2648

2648: Rudimentary name resolution for local items r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoRudimentary name resolution for local items
Aleksey Kladov [Sun, 22 Dec 2019 19:12:23 +0000 (20:12 +0100)]
Rudimentary name resolution for local items

4 years agoSimplify
Aleksey Kladov [Sun, 22 Dec 2019 18:32:35 +0000 (19:32 +0100)]
Simplify

4 years agoRefactor
Aleksey Kladov [Sun, 22 Dec 2019 18:31:01 +0000 (19:31 +0100)]
Refactor

4 years agoMerge #2646
bors[bot] [Sun, 22 Dec 2019 14:57:34 +0000 (14:57 +0000)]
Merge #2646

2646: Share impl Scope between modules and blocks r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoShare impl Scope between modules and blocks
Aleksey Kladov [Sun, 22 Dec 2019 14:49:39 +0000 (15:49 +0100)]
Share impl Scope between modules and blocks

4 years agoMerge #2645
bors[bot] [Sun, 22 Dec 2019 14:43:15 +0000 (14:43 +0000)]
Merge #2645

2645: Simplify r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoSimplify
Aleksey Kladov [Sun, 22 Dec 2019 14:37:07 +0000 (15:37 +0100)]
Simplify

4 years agoRemove unused parameters
Aleksey Kladov [Sun, 22 Dec 2019 14:31:30 +0000 (15:31 +0100)]
Remove unused parameters

4 years agoRemove import field
Aleksey Kladov [Sun, 22 Dec 2019 14:28:55 +0000 (15:28 +0100)]
Remove import field

4 years agoSeparate defs from imports
Aleksey Kladov [Sun, 22 Dec 2019 14:21:48 +0000 (15:21 +0100)]
Separate defs from imports

4 years agoRefactor PerNs construction
Aleksey Kladov [Sun, 22 Dec 2019 14:08:57 +0000 (15:08 +0100)]
Refactor PerNs construction

4 years agoMinor rename
Aleksey Kladov [Sun, 22 Dec 2019 14:04:31 +0000 (15:04 +0100)]
Minor rename

4 years agoMerge #2644
bors[bot] [Sun, 22 Dec 2019 13:48:43 +0000 (13:48 +0000)]
Merge #2644

2644: More compact profiling display r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoMore compact profiling display
Aleksey Kladov [Sun, 22 Dec 2019 13:17:31 +0000 (14:17 +0100)]
More compact profiling display

4 years agoMerge #2643
bors[bot] [Sun, 22 Dec 2019 13:07:33 +0000 (13:07 +0000)]
Merge #2643

2643: Don't fire no-op changes after files are saved to disk r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoDon't fire no-op changes after files are saved to disk
Aleksey Kladov [Sun, 22 Dec 2019 12:56:19 +0000 (13:56 +0100)]
Don't fire no-op changes after files are saved to disk

4 years agoMerge #2642
bors[bot] [Sun, 22 Dec 2019 08:05:02 +0000 (08:05 +0000)]
Merge #2642

2642: Use name instead of ident in parser for macro 2.0 syntax r=matklad a=edwin0cheng

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
4 years agoMerge #2641
bors[bot] [Sun, 22 Dec 2019 07:56:33 +0000 (07:56 +0000)]
Merge #2641

2641: Parse const generics r=matklad a=roblabla

Adds very primitive support for parsing const generics (`const IDENT: TY`) so that rust-analyzer stops complaining about the syntax being invalid.

Fixes #1574
Fixes #2281

Co-authored-by: roblabla <unfiltered@roblab.la>
4 years agoUse name instead of ident for macro 2.0 sytnax
Edwin Cheng [Sun, 22 Dec 2019 03:11:10 +0000 (11:11 +0800)]
Use name instead of ident for macro 2.0 sytnax

4 years agoParse const generics
roblabla [Sun, 22 Dec 2019 00:38:23 +0000 (00:38 +0000)]
Parse const generics

Fixes #1574
Fixes #2281

4 years agoMerge #2640
bors[bot] [Sat, 21 Dec 2019 20:53:34 +0000 (20:53 +0000)]
Merge #2640

2640: Add some module docs r=kjeremy a=kjeremy

Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
4 years agoAdd some module docs
Jeremy Kolb [Sat, 21 Dec 2019 20:27:38 +0000 (15:27 -0500)]
Add some module docs

4 years agoMerge #2638
bors[bot] [Sat, 21 Dec 2019 18:44:51 +0000 (18:44 +0000)]
Merge #2638

2638: More profiling r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoMore profiling
Aleksey Kladov [Sat, 21 Dec 2019 18:40:20 +0000 (19:40 +0100)]
More profiling

4 years agoMerge #2637
bors[bot] [Sat, 21 Dec 2019 17:46:52 +0000 (17:46 +0000)]
Merge #2637

2637: Optimize and profile r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoOptimize and profile
Aleksey Kladov [Sat, 21 Dec 2019 17:45:46 +0000 (18:45 +0100)]
Optimize and profile

4 years agoMerge #2635
bors[bot] [Sat, 21 Dec 2019 16:35:21 +0000 (16:35 +0000)]
Merge #2635

2635: Remove import source map r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoMove LocalImportId
Aleksey Kladov [Sat, 21 Dec 2019 16:34:28 +0000 (17:34 +0100)]
Move LocalImportId

4 years agoRemove import source map
Aleksey Kladov [Sat, 21 Dec 2019 16:26:05 +0000 (17:26 +0100)]
Remove import source map

4 years agoRemove import from resolution
Aleksey Kladov [Sat, 21 Dec 2019 16:22:48 +0000 (17:22 +0100)]
Remove import from resolution

4 years agoMerge #2634
bors[bot] [Sat, 21 Dec 2019 15:56:04 +0000 (15:56 +0000)]
Merge #2634

2634: Update crates r=matklad a=kjeremy

Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
4 years agoUpdate crates
Jeremy Kolb [Sat, 21 Dec 2019 15:44:02 +0000 (10:44 -0500)]
Update crates

4 years agoMerge #2633
bors[bot] [Sat, 21 Dec 2019 14:25:15 +0000 (14:25 +0000)]
Merge #2633

2633: Remove imports from hir r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoRemove imports from hir
Aleksey Kladov [Sat, 21 Dec 2019 14:17:10 +0000 (15:17 +0100)]
Remove imports from hir

4 years agoMerge #2632
bors[bot] [Sat, 21 Dec 2019 14:08:10 +0000 (14:08 +0000)]
Merge #2632

2632: Revert "Merge #2629" r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoRevert "Merge #2629"
Aleksey Kladov [Sat, 21 Dec 2019 14:04:33 +0000 (15:04 +0100)]
Revert "Merge #2629"

This reverts commit cdc9d682b066b110e0a44e5f8f1c574b38c16ba9, reversing
changes made to 90ef070db3dce0a7acb9cd11d0b0d72de13c9d79.

4 years agoMerge #2630
bors[bot] [Sat, 21 Dec 2019 12:37:41 +0000 (12:37 +0000)]
Merge #2630

2630: Add dummy implementations of env! and option_env! builtins r=matklad a=flodiebold

They don't do anything except return the correct type.

Also refactor the builtin macro tests a bit.

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
4 years agoAdd dummy implementations of env! and option_env! builtins
Florian Diebold [Sat, 21 Dec 2019 12:33:44 +0000 (13:33 +0100)]
Add dummy implementations of env! and option_env! builtins

They don't do anything except return the correct type.

Also refactor the builtin macro tests a bit.

4 years agoMerge #2629
bors[bot] [Sat, 21 Dec 2019 11:48:12 +0000 (11:48 +0000)]
Merge #2629

2629: Remove imports from hir r=matklad a=matklad

We only used them to avoid self-confirming completions (`use self::foo`), but that can be handled more locally.

bors r+

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoPrivatize LocalImportID
Aleksey Kladov [Sat, 21 Dec 2019 11:47:34 +0000 (12:47 +0100)]
Privatize LocalImportID

4 years agoRemove import source map
Aleksey Kladov [Sat, 21 Dec 2019 11:44:28 +0000 (12:44 +0100)]
Remove import source map

4 years agoDon't track imports
Aleksey Kladov [Sat, 21 Dec 2019 11:38:40 +0000 (12:38 +0100)]
Don't track imports

4 years agoRemove hir for imports
Aleksey Kladov [Sat, 21 Dec 2019 11:15:56 +0000 (12:15 +0100)]
Remove hir for imports

4 years agoMerge #2628
bors[bot] [Sat, 21 Dec 2019 10:47:47 +0000 (10:47 +0000)]
Merge #2628

2628: Add macro 2.0 support in parser r=matklad a=edwin0cheng

This PR added a new syntax kind : `MACRO_DEF` and a keyword `MACRO_KW`

there are two syntax for declarative macro 2.0 :
1. Normal : `macro m { ($i:ident) => {} }` , which handle similar to legacy one.
2. Call like: `macro m($i:ident) {}`, it produces a single token tree which have two child token trees : `($i:ident)` and `{}`

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
4 years agoAdd macro keyword to ITEM_RECOVERY_SET
Edwin Cheng [Sat, 21 Dec 2019 10:42:17 +0000 (18:42 +0800)]
Add macro keyword to  ITEM_RECOVERY_SET

4 years agoAdd macro 2.0 support in parser
Edwin Cheng [Sat, 21 Dec 2019 10:29:14 +0000 (18:29 +0800)]
Add macro 2.0 support in parser

4 years agoMerge #2626
bors[bot] [Sat, 21 Dec 2019 10:12:18 +0000 (10:12 +0000)]
Merge #2626

2626: Recursive collect macros in impl items r=matklad a=edwin0cheng

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
4 years agoMerge #2627
bors[bot] [Sat, 21 Dec 2019 10:01:42 +0000 (10:01 +0000)]
Merge #2627

2627: Use SelectionRange from LSP 3.15 r=matklad a=kjeremy

Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
4 years agoMerge #2625
bors[bot] [Sat, 21 Dec 2019 06:12:36 +0000 (06:12 +0000)]
Merge #2625

2625: Clippy lints r=matklad a=kjeremy

Co-authored-by: kjeremy <kjeremy@gmail.com>
4 years agoUse SelectionRange from LSP 3.15
Jeremy Kolb [Fri, 20 Dec 2019 23:57:31 +0000 (18:57 -0500)]
Use SelectionRange from LSP 3.15

4 years agoAdd a limit for protect against infinite recursion
Edwin Cheng [Fri, 20 Dec 2019 21:16:29 +0000 (05:16 +0800)]
Add a limit for protect against infinite recursion

4 years agoRecursive collect macros in impl items
Edwin Cheng [Fri, 20 Dec 2019 21:02:31 +0000 (05:02 +0800)]
Recursive collect macros in impl items

4 years agoClippy lints
kjeremy [Fri, 20 Dec 2019 20:14:30 +0000 (15:14 -0500)]
Clippy lints

4 years agoMerge #2624
bors[bot] [Fri, 20 Dec 2019 19:51:03 +0000 (19:51 +0000)]
Merge #2624

2624: Separate module item from module scope r=matklad a=matklad

bors r+

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoMerge #2623
bors[bot] [Fri, 20 Dec 2019 19:42:46 +0000 (19:42 +0000)]
Merge #2623

2623: Add support macros in impl blocks r=matklad a=edwin0cheng

This PR add support for macros in impl blocks, which reuse `Expander` for macro expansion.

see also: #2459

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
4 years agoAdd support macros in impl blocks
Edwin Cheng [Fri, 20 Dec 2019 19:37:03 +0000 (03:37 +0800)]
Add support macros in impl blocks

4 years agoMerge #2622
bors[bot] [Fri, 20 Dec 2019 19:17:28 +0000 (19:17 +0000)]
Merge #2622

2622: Simplify r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoSimplify
Aleksey Kladov [Fri, 20 Dec 2019 19:15:54 +0000 (20:15 +0100)]
Simplify

4 years agoMerge #2620
bors[bot] [Fri, 20 Dec 2019 19:09:02 +0000 (19:09 +0000)]
Merge #2620

2620: Update packages r=matklad a=kjeremy

Co-authored-by: kjeremy <kjeremy@gmail.com>
4 years agoProtect against null as revealed by `npm test`
kjeremy [Fri, 20 Dec 2019 18:52:34 +0000 (13:52 -0500)]
Protect against null as revealed by `npm test`