]> git.lizzy.rs Git - rust.git/log
rust.git
4 years ago:arrow_up: rowan
Aleksey Kladov [Wed, 4 Dec 2019 16:15:55 +0000 (17:15 +0100)]
:arrow_up: rowan

4 years agoMerge #2471
bors[bot] [Tue, 3 Dec 2019 17:24:16 +0000 (17:24 +0000)]
Merge #2471

2471: Add `ModuleItemsOwner` to `Block` r=matklad a=ice1000

As title

Co-authored-by: ice1000 <ice1000kotlin@foxmail.com>
4 years agoMerge #2472
bors[bot] [Tue, 3 Dec 2019 17:16:02 +0000 (17:16 +0000)]
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 :smile:

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
4 years agoAdd `ModuleItemsOwner` to `Block`
ice1000 [Tue, 3 Dec 2019 17:03:35 +0000 (12:03 -0500)]
Add `ModuleItemsOwner` to `Block`

4 years agoSplit up ty tests a bit
Florian Diebold [Tue, 3 Dec 2019 12:38:54 +0000 (13:38 +0100)]
Split up ty tests a bit

4 years agoMerge #2469
bors[bot] [Tue, 3 Dec 2019 16:13:42 +0000 (16:13 +0000)]
Merge #2469

2469: Replace `ra_hir_expand::either` with crate r=matklad a=ice1000

As title.

Co-authored-by: ice1000 <ice1000kotlin@foxmail.com>
4 years agoReplace `ra_hir_expand::either` with crate
ice1000 [Tue, 3 Dec 2019 16:07:56 +0000 (11:07 -0500)]
Replace `ra_hir_expand::either` with crate

4 years agoMerge #2468
bors[bot] [Tue, 3 Dec 2019 14:02:23 +0000 (14:02 +0000)]
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>
4 years agoFix #2467
Florian Diebold [Tue, 3 Dec 2019 13:59:29 +0000 (14:59 +0100)]
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)...

4 years agoMerge #2465
bors[bot] [Tue, 3 Dec 2019 13:43:05 +0000 (13:43 +0000)]
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>
4 years agoMerge #2463
bors[bot] [Tue, 3 Dec 2019 12:58:44 +0000 (12:58 +0000)]
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>
4 years agoMake unify pub(crate)
Florian Diebold [Tue, 3 Dec 2019 12:58:02 +0000 (13:58 +0100)]
Make unify pub(crate)

4 years agoExtract built-in trait implementations to separate module
Florian Diebold [Tue, 3 Dec 2019 11:16:39 +0000 (12:16 +0100)]
Extract built-in trait implementations to separate module

This untangles the builtin logic from the Chalk translation.

4 years agoAdd tests for checking the impl self type
Florian Diebold [Mon, 2 Dec 2019 18:27:31 +0000 (19:27 +0100)]
Add tests for checking the impl self type

4 years agoRefactor a bit
Florian Diebold [Mon, 2 Dec 2019 17:12:49 +0000 (18:12 +0100)]
Refactor a bit

4 years agoCheck receiver type properly
Florian Diebold [Sun, 1 Dec 2019 21:14:28 +0000 (22:14 +0100)]
Check receiver type properly

4 years agoExtract unification code to unify module
Florian Diebold [Sun, 1 Dec 2019 19:30:28 +0000 (20:30 +0100)]
Extract unification code to unify module

4 years agoChange order of calls to get method candidate order correct
Florian Diebold [Sat, 2 Nov 2019 14:18:26 +0000 (15:18 +0100)]
Change order of calls to get method candidate order correct

4 years agoMerge #2018
bors[bot] [Mon, 2 Dec 2019 15:52:11 +0000 (15:52 +0000)]
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>
4 years agoMerge #2462
bors[bot] [Mon, 2 Dec 2019 14:19:12 +0000 (14:19 +0000)]
Merge #2462

2462: Switch back to npm install r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoSwitch back to npm install
Aleksey Kladov [Mon, 2 Dec 2019 14:17:55 +0000 (15:17 +0100)]
Switch back to npm install

