]> git.lizzy.rs Git - rust.git/log
rust.git
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 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 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>
4 years agoMerge #2418
bors[bot] [Tue, 26 Nov 2019 18:34:15 +0000 (18:34 +0000)]
Merge #2418

2418: Hide MacroCallLoc outside hir_expand  r=matklad a=edwin0cheng

This PR refactor `MacroCallLoc` such that it  be hided to become implementation details of hir_expand.

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
4 years agoRemove last traces of adt from Ty
Aleksey Kladov [Tue, 26 Nov 2019 18:25:17 +0000 (21:25 +0300)]
Remove last traces of adt from Ty

4 years agoMore precise NameKind::Self
Aleksey Kladov [Tue, 26 Nov 2019 18:18:26 +0000 (21:18 +0300)]
More precise NameKind::Self

4 years agoMerge #2419
bors[bot] [Tue, 26 Nov 2019 18:07:21 +0000 (18:07 +0000)]
Merge #2419

2419: Remove ns-polymorphic type_for_def r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoRemove ns-polymorphic type_for_def
Aleksey Kladov [Tue, 26 Nov 2019 18:04:24 +0000 (21:04 +0300)]
Remove ns-polymorphic type_for_def

4 years agoHide MacroCallLoc
Edwin Cheng [Tue, 26 Nov 2019 17:33:08 +0000 (01:33 +0800)]
Hide MacroCallLoc

4 years agoMerge #2415
bors[bot] [Tue, 26 Nov 2019 16:31:20 +0000 (16:31 +0000)]
Merge #2415

2415: Add note r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoAdd note
Aleksey Kladov [Tue, 26 Nov 2019 16:30:57 +0000 (19:30 +0300)]
Add note

4 years agoCleanup imports
Aleksey Kladov [Tue, 26 Nov 2019 15:06:12 +0000 (18:06 +0300)]
Cleanup imports

4 years agoReduce visibility
Aleksey Kladov [Tue, 26 Nov 2019 15:02:50 +0000 (18:02 +0300)]
Reduce visibility

4 years agoUse TraitId in TraitRef
Aleksey Kladov [Tue, 26 Nov 2019 15:00:36 +0000 (18:00 +0300)]
Use TraitId in TraitRef

4 years agoMerge #2413
bors[bot] [Tue, 26 Nov 2019 14:45:31 +0000 (14:45 +0000)]
Merge #2413

2413: Remove another helper r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoRemove another helper
Aleksey Kladov [Tue, 26 Nov 2019 14:42:21 +0000 (17:42 +0300)]
Remove another helper

4 years agoDoc
Aleksey Kladov [Tue, 26 Nov 2019 14:26:08 +0000 (17:26 +0300)]
Doc

4 years agoRemove assoc_type_by_name helper
Aleksey Kladov [Tue, 26 Nov 2019 14:21:29 +0000 (17:21 +0300)]
Remove assoc_type_by_name helper

4 years agoStore names in TraitData
Aleksey Kladov [Tue, 26 Nov 2019 14:12:16 +0000 (17:12 +0300)]
Store names in TraitData

4 years agoDetangle ty from traits a bit
Aleksey Kladov [Tue, 26 Nov 2019 13:59:24 +0000 (16:59 +0300)]
Detangle ty from traits a bit

4 years agoMerge #2412
bors[bot] [Tue, 26 Nov 2019 13:26:23 +0000 (13:26 +0000)]
Merge #2412

2412: Fix stale crates that snuck in r=kjeremy a=kjeremy

Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
4 years agoFix stale crates that snuck in
Jeremy Kolb [Tue, 26 Nov 2019 13:20:40 +0000 (08:20 -0500)]
Fix stale crates that snuck in

4 years agoMerge #2406
bors[bot] [Tue, 26 Nov 2019 13:18:03 +0000 (13:18 +0000)]
Merge #2406

2406: Add hygiene information to SourceAnalyzer r=matklad a=edwin0cheng

This should fix https://github.com/rust-analyzer/rust-analyzer/pull/2392#issuecomment-557964686

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
4 years agoRemove dbg!
Edwin Cheng [Tue, 26 Nov 2019 13:13:36 +0000 (21:13 +0800)]
Remove dbg!

4 years agoMerge #2410
bors[bot] [Tue, 26 Nov 2019 12:42:15 +0000 (12:42 +0000)]
Merge #2410

2410: Introduce hir_ty r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoDoc primitives
Aleksey Kladov [Tue, 26 Nov 2019 12:40:55 +0000 (15:40 +0300)]
Doc primitives

4 years agoid-ify impls_in_crate_query
Aleksey Kladov [Tue, 26 Nov 2019 12:27:33 +0000 (15:27 +0300)]
id-ify impls_in_crate_query

4 years agoMerge #2411
bors[bot] [Tue, 26 Nov 2019 12:31:24 +0000 (12:31 +0000)]
Merge #2411

2411: Update parking_lot and smallvec to drop some dependencies r=matklad a=kjeremy

Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
4 years agoUpdate parking_lot and smallvec to drop some dependencies
Jeremy Kolb [Tue, 26 Nov 2019 12:29:28 +0000 (07:29 -0500)]
Update parking_lot and smallvec to drop some dependencies

4 years agoIntroduce hir_ty
Aleksey Kladov [Tue, 26 Nov 2019 11:35:23 +0000 (14:35 +0300)]
Introduce hir_ty

4 years agoMerge #2409
bors[bot] [Tue, 26 Nov 2019 11:32:09 +0000 (11:32 +0000)]
Merge #2409

2409: Id-ify Ty::Adt r=matklad a=matklad

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