]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoMerge #2552
bors[bot] [Sat, 14 Dec 2019 17:20:18 +0000 (17:20 +0000)]
Merge #2552

2552: fix goto definition when inbetween tokens r=matklad a=succcubbus

fixes both goto_definition and goto_type_definition.
before, when running goto between some non-trivia token and an
identifier, goto would be attempted for the non-trivia token.
but this does not make sense for e.g. L_PAREN or COLONCOLON only for
IDENTs.

this resulted in goto actions not working when running them on the first
character of some identifier e.g. for `module::<|>method()` or
`method(<|>parameter)`.

now only IDENTs will be searched for in goto actions, though i'm not sure
if this is correct or if goto should also work for some other token types.

Co-authored-by: succcubbus <16743652+succcubbus@users.noreply.github.com>
4 years agoMerge #2554
bors[bot] [Sat, 14 Dec 2019 14:08:08 +0000 (14:08 +0000)]
Merge #2554

2554: Add macros for known names and paths r=matklad a=flodiebold

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
4 years agoMerge #2548
bors[bot] [Sat, 14 Dec 2019 11:57:49 +0000 (11:57 +0000)]
Merge #2548

2548: Support setting cargo features and resolve `default` features by default r=matklad a=oxalica

Fixes #2524

Co-authored-by: oxalica <oxalicc@pm.me>
4 years agoMerge #2557
bors[bot] [Fri, 13 Dec 2019 23:55:16 +0000 (23:55 +0000)]
Merge #2557

2557: Remove some unwraps in add_new r=flodiebold a=kjeremy

I think this file could probably be simplified a little more but this at least gets me around the panic.

Fixes #2556

Co-authored-by: kjeremy <kjeremy@gmail.com>
4 years agoRemove some unwraps in add_new
kjeremy [Fri, 13 Dec 2019 22:35:15 +0000 (17:35 -0500)]
Remove some unwraps in add_new

4 years agoUse path macro
Florian Diebold [Fri, 13 Dec 2019 21:32:44 +0000 (22:32 +0100)]
Use path macro

4 years agoRename N! to name!
Florian Diebold [Fri, 13 Dec 2019 21:01:06 +0000 (22:01 +0100)]
Rename N! to name!

4 years agoAdd macros for known names and paths
Florian Diebold [Fri, 13 Dec 2019 20:43:53 +0000 (21:43 +0100)]
Add macros for known names and paths

4 years agoMerge #2555
bors[bot] [Fri, 13 Dec 2019 21:17:41 +0000 (21:17 +0000)]
Merge #2555

2555: LSP 3.15 supports the deprecated tag on completions r=matklad a=kjeremy

So let's set it.

Co-authored-by: kjeremy <kjeremy@gmail.com>
4 years agoLSP 3.15 supports the deprecated tag on completions
kjeremy [Fri, 13 Dec 2019 21:08:47 +0000 (16:08 -0500)]
LSP 3.15 supports the deprecated tag on completions

4 years agofor goto and hover pick the token based on a priority
succcubbus [Fri, 13 Dec 2019 21:00:05 +0000 (22:00 +0100)]
for goto and hover pick the token based on a priority

4 years agoadd tests for goto on tuple fields
succcubbus [Fri, 13 Dec 2019 20:59:25 +0000 (21:59 +0100)]
add tests for goto on tuple fields

4 years agotry both surrounding tokens for hover
succcubbus [Fri, 13 Dec 2019 20:10:25 +0000 (21:10 +0100)]
try both surrounding tokens for hover

4 years agoMerge #2550
bors[bot] [Fri, 13 Dec 2019 19:49:01 +0000 (19:49 +0000)]
Merge #2550

2550: Infer - and ! using std::ops::{Neg, Not} r=flodiebold a=kiljacken

Found some low hanging fruit while taking a cursory look at index inferring.

Co-authored-by: Emil Lauridsen <mine809@gmail.com>
4 years agoadd failing test
succcubbus [Fri, 13 Dec 2019 18:54:07 +0000 (19:54 +0100)]
add failing test

4 years agouse find() instead of filter().next()
succcubbus [Fri, 13 Dec 2019 18:54:02 +0000 (19:54 +0100)]
use find() instead of filter().next()