Locks like it honors package.lock nowdays

4 years agoMerge #2457
bors[bot] [Mon, 2 Dec 2019 12:42:33 +0000 (12:42 +0000)]
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>
4 years agoMerge #2461
bors[bot] [Sun, 1 Dec 2019 20:02:01 +0000 (20:02 +0000)]
Merge #2461

2461: anyhow, libc, syn, cargo_metadata r=kjeremy a=kjeremy

Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
4 years agoJust update some things
Jeremy Kolb [Sun, 1 Dec 2019 20:00:34 +0000 (15:00 -0500)]
Just update some things

4 years agoAdd back corrected `cargo install` command
Jonathan Behrens [Sun, 1 Dec 2019 18:29:01 +0000 (13:29 -0500)]
Add back corrected `cargo install` command

4 years agoMerge #2455
bors[bot] [Sun, 1 Dec 2019 11:13:25 +0000 (11:13 +0000)]
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>
4 years agoRemove some empty lines
Edwin Cheng [Sun, 1 Dec 2019 04:17:52 +0000 (12:17 +0800)]
Remove some empty lines

4 years agoUse index instead of peekable
Edwin Cheng [Sun, 1 Dec 2019 04:14:35 +0000 (12:14 +0800)]
Use index instead of peekable

4 years agoFix comment
Edwin Cheng [Sun, 1 Dec 2019 04:14:12 +0000 (12:14 +0800)]
Fix comment

4 years agoClarify installation instructions
Jonathan Behrens [Sun, 1 Dec 2019 02:20:54 +0000 (21:20 -0500)]
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.

4 years agoMerge #2451
bors[bot] [Sat, 30 Nov 2019 19:19:28 +0000 (19:19 +0000)]
Merge #2451

2451: Use env_logger instead of flexi_logger r=matklad a=AlexanderEkdahl

This fixes https://github.com/rust-analyzer/rust-analyzer/issues/2335

- By default only `error` will be printed. From what I can tell this matches the current behaviour. Configured through `RUST_LOG`.
- I looked through the optional dependencies for `env_logger`and I have only enabled `human_time`. Without this feature no timestamp will be shown for log messages.
- `RA_LOG_DIR` feature is removed

This PR adds 2 new dependencies(`env_logger` and `human_time`) and removes 6 dependencies.

Co-authored-by: Alexander Ekdahl <alexander@ekdahl.io>
4 years agoAdd BuiltinShadowMode
Edwin Cheng [Sat, 30 Nov 2019 15:29:21 +0000 (23:29 +0800)]
Add BuiltinShadowMode

4 years agoMerge #2453
bors[bot] [Sat, 30 Nov 2019 14:23:18 +0000 (14:23 +0000)]
Merge #2453

2453: Handle various cycles r=matklad a=flodiebold

 - handle `impl Trait<Self> for SomeType`, which is allowed. This necessitated splitting the `impl_ty` query, but I think the result actually makes a lot of code nicer. This should fix #2446.
 - add recovery for `impl Trait for SomeType<Self>`
 - add recovery for `type Type = Foo<Type>`
 - add recovery for cycles in generic param env

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
4 years agoAdd cycle recovery for type aliases
Florian Diebold [Sat, 30 Nov 2019 11:48:51 +0000 (12:48 +0100)]
Add cycle recovery for type aliases

4 years agoAdd cycle recovery for generic predicates
Florian Diebold [Sat, 30 Nov 2019 11:39:21 +0000 (12:39 +0100)]
Add cycle recovery for generic predicates

4 years agoHandle cycles in impl types better
Florian Diebold [Sat, 30 Nov 2019 11:35:37 +0000 (12:35 +0100)]
Handle cycles in impl types better

 - impl Trait<Self> for S is allowed
 - impl Trait for S<Self> is an invalid cycle, but we can add cycle recovery for
   it in Salsa now

