]>
git.lizzy.rs Git - rust.git/log
Aleksey Kladov [Thu, 13 Aug 2020 08:52:31 +0000 (10:52 +0200)]
Merge pull request #5738 from matklad/cfg
Rename ra_cfg -> cfg
Aleksey Kladov [Thu, 13 Aug 2020 08:32:19 +0000 (10:32 +0200)]
fmt
Aleksey Kladov [Thu, 13 Aug 2020 08:19:09 +0000 (10:19 +0200)]
Rename ra_cfg -> cfg
Aleksey Kladov [Thu, 13 Aug 2020 08:17:59 +0000 (10:17 +0200)]
Simplify
Aleksey Kladov [Thu, 13 Aug 2020 08:15:45 +0000 (10:15 +0200)]
Minimize deps
Aleksey Kladov [Thu, 13 Aug 2020 08:08:11 +0000 (10:08 +0200)]
Rename ra_mbe -> mbe
Aleksey Kladov [Thu, 13 Aug 2020 08:04:55 +0000 (10:04 +0200)]
:arrow_up: crates
Aleksey Kladov [Thu, 13 Aug 2020 08:04:37 +0000 (10:04 +0200)]
Minor
Aleksey Kladov [Thu, 13 Aug 2020 08:35:11 +0000 (10:35 +0200)]
Disabe macros TypeSCript builder
It hangs for some reason, and we are moving TS extension anyways...
Aleksey Kladov [Thu, 13 Aug 2020 08:03:01 +0000 (10:03 +0200)]
Merge pull request #5734 from pksunkara/ra_proc_macro_srv
Rename ra_proc_macro_srv -> proc_macro_srv
Pavan Kumar Sunkara [Thu, 13 Aug 2020 00:57:26 +0000 (02:57 +0200)]
Rename ra_proc_macro_srv -> proc_macro_srv
bors[bot] [Wed, 12 Aug 2020 16:59:40 +0000 (16:59 +0000)]
Merge #5730
5730: **Merge Imports** assist handles self
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 12 Aug 2020 16:49:43 +0000 (18:49 +0200)]
**Merge Imports** assist handles self
bors[bot] [Wed, 12 Aug 2020 16:31:42 +0000 (16:31 +0000)]
Merge #5729
5729: Rename ra_syntax -> syntax
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 12 Aug 2020 16:26:51 +0000 (18:26 +0200)]
Rename ra_syntax -> syntax
bors[bot] [Wed, 12 Aug 2020 15:15:00 +0000 (15:15 +0000)]
Merge #5727
5727: Rename ra_parser -> parser
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 12 Aug 2020 15:06:49 +0000 (17:06 +0200)]
Rename ra_parser -> parser
bors[bot] [Wed, 12 Aug 2020 15:04:52 +0000 (15:04 +0000)]
Merge #5726
5726: Rename ra_text_edit -> text_edit
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 12 Aug 2020 15:03:06 +0000 (17:03 +0200)]
Rename ra_text_edit -> text_edit
Aleksey Kladov [Wed, 12 Aug 2020 14:58:56 +0000 (16:58 +0200)]
Cleanup TextEdit API
Aleksey Kladov [Wed, 12 Aug 2020 14:52:28 +0000 (16:52 +0200)]
Rename ra_toolchain -> toolchain
bors[bot] [Wed, 12 Aug 2020 14:49:48 +0000 (14:49 +0000)]
Merge #5725
5725: Rename ra_tt -> tt
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 12 Aug 2020 14:46:20 +0000 (16:46 +0200)]
Rename ra_tt -> tt
bors[bot] [Wed, 12 Aug 2020 14:36:01 +0000 (14:36 +0000)]
Merge #5724
5724: Rename ra_prof -> profile
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 12 Aug 2020 14:32:36 +0000 (16:32 +0200)]
Rename ra_prof -> profile
Aleksey Kladov [Wed, 12 Aug 2020 14:22:05 +0000 (16:22 +0200)]
Rename ra_arena
bors[bot] [Wed, 12 Aug 2020 13:57:14 +0000 (13:57 +0000)]
Merge #5723
5723: Completely remove cargo audit
My current feeling is that the build maintenance friction it creates
is not proportional to the benefits it provides.
We are pretty frugal with the set of Rust dependencies, and our
security model is we r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 12 Aug 2020 13:54:39 +0000 (15:54 +0200)]
Completely remove cargo audit
My current feeling is that the build maintenance friction it creates
is not proportional to the benefits it provides.
We are pretty frugal with the set of Rust dependencies, and our
security model is "we run build.rs and proc macros", so it doesn't
seem like cargo audit could help us much.
bors[bot] [Wed, 12 Aug 2020 13:50:34 +0000 (13:50 +0000)]
Merge #5637
5637: SSR: Matching trait associated constants, types and functions r=matklad a=davidlattimore
This fixes matching of things like `HashMap::default()` by resolving `HashMap` instead of `default` (which resolves to `Default::default`).
Same for associated constants and types that are part of a trait implementation.
However, we still don't support matching calls to trait methods.
Co-authored-by: David Lattimore <dml@google.com>
bors[bot] [Wed, 12 Aug 2020 13:44:13 +0000 (13:44 +0000)]
Merge #5553
5553: Add fix ranges for diagnostics r=matklad a=SomeoneToIgnore
A follow-up of https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/Less.20red.20in.20the.20code
Now diagnostics can apply fixes in a range that's different from the range used to highlight the diagnostics.
Previous logic did not consider the fix range, having both ranges equal, which could cause a lot of red noise in the editor.
Now, the fix range gets used with the fix, the diagnostics range is used for everything else which allows to improve the error highlighting.
before:
<img width="191" alt="image" src="https://user-images.githubusercontent.com/
2690773 /
88590727 -
df9a6a00 -d063-11ea-97ed-
9809c1c5e6e6 .png">
after:
<img width="222" alt="image" src="https://user-images.githubusercontent.com/
2690773 /
88590734 -
e1fcc400 -d063-11ea-9b7c-
25701cbd5352 .png">
`MissingFields` and `MissingPatFields` diagnostics now have the fix range as `ast::RecordFieldList` of the expression with an error (as it was before this PR), and the diagnostics range as a `ast::Path` of the expression, if it's present (do you have any example of `ast::Expr::RecordLit` that has no path btw?).
The rest of the diagnostics have both ranges equal, same as it was before this PR.
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
bors[bot] [Wed, 12 Aug 2020 13:20:18 +0000 (13:20 +0000)]
Merge #4743
4743: Add tracking of packed repr, use it to highlight unsafe refs r=matklad a=Nashenas88
Taking a reference to a misaligned field on a packed struct is an
unsafe operation. Highlight that behavior. Currently, the misaligned
part isn't tracked, so this highlight is a bit too aggressive.
Fixes #4600
Co-authored-by: Paul Daniel Faria <Nashenas88@users.noreply.github.com>
Co-authored-by: Paul Daniel Faria <nashenas88@users.noreply.github.com>
Co-authored-by: Paul Daniel Faria <paulf@pop-os.localdomain>
bors[bot] [Wed, 12 Aug 2020 13:06:38 +0000 (13:06 +0000)]
Merge #5722
5722: Replace SepBy with Itertools
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 12 Aug 2020 13:04:06 +0000 (15:04 +0200)]
Replace SepBy with Itertools
bors[bot] [Wed, 12 Aug 2020 12:53:11 +0000 (12:53 +0000)]
Merge #5721
5721: Cleanup parser modifiers tests
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 12 Aug 2020 12:52:37 +0000 (14:52 +0200)]
Cleanup parser modifiers tests
Aleksey Kladov [Wed, 12 Aug 2020 12:26:36 +0000 (14:26 +0200)]
Allow default everywhere
closes #5681
bors[bot] [Wed, 12 Aug 2020 11:59:02 +0000 (11:59 +0000)]
Merge #5720
5720: Fix docs
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 12 Aug 2020 11:56:58 +0000 (13:56 +0200)]
Fix docs
bors[bot] [Wed, 12 Aug 2020 11:51:53 +0000 (11:51 +0000)]
Merge #5699
5699: Fix clippy warnings r=matklad a=popzxc
Currently clippy spawns a bunch of warnings on the `rust-analyzer` project. Nothing critical, but easy to fix, so I guess it won't harm.
Co-authored-by: Igor Aleksanov <popzxc@yandex.ru>
Igor Aleksanov [Wed, 12 Aug 2020 11:08:55 +0000 (14:08 +0300)]
Revert style preference-related fixes
bors[bot] [Wed, 12 Aug 2020 11:04:06 +0000 (11:04 +0000)]
Merge #5719
5719: Minor
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 12 Aug 2020 11:03:43 +0000 (13:03 +0200)]
Minor
bors[bot] [Wed, 12 Aug 2020 10:51:02 +0000 (10:51 +0000)]
Merge #5718
5718: Deny clippy
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 12 Aug 2020 10:45:38 +0000 (12:45 +0200)]
Deny clippy
bors[bot] [Wed, 12 Aug 2020 10:35:18 +0000 (10:35 +0000)]
Merge #5717
5717: Minor
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Jonas Schievink [Wed, 12 Aug 2020 10:31:17 +0000 (12:31 +0200)]
Merge pull request #5716 from jonas-schievink/musl
Fix build on musl and test it in CI
Jonas Schievink [Wed, 12 Aug 2020 09:49:49 +0000 (11:49 +0200)]
Fix build on musl and test it in CI
Aleksey Kladov [Wed, 12 Aug 2020 10:21:03 +0000 (12:21 +0200)]
Minor
bors[bot] [Wed, 12 Aug 2020 10:00:08 +0000 (10:00 +0000)]
Merge #5711
5711: Display snippet in the completion label r=matklad a=SomeoneToIgnore
Before, the completion did not show the actual snippet and it was hard to understand what to input to get the right snippet:
<img width="467" alt="image" src="https://user-images.githubusercontent.com/
2690773 /
89941040 -
21f6a600 -dc23-11ea-94b8-
61f77f88feaf .png">
<img width="367" alt="image" src="https://user-images.githubusercontent.com/
2690773 /
89941046 -
23c06980 -dc23-11ea-8034-
6c4e14357c94 .png">
Now it's more clear:
<img width="315" alt="image" src="https://user-images.githubusercontent.com/
2690773 /
89941124 -
42befb80 -dc23-11ea-9fcc-
5fd49cc92b74 .png">
<img width="210" alt="image" src="https://user-images.githubusercontent.com/
2690773 /
89941132 -
4488bf00 -dc23-11ea-99c2-
12ec66e0a044 .png">
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
bors[bot] [Wed, 12 Aug 2020 08:21:19 +0000 (08:21 +0000)]
Merge #5715
5715: Simplify
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 12 Aug 2020 08:14:08 +0000 (10:14 +0200)]
Simplify
Kirill Bulatov [Tue, 11 Aug 2020 19:33:17 +0000 (22:33 +0300)]
Display snippet in the completion label
Kirill Bulatov [Tue, 11 Aug 2020 14:15:11 +0000 (17:15 +0300)]
Better naming and docs
Kirill Bulatov [Tue, 11 Aug 2020 14:13:40 +0000 (17:13 +0300)]
Simplify fix structure
Kirill Bulatov [Tue, 11 Aug 2020 12:08:55 +0000 (15:08 +0300)]
Add rustdocs
Kirill Bulatov [Mon, 10 Aug 2020 21:55:57 +0000 (00:55 +0300)]
Improve the ide diagnostics trait API
Kirill Bulatov [Mon, 10 Aug 2020 21:37:23 +0000 (00:37 +0300)]
Move the DiagnosticsWithFix trait on the ide level
Kirill Bulatov [Mon, 10 Aug 2020 19:53:10 +0000 (22:53 +0300)]
Make the fix AST source Optional
Kirill Bulatov [Sat, 8 Aug 2020 22:59:26 +0000 (01:59 +0300)]
Refactor the diagnostics
Kirill Bulatov [Tue, 28 Jul 2020 07:24:59 +0000 (10:24 +0300)]
Require source implementations for Diagnostic
Kirill Bulatov [Mon, 27 Jul 2020 20:56:57 +0000 (23:56 +0300)]
Restore accidentally removed public method
Kirill Bulatov [Mon, 27 Jul 2020 20:32:16 +0000 (23:32 +0300)]
Fix another missing fields diagnostics
Kirill Bulatov [Mon, 27 Jul 2020 19:46:25 +0000 (22:46 +0300)]
Better naming
Kirill Bulatov [Mon, 27 Jul 2020 19:30:55 +0000 (22:30 +0300)]
Less stubs
Kirill Bulatov [Mon, 27 Jul 2020 15:45:08 +0000 (18:45 +0300)]
Custom ranges for missing fields
Kirill Bulatov [Mon, 27 Jul 2020 12:53:57 +0000 (15:53 +0300)]
Separate diagnostics and diagnostics fix ranges
bors[bot] [Tue, 11 Aug 2020 10:30:39 +0000 (10:30 +0000)]
Merge #5708
5708: Use Hygiene in completion r=jonas-schievink a=lnicola
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
bors[bot] [Tue, 11 Aug 2020 10:22:57 +0000 (10:22 +0000)]
Merge #5707
5707: Address some FIXMEs for ra_assists r=jonas-schievink a=JmPotato
Signed-off-by: JmPotato <ghzpotato@gmail.com>
Co-authored-by: JmPotato <ghzpotato@gmail.com>
bors[bot] [Tue, 11 Aug 2020 10:15:46 +0000 (10:15 +0000)]
Merge #5705
5705: Log the command flycheck runs to debug misconfigurations r=jonas-schievink a=Veetaha
Without this users have no clue why flycheck fails to run.
This is what is printed to the output channel:
```
[ERROR rust_analyzer::main_loop] cargo check failed: Cargo watcher failed,the command produced no valid metadata (exit code: ExitStatus(ExitStatus(25856)))
```
I stumbled with this figuring out that rust-analyzer adds `--all-features` which is not intended
for some crates in the workspace (i.e. they have mutually-exclusive features).
Having the command rust-analyzer ran should help a lot
Co-authored-by: Veetaha <veetaha2@gmail.com>
bors[bot] [Tue, 11 Aug 2020 10:08:27 +0000 (10:08 +0000)]
Merge #5704
5704: Update README.md r=jonas-schievink a=tim-weis
Fixed formatting.
Co-authored-by: Tim Weis <tim-weis@users.noreply.github.com>
JmPotato [Tue, 11 Aug 2020 09:19:02 +0000 (17:19 +0800)]
Revert some FIXMEs
Signed-off-by: JmPotato <ghzpotato@gmail.com>
JmPotato [Tue, 11 Aug 2020 08:50:45 +0000 (16:50 +0800)]
Typo fix
Signed-off-by: JmPotato <ghzpotato@gmail.com>
Laurențiu Nicola [Tue, 11 Aug 2020 06:54:33 +0000 (09:54 +0300)]
Use Hygiene in completion
JmPotato [Tue, 11 Aug 2020 06:35:15 +0000 (14:35 +0800)]
Remove redundant dependencies
Signed-off-by: JmPotato <ghzpotato@gmail.com>
JmPotato [Tue, 11 Aug 2020 04:09:11 +0000 (12:09 +0800)]
Typo fix
Signed-off-by: JmPotato <ghzpotato@gmail.com>
JmPotato [Tue, 11 Aug 2020 02:55:26 +0000 (10:55 +0800)]
Address some FIXMEs
Signed-off-by: JmPotato <ghzpotato@gmail.com>
Veetaha [Tue, 11 Aug 2020 00:12:09 +0000 (03:12 +0300)]
Log the command flycheck runs to debug misconfigurations
Without this users have no clue why flycheck fails to run.
This is what is printed to the output channel:
```
[ERROR rust_analyzer::main_loop] cargo check failed: Cargo watcher failed,the command produced no valid metadata (exit code: ExitStatus(ExitStatus(25856)))
```
I stumbled with this figuring out that rust-analyzer adds `--all-features` which is not intended
for some crates in the workspace (e.g. they have mutually-exclusive features.
Having the command rust-analyzer ran should help a lot
Tim Weis [Mon, 10 Aug 2020 23:01:25 +0000 (01:01 +0200)]
Update README.md
Fixed formatting.
bors[bot] [Mon, 10 Aug 2020 19:38:19 +0000 (19:38 +0000)]
Merge #5703
5703: Fix typos in syntax.md r=kjeremy a=lnicola
Closes #5700
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
Laurențiu Nicola [Mon, 10 Aug 2020 18:31:38 +0000 (21:31 +0300)]
Fix typos in syntax.md
bors[bot] [Mon, 10 Aug 2020 17:20:14 +0000 (17:20 +0000)]
Merge #5701
5701: cargo update r=kjeremy a=kjeremy
Co-authored-by: kjeremy <kjeremy@gmail.com>
bors[bot] [Mon, 10 Aug 2020 15:14:02 +0000 (15:14 +0000)]
Merge #5696
5696: Return InvalidRequest if Shutdown has been requested r=kjeremy a=kjeremy
From the LSP 3.16 spec: "If a server receives requests after a shutdown request those requests should error with InvalidRequest."
Realized this behavior was missing while looking at #5693. Question on notification behavior is tracked at https://github.com/microsoft/language-server-protocol/issues/1066
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
Jeremy Kolb [Sun, 9 Aug 2020 20:27:48 +0000 (16:27 -0400)]
Return InvalidRequest if Shutdown has been requested
From the LSP 3.16 spec: "If a server receives requests after a shutdown request those requests should error with InvalidRequest."
kjeremy [Mon, 10 Aug 2020 14:56:16 +0000 (10:56 -0400)]
cargo update
bors[bot] [Mon, 10 Aug 2020 14:48:19 +0000 (14:48 +0000)]
Merge #5697
5697: Remove workaround for semantic token flickering r=jonas-schievink a=kjeremy
See: https://github.com/microsoft/vscode-languageserver-node/issues/576#issuecomment-
593384479
This has been fixed since vscode 1.44
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
Igor Aleksanov [Mon, 10 Aug 2020 12:50:27 +0000 (15:50 +0300)]
Revert boxing for large enum variant
Paul Daniel Faria [Sun, 9 Aug 2020 22:54:04 +0000 (18:54 -0400)]
Remove unused import left behind after rebasing
Paul Daniel Faria [Fri, 7 Aug 2020 14:40:09 +0000 (10:40 -0400)]
Fix type names broken by rebase, redo expected test because of rebase
Paul Daniel Faria [Thu, 30 Jul 2020 13:26:40 +0000 (09:26 -0400)]
Move unsafe semantics methods into `SemanticsImpl` and reference them in `Semantics`
Paul Daniel Faria [Thu, 23 Jul 2020 22:31:28 +0000 (18:31 -0400)]
Return bool from is_unsafe_method_call and cleanup usages
Paul Daniel Faria [Thu, 23 Jul 2020 14:11:37 +0000 (10:11 -0400)]
Move semantic logic into Semantics, fix missing tag for safe amp operator, using functional methods rather than clunky inline closure
Paul Daniel Faria [Thu, 23 Jul 2020 13:39:53 +0000 (09:39 -0400)]
Remove merge backup
Paul Daniel Faria [Thu, 23 Jul 2020 13:31:07 +0000 (09:31 -0400)]
Fix rebase errors
Paul Daniel Faria [Sun, 19 Jul 2020 15:45:46 +0000 (11:45 -0400)]
Move unsafe packed ref logic to Semantics, use `Attrs::by_key` to simplify repr attr lookup
Paul Daniel Faria [Sun, 28 Jun 2020 20:04:00 +0000 (16:04 -0400)]
Revert function structs back to using bool to track self param, use first param for self information in syntax highlighting instead
Paul Daniel Faria [Sat, 27 Jun 2020 21:28:07 +0000 (17:28 -0400)]
Deduplicate unsafe method call into a single function
Paul Daniel Faria [Sat, 27 Jun 2020 21:11:43 +0000 (17:11 -0400)]
Unsafe borrow of packed fields: account for borrow through ref binding, auto ref function calls
Paul Daniel Faria [Sat, 27 Jun 2020 18:42:42 +0000 (14:42 -0400)]
Cleanup repr check, fix packed repr check and test
Paul Daniel Faria [Mon, 15 Jun 2020 12:21:32 +0000 (08:21 -0400)]
Update FIXME comment to be more useful
Paul Daniel Faria [Mon, 15 Jun 2020 11:41:13 +0000 (07:41 -0400)]
Limit scope of unsafe to & instead of all ref exprs, add test showing missing support for autoref behavior