4 years agofix goto definition when inbetween tokens
succcubbus [Fri, 13 Dec 2019 18:20:02 +0000 (19:20 +0100)]
fix goto definition when inbetween tokens

fixes both goto_definition and goto_type_definition.
before, when running goto between some non-trivia token and an
identifier, goto would be attempted for the non-trivia token.
but this does not make sense for e.g. L_PAREN or COLONCOLON only for
IDENTs. now only IDENTs will be searched for in goto actions.

4 years agoEnable `allFeatures` by default and fix lints
oxalica [Fri, 13 Dec 2019 16:48:47 +0000 (00:48 +0800)]
Enable `allFeatures` by default and fix lints

4 years agoMerge #2551
bors[bot] [Fri, 13 Dec 2019 14:02:26 +0000 (14:02 +0000)]
Merge #2551

2551: Refactor tt::Subtree delimiter r=matklad a=edwin0cheng

Refactor to :
```
#[derive(Debug, Clone, PartialEq, Eq, Hash, Default)]
pub struct Subtree {
    pub delimiter: Option<Delimiter>,
    pub token_trees: Vec<TokenTree>,
}

#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub enum Delimiter {
    Parenthesis,
    Brace,
    Bracket,
}
```

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
4 years agoRefactor tt::Delimiter
Edwin Cheng [Fri, 13 Dec 2019 13:53:34 +0000 (21:53 +0800)]
Refactor tt::Delimiter

4 years agoCorrectly infer - and ! using std::ops::{Neg,Not}
Emil Lauridsen [Fri, 13 Dec 2019 11:44:42 +0000 (12:44 +0100)]
Correctly infer - and ! using std::ops::{Neg,Not}

4 years agoAdd helper for resolving associated type of trait in infer
Emil Lauridsen [Fri, 13 Dec 2019 11:44:07 +0000 (12:44 +0100)]
Add helper for resolving associated type of trait in infer

4 years agoMerge #2544
bors[bot] [Fri, 13 Dec 2019 10:21:19 +0000 (10:21 +0000)]
Merge #2544

2544: Map first and last tokens in original_range r=matklad a=edwin0cheng

This PR try to fix the first part of the `original_range` : Try to map the first token and last token of a `SyntaxNode` , If success, return the union range of mapped tokens.

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
4 years agoSupport setting cargo features
oxalica [Fri, 13 Dec 2019 10:16:34 +0000 (18:16 +0800)]
Support setting cargo features

4 years agoMap first and last node in original_range
Edwin Cheng [Thu, 12 Dec 2019 18:39:14 +0000 (02:39 +0800)]
Map first and last node in original_range

4 years agoMerge #2543
bors[bot] [Thu, 12 Dec 2019 16:18:31 +0000 (16:18 +0000)]
Merge #2543

2543: Move use tree lowering to a separate module r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoCorrect obsolete comment
Aleksey Kladov [Thu, 12 Dec 2019 16:17:57 +0000 (17:17 +0100)]
Correct obsolete comment

4 years agoMove use tree lowering to a separate module
Aleksey Kladov [Thu, 12 Dec 2019 16:15:57 +0000 (17:15 +0100)]
Move use tree lowering to a separate module

4 years agoMerge #2540
bors[bot] [Thu, 12 Dec 2019 14:51:02 +0000 (14:51 +0000)]
Merge #2540

2540: Dedupe from_source impls r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoDedupe from_source impls
Aleksey Kladov [Thu, 12 Dec 2019 14:50:16 +0000 (15:50 +0100)]
Dedupe from_source impls

4 years agoMerge #2539
bors[bot] [Thu, 12 Dec 2019 14:20:02 +0000 (14:20 +0000)]
Merge #2539

2539: Remove old location infra r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoRemove old location infra
Aleksey Kladov [Thu, 12 Dec 2019 14:13:05 +0000 (15:13 +0100)]
Remove old location infra

4 years agoMove enum&union to new loc
Aleksey Kladov [Thu, 12 Dec 2019 14:11:57 +0000 (15:11 +0100)]
Move enum&union to new loc

4 years agoMove structs to new loc
Aleksey Kladov [Thu, 12 Dec 2019 13:58:04 +0000 (14:58 +0100)]
Move structs to new loc

4 years agoSimplify from_source
Aleksey Kladov [Thu, 12 Dec 2019 13:48:33 +0000 (14:48 +0100)]
Simplify from_source