4 years agoMerge #2449
bors[bot] [Sat, 30 Nov 2019 10:43:35 +0000 (10:43 +0000)]
Merge #2449

2449: Only allow renames to valid identifiers r=matklad a=detrumi

Implements #2121

Co-authored-by: Wilco Kusee <wilcokusee@gmail.com>
4 years agoRemove log dependency from ra_cli
Alexander Ekdahl [Sat, 30 Nov 2019 00:40:59 +0000 (19:40 -0500)]
Remove log dependency from ra_cli

4 years agoUpdate README
Alexander Ekdahl [Sat, 30 Nov 2019 00:36:48 +0000 (19:36 -0500)]
Update README

4 years agoRemove flexi_logger from ra_lsp_server
Alexander Ekdahl [Sat, 30 Nov 2019 00:35:03 +0000 (19:35 -0500)]
Remove flexi_logger from ra_lsp_server

4 years agoUse env_logger in ra_cli
Alexander Ekdahl [Sat, 30 Nov 2019 00:20:48 +0000 (19:20 -0500)]
Use env_logger in ra_cli

4 years agoMerge #2445
bors[bot] [Fri, 29 Nov 2019 19:34:02 +0000 (19:34 +0000)]
Merge #2445

2445: Infer range types r=flodiebold a=oxalica

Co-authored-by: oxalica <oxalicc@pm.me>
4 years agoPush identifier check to rename function
Wilco Kusee [Fri, 29 Nov 2019 15:06:20 +0000 (16:06 +0100)]
Push identifier check to rename function

4 years agoTest rename for various identifiers
Wilco Kusee [Fri, 29 Nov 2019 15:03:39 +0000 (16:03 +0100)]
Test rename for various identifiers

4 years agoMove identifier check to analysis
Wilco Kusee [Fri, 29 Nov 2019 14:52:12 +0000 (15:52 +0100)]
Move identifier check to analysis

4 years agoAlso allow renaming to underscore
Wilco Kusee [Fri, 29 Nov 2019 14:27:22 +0000 (15:27 +0100)]
Also allow renaming to underscore

4 years agoOnly allow renames to valid identifiers
Wilco Kusee [Fri, 29 Nov 2019 14:14:42 +0000 (15:14 +0100)]
Only allow renames to valid identifiers

4 years agoReduce variants of Expr
oxalica [Fri, 29 Nov 2019 06:49:12 +0000 (14:49 +0800)]
Reduce variants of Expr

4 years agodocs: describe new feature 'add custom impl for derived trait'
Paulo Lieuthier [Sat, 19 Oct 2019 11:19:06 +0000 (08:19 -0300)]
docs: describe new feature 'add custom impl for derived trait'

4 years agoassists: add assist for custom implementation for derived trait
Paulo Lieuthier [Tue, 15 Oct 2019 18:29:20 +0000 (15:29 -0300)]
assists: add assist for custom implementation for derived trait

4 years agoInfer range types
oxalica [Thu, 28 Nov 2019 19:10:16 +0000 (03:10 +0800)]
Infer range types

4 years agoMerge #2442
bors[bot] [Thu, 28 Nov 2019 16:05:46 +0000 (16:05 +0000)]
Merge #2442

2442: Move source-related traits to a separate module r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoMove source-related traits to a separate module
Aleksey Kladov [Thu, 28 Nov 2019 15:05:28 +0000 (18:05 +0300)]
Move source-related traits to a separate module

4 years agoMerge #2441
bors[bot] [Thu, 28 Nov 2019 13:04:52 +0000 (13:04 +0000)]
Merge #2441

2441: Use InFile for AstId r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoUse InFile for AstId
Aleksey Kladov [Thu, 28 Nov 2019 13:00:03 +0000 (16:00 +0300)]
Use InFile for AstId

4 years agoMerge #2440
bors[bot] [Thu, 28 Nov 2019 10:02:46 +0000 (10:02 +0000)]
Merge #2440

