Commit Graph

7832 Commits

Author SHA1 Message Date
bors[bot]
32246b91c2
Merge #5664
5664: Fix renamed self module. r=jonas-schievink a=Nashenas88

Fixes #5663 

Now `inner_mod` below is properly marked as a `module`.
```rust
use crate::inner::{self as inner_mod};
mod inner {}
```

Co-authored-by: Paul Daniel Faria <Nashenas88@users.noreply.github.com>
2020-08-05 16:56:39 +00:00
Aleksey Kladov
edd4a83ee3 Use salsa's purge to account for all memory 2020-08-05 15:28:20 +02:00
Aleksey Kladov
ffe4a5e114 Fix relative path handling for custom rustfmt
`current_dir` and relative paths to executables works differently on
unix and windows (unix behavior does not make sense), see:

17e30e83a1/src/lib.rs (L295-L324)

The original motivation to set cwd was to make rustfmt read the
correct rustfmt.toml, but that was future proofing, rather than a bug
fix.

So, let's just remove this and see if breaks or fixes more use-cases.

If support for per-file config is needed, we could use `--config-path`
flag.
2020-08-05 13:20:36 +02:00
Paul Daniel Faria
4e2e3543c7 When resolving a rename, fallback to the name higher in the use tree if the path segment is self 2020-08-04 09:28:40 -04:00
Paul Daniel Faria
cc3eb85311 Add test showing unresolved module rename 2020-08-04 09:26:38 -04:00
bors[bot]
af6e9a7eb3
Merge #5658
5658: do not add to `pub use` in assists that insert a use statement r=jonas-schievink a=jbr

closes #5657 , see issue for rationale

Initially I wrote a version of this that changed the signature of `insert_use_statement` to take an `Option<VisibilityKind>` and only add to use statements with the same visibility, but that didn't make sense for any of the current uses of `insert_use_statement` (they all expected private visibility).

Co-authored-by: Jacob Rothstein <hi@jbr.me>
2020-08-04 12:47:11 +00:00
Michael Lazear
2e72e74dbd Revert "Restore line index micro-optimization"
This reverts commit 83a87fcd11.
2020-08-03 13:35:32 -07:00
Jacob Rothstein
03a61134f2
do not add to pub use statements 2020-08-03 12:17:05 -07:00
bors[bot]
33e53d4721
Merge #5653
5653: Fold trait declarations r=SomeoneToIgnore a=lnicola

Fixes #5652

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2020-08-03 17:25:26 +00:00
Laurențiu Nicola
f1bbc776c0 Fold trait declarations 2020-08-03 15:45:39 +03:00
bors[bot]
f17d2d1289
Merge #5628
5628: Rename test modules r=matklad a=lnicola



Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2020-08-03 11:47:56 +00:00
bors[bot]
e4d0f19b01
Merge #5638
5638: Simplify argument parsing r=matklad a=lnicola