4 years agoMove traits to the new loc
Aleksey Kladov [Thu, 12 Dec 2019 13:34:03 +0000 (14:34 +0100)]
Move traits to the new loc

4 years agoMerge #2537
bors[bot] [Thu, 12 Dec 2019 13:25:59 +0000 (13:25 +0000)]
Merge #2537

2537: Switch to the new location for impls r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoSwitch to the new location for impls
Aleksey Kladov [Thu, 12 Dec 2019 13:09:13 +0000 (14:09 +0100)]
Switch to the new location for impls

4 years agoMerge #2536
bors[bot] [Thu, 12 Dec 2019 13:12:02 +0000 (13:12 +0000)]
Merge #2536

2536: Avoid recompiling serde r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoAvoid recompiling serde
Aleksey Kladov [Thu, 12 Dec 2019 13:11:06 +0000 (14:11 +0100)]
Avoid recompiling serde

4 years agoMerge #2535
bors[bot] [Thu, 12 Dec 2019 12:57:43 +0000 (12:57 +0000)]
Merge #2535

2535: Do not trigger signature help on close r=matklad a=kjeremy

Brings us in line with TS.
Context: https://github.com/rust-analyzer/rust-analyzer/issues/2532#issuecomment-564994368

Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
4 years agoDo not trigger signature help on close
Jeremy Kolb [Thu, 12 Dec 2019 12:55:05 +0000 (07:55 -0500)]
Do not trigger signature help on close

4 years agoMerge #2530
bors[bot] [Wed, 11 Dec 2019 17:35:07 +0000 (17:35 +0000)]
Merge #2530

2530: Update lsp-types more r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoUpdate lsp-types more
Aleksey Kladov [Wed, 11 Dec 2019 17:34:22 +0000 (18:34 +0100)]
Update lsp-types more

4 years agoRevert "Revert "Support LSP 3.15""
Aleksey Kladov [Wed, 11 Dec 2019 17:34:01 +0000 (18:34 +0100)]
Revert "Revert "Support LSP 3.15""

This reverts commit 1e0bf205eff81f04c0e1e6c208c3489327520c3f.

4 years agoRevert "Support LSP 3.15"
Aleksey Kladov [Wed, 11 Dec 2019 17:27:34 +0000 (18:27 +0100)]
Revert "Support LSP 3.15"

This reverts commit 712700d8e027b108f9c4f8fa9acc2f25e453b6d1.

4 years agoMerge #2528
bors[bot] [Wed, 11 Dec 2019 16:38:22 +0000 (16:38 +0000)]
Merge #2528

2528: Revert "Support LSP 3.15" r=matklad a=matklad

Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoRevert "Support LSP 3.15"
Aleksey Kladov [Wed, 11 Dec 2019 16:37:32 +0000 (17:37 +0100)]
Revert "Support LSP 3.15"

This reverts commit fcccf8ec59420d20edc53f7d787f2412e297f5fe.

This causes rust-analyzer die immediatelly after startup

4 years agoSupport LSP 3.15
Jeremy Kolb [Wed, 11 Dec 2019 14:11:55 +0000 (09:11 -0500)]
Support LSP 3.15

This merely upgrades our protocol support. It does not add any of the new features.

4 years agoMerge #2527
bors[bot] [Wed, 11 Dec 2019 16:14:41 +0000 (16:14 +0000)]
Merge #2527

2527: Enable tsc builtin lint options  for vscode/extension r=matklad a=saneyuki

* These options are not enabled by `--strict` option and these options make a code more solid.
    * https://www.typescriptlang.org/docs/handbook/compiler-options.html
* For `noUnusedParameters` , we need to tweak tslint option to allow `_bar` style.

Co-authored-by: Tetsuharu OHZEKI <tetsuharu.ohzeki@gmail.com>
4 years agoEnable noFallthroughCasesInSwitch option for vscode extension
Tetsuharu OHZEKI [Wed, 11 Dec 2019 15:51:28 +0000 (00:51 +0900)]
Enable noFallthroughCasesInSwitch option for vscode extension

4 years agoEnable noImplicitReturns option for vscode extension
Tetsuharu OHZEKI [Wed, 11 Dec 2019 15:49:54 +0000 (00:49 +0900)]
Enable noImplicitReturns option for vscode extension