2440: Rename Source -> InFile r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoRename Source -> InFile
Aleksey Kladov [Thu, 28 Nov 2019 09:50:26 +0000 (12:50 +0300)]
Rename Source -> InFile

4 years agoMerge #2438
bors[bot] [Thu, 28 Nov 2019 08:46:36 +0000 (08:46 +0000)]
Merge #2438

2438: Derive Hash for tt::TokenTree r=matklad a=edwin0cheng

Preparation for intern `TokenTree` to salsa database

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
4 years agoDerive Hash for TokenTrees
Edwin Cheng [Thu, 28 Nov 2019 05:41:58 +0000 (13:41 +0800)]
Derive Hash for TokenTrees

4 years agoMerge #2437
bors[bot] [Wed, 27 Nov 2019 23:06:40 +0000 (23:06 +0000)]
Merge #2437

2437: Update mio and anyhow r=kjeremy a=kjeremy

Co-authored-by: kjeremy <kjeremy@gmail.com>
4 years agoUpdate mio and anyhow
kjeremy [Wed, 27 Nov 2019 23:05:49 +0000 (18:05 -0500)]
Update mio and anyhow

4 years agoMerge #2433
bors[bot] [Wed, 27 Nov 2019 20:27:01 +0000 (20:27 +0000)]
Merge #2433

2433: Use Name::missing consistently r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoUse Name::missing consistently
Aleksey Kladov [Wed, 27 Nov 2019 20:22:20 +0000 (23:22 +0300)]
Use Name::missing consistently

4 years agoMerge #2432
bors[bot] [Wed, 27 Nov 2019 19:30:38 +0000 (19:30 +0000)]
Merge #2432

2432: Minimize API r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoMinimize API
Aleksey Kladov [Wed, 27 Nov 2019 19:21:01 +0000 (22:21 +0300)]
Minimize API

4 years agoMerge #2431
bors[bot] [Wed, 27 Nov 2019 19:13:34 +0000 (19:13 +0000)]
Merge #2431

2431: Memoize impl resolutions r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoMemoize impl resolutions
Aleksey Kladov [Wed, 27 Nov 2019 19:12:09 +0000 (22:12 +0300)]
Memoize impl resolutions

4 years agoMerge #2430
bors[bot] [Wed, 27 Nov 2019 18:45:05 +0000 (18:45 +0000)]
Merge #2430

2430: rename ra_ide_api -> ra_ide r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoReformat
Aleksey Kladov [Wed, 27 Nov 2019 18:44:38 +0000 (21:44 +0300)]
Reformat

4 years agorename ra_ide_api -> ra_ide
Aleksey Kladov [Wed, 27 Nov 2019 18:32:33 +0000 (21:32 +0300)]
rename ra_ide_api -> ra_ide

4 years agoRename module_id -> local_id
Aleksey Kladov [Wed, 27 Nov 2019 18:31:51 +0000 (21:31 +0300)]
Rename module_id -> local_id

4 years agoMerge #2429
bors[bot] [Wed, 27 Nov 2019 18:27:45 +0000 (18:27 +0000)]
Merge #2429

2429: Move type inference to a separate crate r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoprune deps
Aleksey Kladov [Wed, 27 Nov 2019 18:23:31 +0000 (21:23 +0300)]
prune deps

4 years agoMove Ty
Aleksey Kladov [Wed, 27 Nov 2019 14:46:02 +0000 (17:46 +0300)]
Move Ty

4 years agoDecouple
Aleksey Kladov [Wed, 27 Nov 2019 13:48:48 +0000 (16:48 +0300)]
Decouple

4 years agoMerge #2428
bors[bot] [Wed, 27 Nov 2019 13:41:55 +0000 (13:41 +0000)]
Merge #2428

2428: Remove TypableDef r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoRemove TypableDef
Aleksey Kladov [Wed, 27 Nov 2019 13:39:58 +0000 (16:39 +0300)]
Remove TypableDef

4 years agoCleanup imports
Aleksey Kladov [Wed, 27 Nov 2019 13:29:11 +0000 (16:29 +0300)]
Cleanup imports

