Commit Graph

6790 Commits

Author SHA1 Message Date
Florian Diebold
9fd2c813ca visible_from -> is_visible_from 2019-12-27 11:25:04 +01:00
bors[bot]
823e9193fe
Merge #2657
2657: Omit closure parameters in closure type display strings r=flodiebold a=SomeoneToIgnore

Part of https://github.com/rust-analyzer/rust-analyzer/issues/1946

I wonder, should we display the the closure trait (Fn/FnMut/FnOnce) in inlay hints instead of `|...|` at all?

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2019-12-27 10:10:07 +00:00
Emil Lauridsen
428a6ff5b8 Move cargo watch functionality to separate crate 2019-12-27 11:10:07 +01:00
Florian Diebold
dfe95d735b 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.
2019-12-26 16:42:57 +01:00
Florian Diebold
04cf98f8a6 Fix cross-crate glob privacy handling 2019-12-26 16:31:38 +01:00
Florian Diebold
78111620a3 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.
2019-12-26 16:23:40 +01:00
Florian Diebold
50ebff257d Rename ResolvedVisibility -> Visibility 2019-12-26 16:23:40 +01:00
Florian Diebold
e1a2961273 Rename Visibility -> RawVisibility 2019-12-26 16:23:40 +01:00
Florian Diebold
04e8eaa14b Handle privacy for modules 2019-12-26 16:23:40 +01:00
Florian Diebold
1a4a3eb69b Check for todo! macros in no_todo 2019-12-26 16:23:40 +01:00
Florian Diebold
21359c3ab5 Take visibility into account for glob imports 2019-12-26 16:23:40 +01:00
Florian Diebold
8ac25f119e Keep track of visibility during def collection 2019-12-26 16:23:40 +01:00
Florian Diebold
79c90b5641 Collect visibility of items during nameres 2019-12-26 16:23:40 +01:00
Florian Diebold
c31dae2aca Add doc comment 2019-12-26 16:23:40 +01:00
Florian Diebold
8aeaf93b9a Make enum variant fields public 2019-12-26 16:23:40 +01:00
Florian Diebold
9e9c4be48a Hide completions for private struct fields 2019-12-26 16:23:40 +01:00
Florian Diebold
ca15cf422c Add visibility in code model for fields 2019-12-26 16:23:40 +01:00
Florian Diebold
1ce809d0fa Add logic for resolving and checking visibility 2019-12-26 16:23:40 +01:00
Florian Diebold
069bf55cca Add infrastructure for visibility on syntax and hir_def level 2019-12-26 16:23:40 +01:00
bors[bot]
97f01396ed
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>
2019-12-25 20:26:08 +00:00
bors[bot]
24e552fadf
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>
2019-12-25 19:26:18 +00:00
Emil Lauridsen
0cdbd08149 Keep VSCode config mostly backwards compatible 2019-12-25 20:26:06 +01:00
Emil Lauridsen
71d2d81dcc Some documentatioN 2019-12-25 19:56:07 +01:00
Emil Lauridsen
069c165536 Actually respect disabling cargo check functionality 2019-12-25 19:17:54 +01:00
Emil Lauridsen
f7d04d0575 Re-format ra_lsp_server changes 2019-12-25 19:14:30 +01:00
Emil Lauridsen
b9c10ed97f Re-format VSCode extension changes 2019-12-25 19:10:30 +01:00
Emil Lauridsen
178c23f505 Re-implement status display using LSP 3.15 progress event 2019-12-25 19:08:44 +01:00
Emil Lauridsen
500fe46e6c Remove cargo watch supporting code and tests from vscode extension 2019-12-25 17:37:40 +01:00
Emil Lauridsen
c21fbc3e87 Migrate tests from extension to rust 2019-12-25 17:37:40 +01:00
Emil Lauridsen
17360b5d14 Fix use of wrong message in diagnostic 2019-12-25 17:37:40 +01:00
Emil Lauridsen
6af4bf7a8d Configuration plumbing for cargo watcher 2019-12-25 17:37:40 +01:00
Emil Lauridsen
41a1ec723c Remove cargo-watch from vscode extension.
Still keeps tests around for reference when porting them to rust
2019-12-25 17:37:40 +01:00
Emil Lauridsen
66e8ef53a0 Initial implementation of cargo check watching 2019-12-25 17:37:40 +01:00
bors[bot]
52b44ba7ed
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>
2019-12-25 00:14:51 +00:00
Florian Diebold
c39352fa43 Fill in type params in 'add missing impl members' assist 2019-12-24 17:29:27 +01:00
bors[bot]
3f7e5cde0b
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>
2019-12-24 16:28:46 +00:00
Edwin Cheng
208ad97fdc Remove AsyncOwner 2019-12-25 00:25:18 +08:00
Edwin Cheng
42813126d9 Check if parameters is empty 2019-12-25 00:12:29 +08:00
Edwin Cheng
3a2cf708ed Add FIXME 2019-12-24 23:39:17 +08:00
Edwin Cheng
d0537cda9e Formatting 2019-12-24 20:30:39 +08:00
bold
2a09752137 Notify that latest version of VS Code is required 2019-12-24 20:04:42 +08:00
Edwin Cheng
0edb5b4a50 Implement infer await from async func 2019-12-24 19:45:28 +08:00
bors[bot]
aa49b79bda
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>
2019-12-23 23:47:32 +00:00
Jeremy Kolb
9c92f205b1 Update lsp-types and rayon 2019-12-23 18:46:04 -05:00
Seivan Heidari
25537d294c Fix https://github.com/rust-analyzer/rust-analyzer/pull/2061#discussion_r348716036
Fix 68a5ff050f (r361019340)
2019-12-24 00:04:36 +01:00
Kirill Bulatov
242be3631e Omit closure parameters 2019-12-23 18:30:25 +02:00
Edwin Cheng
4ee3c5202e Only add features flags if non-empty 2019-12-24 00:27:48 +08:00
bors[bot]
527027d32e
Merge #2655
2655: lsp-types 0.67 r=matklad a=kjeremy



Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
2019-12-23 14:38:59 +00:00
Seivan Heidari
b21d9337d9 Merge branch 'master' into feature/themes 2019-12-23 15:35:31 +01:00
Jeremy Kolb
019fab2261 lsp-types 0.67 2019-12-23 09:33:49 -05:00