and use `Display` when printing errors.

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2020-08-01 16:47:51 +00:00
Laurențiu Nicola
562491b16b Simplify argument parsing 2020-08-01 19:31:14 +03:00
Aleksey Kladov
bff8dd0949 Update grammar 2020-08-01 13:47:19 +02:00
Aleksey Kladov
8cf19847dd Finish rename 2020-07-31 22:04:12 +02:00
Aleksey Kladov
b9c6aa9ec9 Unify naming of tuple fields 2020-07-31 22:04:12 +02:00
Aleksey Kladov
22d295ceaa Rename DotDotPat -> RestPat 2020-07-31 21:45:29 +02:00
Aleksey Kladov
af53d5f4b0 Rename 2020-07-31 20:23:52 +02:00
Aleksey Kladov
81359af733 Simplify trait gramamr 2020-07-31 20:22:20 +02:00
Aleksey Kladov
9818108798 Rename BindPat -> IdentPat 2020-07-31 20:12:10 +02:00
Aleksey Kladov
6791eb9685 Rename PalceholderPat -> WildcardPat 2020-07-31 20:07:21 +02:00
Aleksey Kladov
d7f75db90d Reorder 2020-07-31 20:04:40 +02:00
Aleksey Kladov
14cb96ec0e Allign RecordPat with RecordExpr 2020-07-31 20:00:48 +02:00
Aleksey Kladov
572f1c08b6 Minor gramamr reorder 2020-07-31 19:49:26 +02:00
bors[bot]
5cade89d73
Merge #5630
5630: Remove dead code r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-31 16:56:57 +00:00
Aleksey Kladov
45e6052406 Remove dead code 2020-07-31 18:53:10 +02:00
Aleksey Kladov
c1c97b2896 Fix leading colon 2020-07-31 18:49:42 +02:00
Aleksey Kladov
ddf08daddf Fix const arguments grammar 2020-07-31 18:46:07 +02:00
Aleksey Kladov
040b4c800d Fix GenericArgs grammar 2020-07-31 18:41:37 +02:00
Laurențiu Nicola
e5d7b003af Rename test modules 2020-07-31 19:30:37 +03:00
Aleksey Kladov
91781c7ce8 Rename TypeArgList -> GenericArgList 2020-07-31 18:29:29 +02:00
Aleksey Kladov
54fd09a9ca Finalize Path grammar 2020-07-31 18:27:23 +02:00
Aleksey Kladov
7980a7e19a Minor 2020-07-31 18:10:46 +02:00
Aleksey Kladov
633aace411 Rename LambdaExpr -> ClosureExpr 2020-07-31 17:08:58 +02:00
Aleksey Kladov
bfcee63e75 Work on expressions grammar 2020-07-31 16:52:08 +02:00
Aleksey Kladov
d4d986c7f8 Item is a Stmt 2020-07-31 15:51:01 +02:00
Aleksey Kladov
a7ca6583fb Handwrite Stmt 2020-07-31 15:40:48 +02:00
Aleksey Kladov
4d38b0dce1 Move Stmt Grammar 2020-07-31 15:27:40 +02:00
Aleksey Kladov
b250ae6c55 Finalize TypeBound grammar 2020-07-31 15:01:18 +02:00
Aleksey Kladov
a6527ed92c "Finalize" Types grammar
Note that `for` type is rust-analyzer's own invention.
Both the reference and syn allow `for` only for fnptr types, and we
allow them everywhere. This needs to be checked with respect to type
bounds grammar...
2020-07-31 14:40:28 +02:00
Aleksey Kladov
a6e45c6c69 Reame PlaceholderType -> InferType 2020-07-31 14:12:51 +02:00
Aleksey Kladov
08ea2271e8 Rename TypeRef -> Type
The TypeRef name comes from IntelliJ days, where you often have both
type *syntax* as well as *semantical* representation of types in
scope. And naming both Type is confusing.

In rust-analyzer however, we use ast types as `ast::Type`, and have
many more semantic counterparts to ast types, so avoiding name clash
here is just confusing.
2020-07-31 12:14:37 +02:00
bors[bot]
6b7cb8b5ab
Merge #5596
5596: Add checkOnSave.noDefaultFeatures and correct, how we handle some cargo flags. r=clemenswasser a=clemenswasser

This PR adds the `rust-analyzer.checkOnSave.noDefaultFeatures` option
and fixes the handling of `cargo.allFeatures`, `cargo.noDefaultFeatures` and `cargo.features`.
Fixes: #5550 

Co-authored-by: Clemens Wasser <clemens.wasser@gmail.com>
2020-07-30 21:23:41 +00:00
bors[bot]
7d18109af4
Merge #5615
5615: simplify r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-30 20:58:20 +00:00
Aleksey Kladov
848f446a5a simplify 2020-07-30 22:56:43 +02:00
bors[bot]
43d8142214
Merge #5614
5614: Use split_once polyfill r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-30 20:38:58 +00:00
Aleksey Kladov
cd9f863b01 Use CmdArgs pattern for bench & analysis stats 2020-07-30 22:38:24 +02:00
Aleksey Kladov
be49547b44 Use split_once polyfill 2020-07-30 22:23:12 +02:00
bors[bot]
08d18e0edd
Merge #5610
5610: Bump deps r=flodiebold a=lnicola



Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2020-07-30 20:10:07 +00:00
Laurențiu Nicola
797cdb00d9 Bump chalk 2020-07-30 23:09:07 +03:00