4 years agoUse Id for variats
Aleksey Kladov [Wed, 27 Nov 2019 13:25:01 +0000 (16:25 +0300)]
Use Id for variats

4 years agoMore decoupling
Aleksey Kladov [Wed, 27 Nov 2019 13:02:33 +0000 (16:02 +0300)]
More decoupling

4 years agoDecouple more
Aleksey Kladov [Wed, 27 Nov 2019 12:56:20 +0000 (15:56 +0300)]
Decouple more

4 years agoMerge #2427
bors[bot] [Wed, 27 Nov 2019 09:51:02 +0000 (09:51 +0000)]
Merge #2427

2427: Decouple r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoDecouple
Aleksey Kladov [Wed, 27 Nov 2019 09:47:18 +0000 (12:47 +0300)]
Decouple

4 years agoMerge #2426
bors[bot] [Wed, 27 Nov 2019 09:34:54 +0000 (09:34 +0000)]
Merge #2426

2426: Decouple r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoDecouple
Aleksey Kladov [Wed, 27 Nov 2019 09:31:40 +0000 (12:31 +0300)]
Decouple

4 years agoCleanup imports
Aleksey Kladov [Wed, 27 Nov 2019 09:13:07 +0000 (12:13 +0300)]
Cleanup imports

4 years agoMerge #2425
bors[bot] [Wed, 27 Nov 2019 09:05:39 +0000 (09:05 +0000)]
Merge #2425

2425: Decouple r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoDecouple
Aleksey Kladov [Wed, 27 Nov 2019 09:02:54 +0000 (12:02 +0300)]
Decouple

4 years agoDecouple
Aleksey Kladov [Wed, 27 Nov 2019 08:40:10 +0000 (11:40 +0300)]
Decouple

4 years agoMerge #2424
bors[bot] [Wed, 27 Nov 2019 06:51:37 +0000 (06:51 +0000)]
Merge #2424

2424: Crate -> CrateId r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoCrate -> CrateId
Aleksey Kladov [Wed, 27 Nov 2019 06:42:55 +0000 (09:42 +0300)]
Crate -> CrateId

4 years agoMerge #2422
bors[bot] [Tue, 26 Nov 2019 21:02:32 +0000 (21:02 +0000)]
Merge #2422

2422: Use a simple progress bar instead of indicatif r=maklad a=edwin0cheng

![pb](https://user-images.githubusercontent.com/11014119/69669230-6a3d5a80-10cc-11ea-8ad7-4dccb10349c9.gif)

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
4 years agoFill all last text to space and return the cursor
Edwin Cheng [Tue, 26 Nov 2019 21:01:13 +0000 (05:01 +0800)]
Fill all last text to space and return the cursor

4 years agoRemove progress bar and add a true counter
Edwin Cheng [Tue, 26 Nov 2019 20:33:40 +0000 (04:33 +0800)]
Remove progress bar and add a true counter

4 years agoRemove commented code
Edwin Cheng [Tue, 26 Nov 2019 20:16:03 +0000 (04:16 +0800)]
Remove commented code

4 years agoUse a simple progress bar instead of indicatif
Edwin Cheng [Tue, 26 Nov 2019 20:09:30 +0000 (04:09 +0800)]
Use a simple progress bar instead of indicatif

4 years agoMerge #2421
bors[bot] [Tue, 26 Nov 2019 19:56:35 +0000 (19:56 +0000)]
Merge #2421

2421: Cleanup r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoCleanup
Aleksey Kladov [Tue, 26 Nov 2019 19:56:07 +0000 (22:56 +0300)]
Cleanup

4 years agoDecouple
Aleksey Kladov [Tue, 26 Nov 2019 19:26:47 +0000 (22:26 +0300)]
Decouple

4 years agoMerge #2420
bors[bot] [Tue, 26 Nov 2019 18:42:52 +0000 (18:42 +0000)]
Merge #2420

2420: Remove last traces of adt from Ty r=matklad a=matklad

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