Commit Graph

6459 Commits

Author SHA1 Message Date
ice1000
d15f300268 Publicize file_id to make test_db compile 2019-12-05 08:37:39 -05:00
ice1000
006a583381 Use placeholder instead of Option 2019-12-05 08:33:29 -05:00
ice1000
7702f690a9 One pub function less is good! 2019-12-05 08:28:31 -05:00
ice1000
762915826a Reduce visibility, use struct instead of tuples 2019-12-05 08:19:27 -05:00
ice1000
088f50c0ab No block at the moment 2019-12-04 18:30:42 -05:00
ice1000
032eb3d68e Remove almost unused ModuleSource::new 2019-12-04 18:30:42 -05:00
ice1000
5c5f90ba57 Confluent ModuleSource usage 2019-12-04 18:30:42 -05:00
ice1000
38853459e3 Add ModuleSource::Block 2019-12-04 18:30:42 -05:00
ice1000
7cbedc50bc Fix test compilation 2019-12-04 18:30:42 -05:00
ice1000
1bb59a7d08 Three-state enum for module origin 2019-12-04 18:30:42 -05:00
bors[bot]
ace661bb10
Merge #2478
2478: ⬆️ rowan r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-12-04 22:15:24 +00:00
bors[bot]
46d37a81ac
Merge #2477
2477: Run rustfmt with respect to Cargo.toml edition r=matklad a=Speedy37

Fixes #2146
Fixes #1959

Co-authored-by: Vincent Rouillé <vincent@speedy37.fr>
2019-12-04 22:07:11 +00:00
Vincent Rouillé
b437dca4bd
Run rustfmt with respect to Cargo.toml edition 2019-12-04 23:05:01 +01:00
Aleksey Kladov
46ad914d7d ⬆️ rowan 2019-12-04 23:03:42 +01:00
bors[bot]
1fe0b8c03f
Merge #2476
2476: ⬆️ rowan r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-12-04 16:20:04 +00:00
Aleksey Kladov
193b1a7437 ⬆️ rowan 2019-12-04 17:15:55 +01:00
bors[bot]
035419a504
Merge #2475
2475: fix outdated link to ra-emacs-lsp.el r=matklad a=andrewbanchich



Co-authored-by: Andrew Banchich <andrewbanchich@gmail.com>
2019-12-04 16:09:20 +00:00
Andrew Banchich
956ce1d10a
fix file name 2019-12-04 11:07:37 -05:00
Andrew Banchich
62cadecc89
fix link 2019-12-04 11:02:03 -05:00
Andrew Banchich
00d5fb44ab
use relative link 2019-12-04 11:00:51 -05:00
Andrew Banchich
a863298314
fix outdated link to ra-emacs-lsp.el 2019-12-04 10:48:03 -05:00
bors[bot]
c6e4cadfce
Merge #2471
2471: Add `ModuleItemsOwner` to `Block` r=matklad a=ice1000

As title

Co-authored-by: ice1000 <ice1000kotlin@foxmail.com>
2019-12-03 17:24:16 +00:00
bors[bot]
82fd86ac71
Merge #2472
2472: Split up ty tests a bit r=matklad a=flodiebold

`simple` is a bit of a kitchen sink (and not all of them are really about 'simple' features), suggestions for further divisions there are welcome 😄 

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2019-12-03 17:16:02 +00:00
ice1000
379482068d Add ModuleItemsOwner to Block 2019-12-03 12:07:39 -05:00
Florian Diebold
9747156f6c Split up ty tests a bit 2019-12-03 18:00:29 +01:00
bors[bot]
96b9d5b44e
Merge #2469
2469: Replace `ra_hir_expand::either` with crate r=matklad a=ice1000

As title.

Co-authored-by: ice1000 <ice1000kotlin@foxmail.com>
2019-12-03 16:13:42 +00:00
ice1000
009437f5d9 Replace ra_hir_expand::either with crate 2019-12-03 11:07:56 -05:00
bors[bot]
15f143f0c3
Merge #2468
2468: Fix #2467 r=flodiebold a=flodiebold