4 years agoEnable noUnusedParameters option for vscode extension
Tetsuharu OHZEKI [Wed, 11 Dec 2019 15:41:16 +0000 (00:41 +0900)]
Enable noUnusedParameters option for vscode extension

4 years agoMerge #2525
bors[bot] [Wed, 11 Dec 2019 15:15:34 +0000 (15:15 +0000)]
Merge #2525

2525: Use ES2018 for vscode extension r=matklad a=saneyuki

Today's latest vscode v1.40 (Node.jsv12.4/V8 v7.6) supports ES2018
features natively.

We don't have to transform codes to ES6.

Co-authored-by: Tetsuharu OHZEKI <tetsuharu.ohzeki@gmail.com>
4 years agoMerge #2526
bors[bot] [Wed, 11 Dec 2019 15:06:26 +0000 (15:06 +0000)]
Merge #2526

2526: Support LSP 3.15 r=matklad a=kjeremy

This merely upgrades our protocol support. It does not add any of the new features.

Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
4 years agoSupport LSP 3.15
Jeremy Kolb [Wed, 11 Dec 2019 14:11:55 +0000 (09:11 -0500)]
Support LSP 3.15

This merely upgrades our protocol support. It does not add any of the new features.

4 years agoUse ES2018 for vscode extension
Tetsuharu OHZEKI [Wed, 11 Dec 2019 13:40:26 +0000 (22:40 +0900)]
Use ES2018 for vscode extension

Today's latest vscode v1.40 (Node.jsv12.4/V8 v7.6) supports ES2018
features natively.

We don't have to transform codes to ES6.

4 years agoMerge #2523
bors[bot] [Wed, 11 Dec 2019 12:39:33 +0000 (12:39 +0000)]
Merge #2523

2523: Fixed #2250 r=matklad a=gab-umich

Bugfix Debriefing:

1. Tuple in type annotation expands correctly;
2. Expansion will prefer the following delimiter when possible. This involves modification of previous test cases to match current behaviour.
3. New regression tests added to verify the consistency between tuple expansion in type annotation and tuple expansion in rvalue. Both should behave exactly the same.

Co-authored-by: Gabriel Luo <luogm@umich.edu>
4 years agoFixed #2250
Gabriel Luo [Wed, 11 Dec 2019 03:18:05 +0000 (22:18 -0500)]
Fixed #2250

Tuple in type annotation expands correctly;
Expansion will prefer the following delimiter when possible.
New regression tests added to verify the consistency between tuple expansion in type annotation and tuple expansion in rvalue.

4 years agoMerge #2519
bors[bot] [Tue, 10 Dec 2019 12:53:35 +0000 (12:53 +0000)]
Merge #2519

2519: Build correct SourceAnalyzer for traits r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoBuild correct SourceAnalyzer for traits
Aleksey Kladov [Tue, 10 Dec 2019 12:52:04 +0000 (13:52 +0100)]
Build correct SourceAnalyzer for traits

4 years agoMerge #2516
bors[bot] [Mon, 9 Dec 2019 20:40:05 +0000 (20:40 +0000)]
Merge #2516

2516: chore: bump deps and use mainline chalk r=matklad a=lnicola

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
4 years agochore: bump deps and use mainline chalk
Laurențiu Nicola [Mon, 9 Dec 2019 20:35:47 +0000 (22:35 +0200)]
chore: bump deps and use mainline chalk

4 years agoMerge #2514
bors[bot] [Mon, 9 Dec 2019 19:31:27 +0000 (19:31 +0000)]
Merge #2514

2514: Code: enable prettier trailing commas r=matklad a=lnicola

See #2512.

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
4 years agoCode: enable prettier trailing commas
Laurențiu Nicola [Mon, 9 Dec 2019 18:57:55 +0000 (20:57 +0200)]
Code: enable prettier trailing commas

4 years agoMerge #2513
bors[bot] [Mon, 9 Dec 2019 18:47:00 +0000 (18:47 +0000)]
Merge #2513

2513: Report correct original range in goto_definition r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoReport correct original range in goto_definition
Aleksey Kladov [Mon, 9 Dec 2019 17:42:45 +0000 (18:42 +0100)]
Report correct original range in goto_definition

