]>
git.lizzy.rs Git - rust.git/log
Pavan Kumar Sunkara [Mon, 24 Aug 2020 08:25:19 +0000 (10:25 +0200)]
Add version to deps in cargo.toml
bors[bot] [Sat, 22 Aug 2020 14:41:17 +0000 (14:41 +0000)]
Merge #5823
5823: Don't underline function definition if self is &mut r=Nashenas88 a=matklad
The self is right there, and is already underlined, so it makes little
sense to emit even more underlines.
before:
![before](https://user-images.githubusercontent.com/
1711539 /
90672843 -
0d379500 -e257-11ea-840f-
b0caed4410f1 .png)
after:
![after](https://user-images.githubusercontent.com/
1711539 /
90672840 -
0c9efe80 -e257-11ea-9739-
23af433841c6 .png)
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
bors[bot] [Fri, 21 Aug 2020 19:47:22 +0000 (19:47 +0000)]
Merge #5839
5839: Dont ask me why... r=kjeremy a=Veetaha
Co-authored-by: Veetaha <veetaha2@gmail.com>
Veetaha [Fri, 21 Aug 2020 18:14:40 +0000 (21:14 +0300)]
Dont ask me why...
bors[bot] [Fri, 21 Aug 2020 17:15:09 +0000 (17:15 +0000)]
Merge #5838
5838: :arrow_up: autocfg
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Fri, 21 Aug 2020 17:14:44 +0000 (19:14 +0200)]
:arrow_up: autocfg
Aleksey Kladov [Fri, 21 Aug 2020 17:12:38 +0000 (19:12 +0200)]
:arrow_up: ungrammar
bors[bot] [Fri, 21 Aug 2020 11:21:05 +0000 (11:21 +0000)]
Merge #5835
5835: Switch to expect_test from crates.io
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Fri, 21 Aug 2020 11:19:31 +0000 (13:19 +0200)]
Switch to expect_test from crates.io
Aleksey Kladov [Fri, 21 Aug 2020 11:15:56 +0000 (13:15 +0200)]
Remove expect crate
bors[bot] [Thu, 20 Aug 2020 16:52:02 +0000 (16:52 +0000)]
Merge #5832
5832: Update crates r=kjeremy a=kjeremy
Co-authored-by: kjeremy <kjeremy@gmail.com>
kjeremy [Thu, 20 Aug 2020 16:50:43 +0000 (12:50 -0400)]
Update crates
bors[bot] [Wed, 19 Aug 2020 22:55:54 +0000 (22:55 +0000)]
Merge #5824
5824: Optimize reference search
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 19 Aug 2020 22:54:44 +0000 (00:54 +0200)]
Optimize reference search
bors[bot] [Wed, 19 Aug 2020 20:01:59 +0000 (20:01 +0000)]
Merge #5813
5813: Try lld r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 19 Aug 2020 18:06:04 +0000 (20:06 +0200)]
Use lld on winsows
Aleksey Kladov [Wed, 19 Aug 2020 18:02:33 +0000 (20:02 +0200)]
Don't underline function definition if self is &mut
The self is right there, and is already underlined, so it makes little
sense to emit even more underlines.
bors[bot] [Wed, 19 Aug 2020 17:56:19 +0000 (17:56 +0000)]
Merge #5822
5822: Remove dead code
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 19 Aug 2020 17:54:00 +0000 (19:54 +0200)]
Remove dead code
bors[bot] [Wed, 19 Aug 2020 17:49:36 +0000 (17:49 +0000)]
Merge #5821
5821: **Remove Unused Parameter** refactoring
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 19 Aug 2020 16:44:33 +0000 (18:44 +0200)]
**Remove Unused Parameter** refactoring
bors[bot] [Wed, 19 Aug 2020 17:00:01 +0000 (17:00 +0000)]
Merge #5820
5820: Future proof find-usages API
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 19 Aug 2020 16:58:48 +0000 (18:58 +0200)]
Future proof find-usages API
We might want to provide more efficient impls for check if usages
exist, limiting the search, filtering and cancellation, so let's
violate YAGNI a bit here.
bors[bot] [Wed, 19 Aug 2020 15:57:21 +0000 (15:57 +0000)]
Merge #5819
5819: Apply couple of rule of thumbs to simplify highlighting code
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 19 Aug 2020 15:53:41 +0000 (17:53 +0200)]
Apply couple of rule of thumbs to simplify highlighting code
Main one: instead of adding a parameter to function to handle special
case, make the caller handle it.
Second main one: make sure that function does a reasonable thing.
`highlight_def` picks a color for def, *regardless* of the context
the def is use. Feeding an info from the call-site muddies the
responsibilities here.
Minor smells, flagging the function as having space for improvement in
the first place:
* many parameters, some of which are set as constants on most
call-sites (introduce severalfunction instad)
* boolean param (add two functions instead)
bors[bot] [Wed, 19 Aug 2020 15:42:26 +0000 (15:42 +0000)]
Merge #5818
5818: Some trivial local simiplifications r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 19 Aug 2020 15:41:56 +0000 (17:41 +0200)]
Inline trivial function
Aleksey Kladov [Wed, 19 Aug 2020 15:37:19 +0000 (17:37 +0200)]
Simplify
Aleksey Kladov [Wed, 19 Aug 2020 15:33:25 +0000 (17:33 +0200)]
Minor
Aleksey Kladov [Wed, 19 Aug 2020 15:31:26 +0000 (17:31 +0200)]
Minor cleanups
Aleksey Kladov [Wed, 19 Aug 2020 15:30:43 +0000 (17:30 +0200)]
Better name
bors[bot] [Wed, 19 Aug 2020 15:03:35 +0000 (15:03 +0000)]
Merge #5817
5817: Better API factoring around self access modes
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 19 Aug 2020 15:02:50 +0000 (17:02 +0200)]
Better API factoring around self access modes
bors[bot] [Wed, 19 Aug 2020 14:34:36 +0000 (14:34 +0000)]
Merge #5816
5816: Better error if Cargo is not in Path
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 19 Aug 2020 14:34:11 +0000 (16:34 +0200)]
Better error if Cargo is not in Path
bors[bot] [Wed, 19 Aug 2020 14:05:22 +0000 (14:05 +0000)]
Merge #5815
5815: Introduce hir::Param
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 19 Aug 2020 14:04:11 +0000 (16:04 +0200)]
Introduce hir::Param
We generally shouldn't expose TypeRef out of hir. So, let's just use a
placehoder here.
bors[bot] [Wed, 19 Aug 2020 13:17:05 +0000 (13:17 +0000)]
Merge #5814
5814: Add SelfParam to code_model
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 19 Aug 2020 13:16:24 +0000 (15:16 +0200)]
Add SelfParam to code_model
bors[bot] [Wed, 19 Aug 2020 11:51:47 +0000 (11:51 +0000)]
Merge #5812
5812: Minor cleanups
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 19 Aug 2020 11:46:34 +0000 (13:46 +0200)]
Minor cleanups
bors[bot] [Wed, 19 Aug 2020 11:34:29 +0000 (11:34 +0000)]
Merge #5811
5811: Minor
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 19 Aug 2020 11:33:51 +0000 (13:33 +0200)]
Minor
bors[bot] [Wed, 19 Aug 2020 11:27:02 +0000 (11:27 +0000)]
Merge #5643
5643: Add new consuming modifier, apply consuming and mutable to methods r=matklad a=Nashenas88
This adds a new `consuming` semantic modifier for syntax highlighters.
This also emits `mutable` and `consuming` in two cases:
- When a method takes `&mut self`, then it now has `function.mutable` emitted.
- When a method takes `self`, and the type of `Self` is not `Copy`, then `function.consuming` is emitted.
CC @flodiebold
Co-authored-by: Paul Daniel Faria <Nashenas88@users.noreply.github.com>
bors[bot] [Tue, 18 Aug 2020 21:57:52 +0000 (21:57 +0000)]
Merge #5809
5809: :arrow_up: crates
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 18 Aug 2020 21:52:29 +0000 (23:52 +0200)]
:arrow_up: crates
bors[bot] [Tue, 18 Aug 2020 21:51:29 +0000 (21:51 +0000)]
Merge #5808
5808: Make RacyFlag actually work
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 18 Aug 2020 21:51:01 +0000 (23:51 +0200)]
Make RacyFlag actually work
bors[bot] [Tue, 18 Aug 2020 17:37:40 +0000 (17:37 +0000)]
Merge #5807
5807: Cleanup feature generation
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 18 Aug 2020 17:31:06 +0000 (19:31 +0200)]
Cleanup feature generation
bors[bot] [Tue, 18 Aug 2020 17:02:33 +0000 (17:02 +0000)]
Merge #5806
5806: Add GH Sposors to FUNDING.yml
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 18 Aug 2020 16:59:12 +0000 (18:59 +0200)]
Add GH Sposors to FUNDING.yml
bors[bot] [Tue, 18 Aug 2020 16:56:05 +0000 (16:56 +0000)]
Merge #5805
5805: Encourage rebases more
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 18 Aug 2020 16:52:12 +0000 (18:52 +0200)]
Encourage rebases more
bors[bot] [Tue, 18 Aug 2020 16:49:06 +0000 (16:49 +0000)]
Merge #5695
5695: Added completion for unstable features r=matklad a=Fihtangolz
Added xtask for downloading list of unstable features from the unstable book and codegen for it. Also included small changes from linter.
Co-authored-by: Dmitry <mamhigtt@gmail.com>
Co-authored-by: Dmitry Opokin <mamhigtt@gmail.com>
bors[bot] [Tue, 18 Aug 2020 16:40:12 +0000 (16:40 +0000)]
Merge #5804
5804: Add type safety to diagnostic codes
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 18 Aug 2020 16:39:43 +0000 (18:39 +0200)]
Add type safety to diagnostic codes
bors[bot] [Tue, 18 Aug 2020 15:45:37 +0000 (15:45 +0000)]
Merge #5801
5801: Speedup tests in dev mode
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 18 Aug 2020 15:44:51 +0000 (17:44 +0200)]
Speedup tests in dev mode
bors[bot] [Tue, 18 Aug 2020 15:22:12 +0000 (15:22 +0000)]
Merge #5800
5800: Speedup ty tests
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 18 Aug 2020 15:20:10 +0000 (17:20 +0200)]
Speedup ty tests
Closes #5792
bors[bot] [Tue, 18 Aug 2020 14:51:10 +0000 (14:51 +0000)]
Merge #5798
5798: Introduce Label
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 18 Aug 2020 14:41:21 +0000 (16:41 +0200)]
Introduce Label
bors[bot] [Tue, 18 Aug 2020 14:22:36 +0000 (14:22 +0000)]
Merge #5797
5797: Minor
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 18 Aug 2020 14:22:01 +0000 (16:22 +0200)]
Minor
bors[bot] [Tue, 18 Aug 2020 14:12:00 +0000 (14:12 +0000)]
Merge #5796
5796: Align diagnostics config with the rest of rust-analyzer
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 18 Aug 2020 14:03:15 +0000 (16:03 +0200)]
Align diagnostics config with the rest of rust-analyzer
Dmitry [Tue, 18 Aug 2020 12:51:04 +0000 (19:51 +0700)]
fmt
Dmitry [Tue, 18 Aug 2020 12:42:12 +0000 (19:42 +0700)]
fix reformat
Dmitry [Tue, 18 Aug 2020 12:37:22 +0000 (19:37 +0700)]
Merge remote-tracking branch 'rust-analyzer/master'
bors[bot] [Tue, 18 Aug 2020 12:32:32 +0000 (12:32 +0000)]
Merge #5794
5794: Simplify building a symbol hierarchy
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 18 Aug 2020 12:31:50 +0000 (14:31 +0200)]
Add default names section
Aleksey Kladov [Tue, 18 Aug 2020 12:27:17 +0000 (14:27 +0200)]
Simplify building a symbol hierarchy
bors[bot] [Tue, 18 Aug 2020 12:04:49 +0000 (12:04 +0000)]
Merge #5682
5682: Add an option to disable diagnostics r=matklad a=popzxc
As far as I know, currently it's not possible to disable a selected type of diagnostics provided by `rust-analyzer`.
This causes an inconvenient situation with a false-positive warnings: you either have to disable all the diagnostics, or you have to ignore these warnings.
There are some open issues related to this problem, e.g.: https://github.com/rust-analyzer/rust-analyzer/issues/5412, https://github.com/rust-analyzer/rust-analyzer/issues/5502
This PR attempts to make it possible to selectively disable some diagnostics on per-project basis.
Co-authored-by: Igor Aleksanov <popzxc@yandex.ru>
bors[bot] [Tue, 18 Aug 2020 11:58:02 +0000 (11:58 +0000)]
Merge #5687
5687: Fix document symbols order r=matklad a=magurotuna
Resolves #5655
And adds tests for `handle_document_symbol`, both with `hierarchical_symbols` enabled and with it disabled.
Previously document symbols were displayed in reverse order in sublime text with its LSP plugin, but this patch fixes it like this:
![image](https://user-images.githubusercontent.com/
23649474 /
89709020 -
fbccce00 -d9b6-11ea-83b0-
c88dc9f7977f .png)
Co-authored-by: Yusuke Tanaka <yusuktan@maguro.dev>
bors[bot] [Tue, 18 Aug 2020 11:20:54 +0000 (11:20 +0000)]
Merge #5793
5793: Minor
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 18 Aug 2020 11:20:17 +0000 (13:20 +0200)]
Minor
bors[bot] [Tue, 18 Aug 2020 10:52:27 +0000 (10:52 +0000)]
Merge #5758
5758: SSR: Explicitly autoderef and ref placeholders as needed r=matklad a=davidlattimore
Structural search replace now inserts *, & and &mut in the replacement to match any auto[de]ref in the matched code.
e.g. `$a.foo() ==>> bar($a)` might convert `x.foo()` to `bar(&mut x)`
Co-authored-by: David Lattimore <dml@google.com>
David Lattimore [Tue, 18 Aug 2020 10:39:55 +0000 (20:39 +1000)]
SSR: A few small refactorings
Igor Aleksanov [Tue, 18 Aug 2020 10:35:36 +0000 (13:35 +0300)]
Move analysis config structure to the config.rs
Igor Aleksanov [Tue, 18 Aug 2020 10:32:29 +0000 (13:32 +0300)]
Make disabled diagnostics an argument of corresponding function
bors[bot] [Tue, 18 Aug 2020 09:21:11 +0000 (09:21 +0000)]
Merge #5791
5791: :arrow_up: crates
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 18 Aug 2020 08:49:18 +0000 (10:49 +0200)]
:arrow_up: crates
Aleksey Kladov [Tue, 18 Aug 2020 09:19:44 +0000 (11:19 +0200)]
Remove usless pre-cache task
We are not cleaning the rest of xtask artifacts, so this effectively
does nothing. xtask is small and changes rarely, so this shouldn't
really matter.
bors[bot] [Tue, 18 Aug 2020 09:08:00 +0000 (09:08 +0000)]
Merge #5790
5790: Revive cache cleaning
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 18 Aug 2020 08:38:57 +0000 (10:38 +0200)]
Revive cache cleaning
The idea here is that, on CI, we only want to cache crates.io
dependencies, and not local crates. This keeps the size of the cache
low, and also improves performance, as network and moving files on
disk (on Windows) can be slow.
Aleksey Kladov [Tue, 18 Aug 2020 07:38:32 +0000 (09:38 +0200)]
Re-enable mac build
bors[bot] [Tue, 18 Aug 2020 07:25:57 +0000 (07:25 +0000)]
Merge #5787
5787: Fix missing match arm false positive r=matklad a=CAD97
If the type of the match expression is `{unknown}`, don't do exhaustiveness checks, as it could be an uninhabited type.
Co-authored-by: CAD97 <cad97@cad97.com>
CAD97 [Mon, 17 Aug 2020 17:27:12 +0000 (13:27 -0400)]
Fix missing match arm false error on unknown type
CAD97 [Mon, 17 Aug 2020 17:19:15 +0000 (13:19 -0400)]
Document missing match arm false positive
This should already be guarded against
(https://github.com/rust-analyzer/rust-analyzer/blob/
d2212a49f6d447a14cdc87a9de2a4844e78b6905 /crates/hir_ty/src/diagnostics/expr.rs#L225-L230)
but it isn't preventing this false positive for some reason.
bors[bot] [Mon, 17 Aug 2020 14:30:24 +0000 (14:30 +0000)]
Merge #5776 #5780
5776: Fix eslint errors on .eslintrc.js and rollup.config.js r=matklad a=fuafa
Eslint complains if these two files does not include in the `tsconfig.json`.
```
Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: .eslintrc.js.
The file must be included in at least one of the projects provided.eslint
```
![image](https://user-images.githubusercontent.com/
20750310 /
90338269 -
176d4f80 -e01b-11ea-8710-
3ea817b235d2 .png)
5780: Fixup whitespace when adding missing impl items r=matklad a=jDomantas
Generate properly formatted whitespace when adding impl items - with an empty line between items and removing extra whitespace that often appears at the end.
This is my first time working on rust analyzer so I'm not very familiar with its internal APIs. If there's a better way to do such syntax tree editing I'd be glad to hear it.
Co-authored-by: xiaofa <xiaofalzx@gmail.com>
Co-authored-by: jDomantas <djadenkus@gmail.com>
bors[bot] [Mon, 17 Aug 2020 14:23:03 +0000 (14:23 +0000)]
Merge #5782
5782: Fix StatusNotification r=matklad a=vsrs
This PR fixes the following:
As per specification `params` property in [NotificationMessage ](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#notificationMessage) should be `array | object` while RA uses `"loading" | "ready" | "invalid" | "needsReload"`.
Co-authored-by: vsrs <vit@conrlab.com>
bors[bot] [Mon, 17 Aug 2020 14:13:07 +0000 (14:13 +0000)]
Merge #5785
5785: Don't make fields private unless you have to
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Mon, 17 Aug 2020 14:11:29 +0000 (16:11 +0200)]
Don't make fields private unless you have to
bors[bot] [Mon, 17 Aug 2020 13:50:13 +0000 (13:50 +0000)]
Merge #5784
5784: Mention that generated .adocs are generaterd
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Mon, 17 Aug 2020 13:49:46 +0000 (15:49 +0200)]
Mention that generated .adocs are generaterd
vsrs [Mon, 17 Aug 2020 11:56:27 +0000 (14:56 +0300)]
Fix StatusNotification
jDomantas [Mon, 17 Aug 2020 08:36:46 +0000 (11:36 +0300)]
format
jDomantas [Mon, 17 Aug 2020 07:47:13 +0000 (10:47 +0300)]
update generated tests
bors[bot] [Sun, 16 Aug 2020 20:03:06 +0000 (20:03 +0000)]
Merge #5766
5766: Hacky support for fn-like proc macros r=matklad a=jonas-schievink
It turns out that this is all that's needed to get something like this working:
```rust
#[proc_macro]
pub fn function_like_macro(_args: TokenStream) -> TokenStream {
TokenStream::from_str("fn fn_success() {}").unwrap()
}
```
```rust
function_like_macro!();
fn f() {
fn_success();
}
```
The drawback is that it also makes this work, because there is no distinction between different proc macro kinds in the rest of r-a:
```rust
#[derive(function_like_macro)]
struct S {}
fn f() {
fn_success();
}
```
Another issue is that it seems to panic, and then panic, when using this on the rustc code base, due to some issue in the inscrutable proc macro bridge code.
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>