The stand-alone `unify` requires that the type doesn't contain any type
variables. So we can't share the code here for now (without more refactoring)...

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2019-12-03 14:02:23 +00:00
Florian Diebold
e4add45951 Fix #2467
The stand-alone `unify` requires that the type doesn't contain any type
variables. So we can't share the code here for now (without more refactoring)...
2019-12-03 15:01:23 +01:00
bors[bot]
ba4f7fa02f
Merge #2465
2465: Extract built-in trait implementations to separate module r=matklad a=flodiebold

This untangles the builtin logic from the Chalk translation.

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2019-12-03 13:43:05 +00:00
bors[bot]
c5be0cedf3
Merge #2463
2463: More correct method resolution r=flodiebold a=flodiebold

This should fix the order in which candidates for method resolution are considered, i.e. `(&Foo).clone()` should now be of type `Foo` instead of `&Foo`. It also checks for inherent candidates that the self type unifies properly with the self type in the impl (i.e. `impl Foo<u32>` methods will only be considered for `Foo<u32>`).

To be able to get the correct receiver type to check in the method resolution, I needed the unification logic, so I extracted it to the `unify.rs` module.

Should fix #2435.

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2019-12-03 12:58:44 +00:00
Florian Diebold
18f25acb89 Make unify pub(crate) 2019-12-03 13:58:02 +01:00
Florian Diebold
176207f1e8 Extract built-in trait implementations to separate module
This untangles the builtin logic from the Chalk translation.
2019-12-03 12:30:50 +01:00
Florian Diebold
a5a07bde04 Add tests for checking the impl self type 2019-12-02 19:33:13 +01:00
Florian Diebold
cfa50df33e Refactor a bit 2019-12-02 19:33:13 +01:00
Florian Diebold
456d52fdfa Check receiver type properly 2019-12-02 19:33:13 +01:00
Florian Diebold
599dab5982 Extract unification code to unify module 2019-12-02 19:33:13 +01:00
Florian Diebold
cbf262a1bc Change order of calls to get method candidate order correct 2019-12-02 19:33:13 +01:00
bors[bot]
3376c08052
Merge #2018
2018: assists: add assist for custom implementation for derived trait r=matklad a=paulolieuthier

Please, tell me if something could be more idiomatic or efficient.

Fixes #1256.

Co-authored-by: Paulo Lieuthier <paulolieuthier@gmail.com>
2019-12-02 15:52:11 +00:00
bors[bot]
c5b322e3df
Merge #2462
2462: Switch back to npm install r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-12-02 14:19:12 +00:00
Aleksey Kladov
1836671d53 Switch back to npm install
Locks like it honors package.lock nowdays
2019-12-02 15:17:55 +01:00
bors[bot]
c6eff1da12
Merge #2457
2457: Clarify installation instructions r=matklad a=fintelia

In particular it is necessary to clone the repository before running the other commands. I also removed the `cargo install` side note because it didn't actually work (running the command just produces an error that --package isn't a recognized flag) and added a tldr code block with the list of commands to run.

Co-authored-by: Jonathan Behrens <fintelia@gmail.com>
2019-12-02 12:42:33 +00:00
bors[bot]
bd01f112e1
Merge #2461
2461: anyhow, libc, syn, cargo_metadata r=kjeremy a=kjeremy



Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
2019-12-01 20:02:01 +00:00
Jeremy Kolb
e6c0ad0d0a Just update some things 2019-12-01 15:00:34 -05:00
Jonathan Behrens
75be6553fe Add back corrected cargo install command 2019-12-01 13:29:49 -05:00
bors[bot]
ec164fbb68
Merge #2455
2455: Add BuiltinShadowMode r=flodiebold a=edwin0cheng

This PR try to fix #1905 by introduce an `BuiltinShadowMode` in name resolving functions. 

cc @flodiebold 

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2019-12-01 11:13:25 +00:00
Edwin Cheng
cfc6e9e366 Remove some empty lines 2019-12-01 12:17:52 +08:00
Edwin Cheng
13c54685ff Use index instead of peekable 2019-12-01 12:14:35 +08:00
Edwin Cheng
5f11117733 Fix comment 2019-12-01 12:14:12 +08:00
Jonathan Behrens
c69ed9bd1f
Clarify installation instructions
In particular it is necessary to clone the repository before running the other commands. I also removed the `cargo install` side note because it didn't actually work (running the command just produces an error that --package isn't a recognized flag) and added a tldr code block with the list of commands to run.
2019-11-30 21:20:54 -05:00