4 years agoAllow disabling sysroot
Aleksey Kladov [Mon, 9 Dec 2019 17:05:49 +0000 (18:05 +0100)]
Allow disabling sysroot

Might be helpful for debugging

4 years agoMerge #2511
bors[bot] [Mon, 9 Dec 2019 15:12:23 +0000 (15:12 +0000)]
Merge #2511

2511: Implement `ra_lsp_server --version` r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoImplement `ra_lsp_server --version`
Aleksey Kladov [Mon, 9 Dec 2019 14:59:04 +0000 (15:59 +0100)]
Implement `ra_lsp_server --version`

4 years agoMerge #2510
bors[bot] [Mon, 9 Dec 2019 14:27:42 +0000 (14:27 +0000)]
Merge #2510

2510: Add sourcemap for rollup and fix launch.json outfiles r=matklad a=edwin0cheng

Fix #2509

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
4 years agoAdd rollup sourcemap and fix launch.json
Edwin Cheng [Sun, 8 Dec 2019 19:58:43 +0000 (03:58 +0800)]
Add rollup sourcemap and fix launch.json

4 years agoMerge #2508
bors[bot] [Sun, 8 Dec 2019 19:32:24 +0000 (19:32 +0000)]
Merge #2508

2508: Code: don't check for ra_lsp_server on Windows r=matklad a=lnicola

Workaround for https://github.com/rust-analyzer/rust-analyzer/pull/2503#issuecomment-562980020.

~~(not yet tested on Windows)~~

We can't run `ra_lsp_server --version` right now because the server doesn't seem to handle arguments (so it hangs).

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
4 years agoCode: don't check for ra_lsp_server on Windows
Laurențiu Nicola [Sun, 8 Dec 2019 19:08:46 +0000 (21:08 +0200)]
Code: don't check for ra_lsp_server on Windows

4 years agoMerge #2507
bors[bot] [Sun, 8 Dec 2019 18:59:16 +0000 (18:59 +0000)]
Merge #2507

2507: Code: bump deps r=matklad a=lnicola

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
4 years agoCode: bump deps
Laurențiu Nicola [Sun, 8 Dec 2019 18:27:50 +0000 (20:27 +0200)]
Code: bump deps

4 years agoMerge #2500 #2505 #2506
bors[bot] [Sun, 8 Dec 2019 16:53:21 +0000 (16:53 +0000)]
Merge #2500 #2505 #2506

2500: Fix format_args expansion & go to definition r=matklad a=flodiebold

The expansion of format_args wasn't yet correct enough to type-check. Also make macros in statement position expand to expressions for now, since it's not handled correctly in HIR lowering yet. This finally fixes go to definition within print macros, I think :slightly_smiling_face:

2505: Remove more dead code r=matklad a=matklad

2506: Remove one more Ty r=matklad a=matklad

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoRemove one more Ty
Aleksey Kladov [Sun, 8 Dec 2019 16:50:43 +0000 (17:50 +0100)]
Remove one more Ty

4 years agoRemove more dead code
Aleksey Kladov [Sun, 8 Dec 2019 11:58:43 +0000 (12:58 +0100)]
Remove more dead code

4 years agoCleanup module structure
Aleksey Kladov [Sun, 8 Dec 2019 11:57:13 +0000 (12:57 +0100)]
Cleanup module structure

4 years agoMerge #2501 #2502 #2503
bors[bot] [Sun, 8 Dec 2019 16:44:29 +0000 (16:44 +0000)]
Merge #2501 #2502 #2503

2501: Fix coercion from &Foo to an inference variable in a reference r=matklad a=flodiebold

We didn't try to unify within the reference, but we should.

2502: Delay legacy macro expansion r=matklad a=edwin0cheng

This PR make the following changes:

* Delay legacy macro expansion such that we concentrated all item collecting macro expansion in one place.
* Add `MacroDirective` to replace 3-tuples
* After this refactoring, no macro is expanded recursively, hence we can remove the `MacroStackMonitor` and we handle the expansion limit by the fix-point loop count.

2503: Code: check whether the LSP binary is in PATH r=matklad a=lnicola

I'm not really sure about the TS changes. I just made a couple of functions async and it seems to work.

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
4 years agoMerge #2504
bors[bot] [Sun, 8 Dec 2019 16:36:11 +0000 (16:36 +0000)]
Merge #2504

2504: Use rustup toolchain install instead of rustup install r=matklad a=edwin0cheng

`rustup install` and `rustup uninstall` are going to be deprecated in rustup 1.21.0

See https://github.com/rust-lang/rustup/issues/2148

and https://www.reddit.com/r/rust/comments/e7rer9/we_need_your_help_before_rustup_1210_can_be/

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
4 years agoUse rustup toolchain instead of rustup install
Edwin Cheng [Sun, 8 Dec 2019 15:13:56 +0000 (23:13 +0800)]
Use rustup toolchain instead of rustup install

4 years agoCode: check whether the LSP binary is in PATH
Laurențiu Nicola [Sun, 8 Dec 2019 12:41:44 +0000 (14:41 +0200)]
Code: check whether the LSP binary is in PATH

4 years agoDelay legacy macro expansion
Edwin Cheng [Sun, 8 Dec 2019 12:33:42 +0000 (20:33 +0800)]
Delay legacy macro expansion

4 years agoFix coercion from &Foo to an inference variable in a reference
Florian Diebold [Sun, 8 Dec 2019 10:23:05 +0000 (11:23 +0100)]
Fix coercion from &Foo to an inference variable in a reference

We didn't try to unify within the reference, but we should.

4 years agoExpand macros in blocks to expressions for now
Florian Diebold [Sun, 8 Dec 2019 11:50:49 +0000 (12:50 +0100)]
Expand macros in blocks to expressions for now

Expanding to statements isn't handled properly yet and breaks things.

4 years agoFix range in goto_through_format test
Florian Diebold [Sun, 8 Dec 2019 10:22:39 +0000 (11:22 +0100)]
Fix range in goto_through_format test

4 years agoFix expansion of format_args
Florian Diebold [Sun, 8 Dec 2019 08:26:17 +0000 (09:26 +0100)]
Fix expansion of format_args

4 years agoMerge #2499
bors[bot] [Sun, 8 Dec 2019 11:52:43 +0000 (11:52 +0000)]
Merge #2499

2499: Remove ty from code_model r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoRemove dead code
Aleksey Kladov [Sun, 8 Dec 2019 11:51:25 +0000 (12:51 +0100)]
Remove dead code

4 years agoRemove ty from code_model
Aleksey Kladov [Sun, 8 Dec 2019 11:44:14 +0000 (12:44 +0100)]
Remove ty from code_model

4 years agoRemove bodies from code_model
Aleksey Kladov [Sun, 8 Dec 2019 11:27:21 +0000 (12:27 +0100)]
Remove bodies from code_model

4 years agoremove `infer` method from CodeModel
Aleksey Kladov [Sun, 8 Dec 2019 11:26:53 +0000 (12:26 +0100)]
remove `infer` method from CodeModel

4 years agoMerge #2498
bors[bot] [Sun, 8 Dec 2019 11:24:44 +0000 (11:24 +0000)]
Merge #2498

2498: Drop some unused methods r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoDrop some unused methods
Aleksey Kladov [Sun, 8 Dec 2019 11:20:59 +0000 (12:20 +0100)]
Drop some unused methods

4 years agoCleanup Field ty
Aleksey Kladov [Sun, 8 Dec 2019 11:16:57 +0000 (12:16 +0100)]
Cleanup Field ty

4 years agoCleanup Crate API
Aleksey Kladov [Sun, 8 Dec 2019 11:01:45 +0000 (12:01 +0100)]
Cleanup Crate API

4 years agoMerge #2466
bors[bot] [Sun, 8 Dec 2019 10:44:30 +0000 (10:44 +0000)]
Merge #2466

2466: Handle partial resolve cases r=matklad a=edwin0cheng

Another try to fix #2443 :

We resolve all imports every time in `DefCollector::collect` loop even it is resolved previously.
This is because other unresolved imports and macros will bring in another `PerNs`, so we can only assume that it has been partially resolved.

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
4 years agoMerge #2497
bors[bot] [Sun, 8 Dec 2019 10:35:30 +0000 (10:35 +0000)]
Merge #2497

2497: Remove MacroFileKind r=matklad a=edwin0cheng

This PR move `to_macro_file_kind` to `hir_expand::db` and use it to get the `FragmentKind` directly, such that we can remove `MacroFileKind`.

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>