]> git.lizzy.rs Git - rust.git/log
rust.git
2 years agointernal: Record unresolved derive invocations in hir
Lukas Wirth [Sat, 1 Jan 2022 19:31:04 +0000 (20:31 +0100)]
internal: Record unresolved derive invocations in hir

2 years agoMerge #11153
bors[bot] [Sat, 1 Jan 2022 17:04:29 +0000 (17:04 +0000)]
Merge #11153

11153: internal: add more prefix entry point tests r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2 years agointernal: add more prefix entry point tests
Aleksey Kladov [Sat, 1 Jan 2022 16:51:13 +0000 (19:51 +0300)]
internal: add more prefix entry point tests

2 years agoMerge #11136
bors[bot] [Sat, 1 Jan 2022 16:42:22 +0000 (16:42 +0000)]
Merge #11136

11136: Turbo fish assist supports multiple type arguments r=matklad a=Vannevelj

This fixes #11135 (changelog: bug).

I've only started using Rust a few days ago but saw this issue on the top of the list when I looked at this repo. I based myself on [this blog post](https://techblog.tonsser.com/posts/what-is-rusts-turbofish) to understand what a "turbo fish" is so let me know if I missed anything.

Co-authored-by: Jeroen Vannevel <jer_vannevel@outlook.com>
2 years agoMerge #11151
bors[bot] [Sat, 1 Jan 2022 16:17:39 +0000 (16:17 +0000)]
Merge #11151

11151: feat: correctly fallback to notify if the clinet-side file watching is not supported r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2 years agotest: force client-side watching
Aleksey Kladov [Sat, 1 Jan 2022 16:10:34 +0000 (19:10 +0300)]
test: force client-side watching

The direct reason for this is to fix CI on windows, which seems to fail
for some reason after we fixed the watcher-selection logic which (I
think) changed the tests behavior to use notify rather than client.

But this patch seems to make sense in general -- file watching is
notoriously finicky, so controlling it explicitly leads to less fragile
tests.

2 years agoMerge #11152
bors[bot] [Sat, 1 Jan 2022 16:03:24 +0000 (16:03 +0000)]
Merge #11152

11152: internal: add more tests for entry points r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2 years agoadd path tests
Aleksey Kladov [Sat, 1 Jan 2022 16:02:47 +0000 (19:02 +0300)]
add path tests

2 years agoadd expr tests
Aleksey Kladov [Thu, 30 Dec 2021 12:09:37 +0000 (15:09 +0300)]
add expr tests

2 years agotests for ty
Aleksey Kladov [Thu, 30 Dec 2021 11:26:59 +0000 (14:26 +0300)]
tests for ty

2 years agointernal: add tests for patterns
Aleksey Kladov [Thu, 30 Dec 2021 11:20:35 +0000 (14:20 +0300)]
internal: add tests for patterns

2 years agobetter error message
Aleksey Kladov [Sat, 1 Jan 2022 14:43:02 +0000 (17:43 +0300)]
better error message

2 years agofeat: correctly fallback to notify if the clinet-side file watching is not supported
Aleksey Kladov [Sat, 1 Jan 2022 14:26:54 +0000 (17:26 +0300)]
feat: correctly fallback to notify if the clinet-side file watching is not supported

2 years agoMerge #11144
bors[bot] [Thu, 30 Dec 2021 12:52:05 +0000 (12:52 +0000)]
Merge #11144

11144: fix: Fix server path on NixOS r=lnicola a=lnicola

See https://github.com/rust-analyzer/rust-analyzer/commit/c0d0ceefb29111732cacf39dbb57fe9f3ce25ee8#commitcomment-62688259.

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2 years agoFix server path on NixOS
Laurențiu Nicola [Thu, 30 Dec 2021 12:50:54 +0000 (14:50 +0200)]
Fix server path on NixOS

2 years agoMerge #11141
bors[bot] [Thu, 30 Dec 2021 10:30:28 +0000 (10:30 +0000)]
Merge #11141

11141: internal: add tests for extra parser entry points r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2 years agoMerge #10692
bors[bot] [Thu, 30 Dec 2021 08:41:10 +0000 (08:41 +0000)]
Merge #10692

10692: Migrate to new rowan r=lnicola a=azdavis

Since https://github.com/rust-analyzer/rowan/pull/122 was merged into rowan, this could be how rust-analyzer migrates.

Co-authored-by: Ariel Davis <ariel.z.davis@icloud.com>
2 years agoMigrate to SyntaxNodePtr in new rowan
Ariel Davis [Thu, 30 Dec 2021 07:48:53 +0000 (23:48 -0800)]
Migrate to SyntaxNodePtr in new rowan

2 years agorestore invariatns
Aleksey Kladov [Wed, 29 Dec 2021 17:37:08 +0000 (20:37 +0300)]
restore invariatns

2 years agoparse empty statemet as statemetn
Aleksey Kladov [Wed, 29 Dec 2021 17:04:36 +0000 (20:04 +0300)]
parse empty statemet as statemetn

2 years agoAdd test
Aleksey Kladov [Wed, 29 Dec 2021 16:37:35 +0000 (19:37 +0300)]
Add test

2 years agorename
Aleksey Kladov [Wed, 29 Dec 2021 16:18:34 +0000 (19:18 +0300)]
rename

2 years agocompress
Aleksey Kladov [Wed, 29 Dec 2021 15:51:05 +0000 (18:51 +0300)]
compress

2 years agoadd automated semicolon insertion test
Aleksey Kladov [Wed, 29 Dec 2021 15:37:06 +0000 (18:37 +0300)]
add automated semicolon insertion test

2 years agointernal: add tests for extra parser entry points
Aleksey Kladov [Wed, 29 Dec 2021 15:23:34 +0000 (18:23 +0300)]
internal: add tests for extra parser entry points

2 years agoformatting
Jeroen Vannevel [Tue, 28 Dec 2021 18:52:12 +0000 (18:52 +0000)]
formatting

2 years agoturbo fish supports multiple type arguments
Jeroen Vannevel [Tue, 28 Dec 2021 18:41:34 +0000 (18:41 +0000)]
turbo fish supports multiple type arguments

2 years agoMerge #11134
bors[bot] [Tue, 28 Dec 2021 16:22:20 +0000 (16:22 +0000)]
Merge #11134

11134: internal: tighten up parser API r=matklad a=matklad

It's tempting to expose things like `Expr::parse`,
but they'll necessary have somewhat ad-hoc semantics.

Instead, we narrow down the parser's interface strictly
to what's needed for MBE. For everything else (eg, parsing
imports), the proper way is enclose the input string into
some context, parse the whole as a file, and then verify
that the input was parsed as intended.

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2 years agocompress
Aleksey Kladov [Tue, 28 Dec 2021 16:17:34 +0000 (19:17 +0300)]
compress

2 years agodead code
Aleksey Kladov [Tue, 28 Dec 2021 16:13:30 +0000 (19:13 +0300)]
dead code

2 years agointroduce hacks module
Aleksey Kladov [Tue, 28 Dec 2021 15:57:13 +0000 (18:57 +0300)]
introduce hacks module

2 years agoclarify semantics of doc links
Aleksey Kladov [Tue, 28 Dec 2021 12:48:07 +0000 (15:48 +0300)]
clarify semantics of doc links

2 years agolast use of parse api in ssr
Aleksey Kladov [Mon, 27 Dec 2021 18:41:34 +0000 (21:41 +0300)]
last use of parse api in ssr

2 years agodead code
Aleksey Kladov [Mon, 27 Dec 2021 18:35:36 +0000 (21:35 +0300)]
dead code

2 years agoremove fragments from syntax
Aleksey Kladov [Mon, 27 Dec 2021 18:34:39 +0000 (21:34 +0300)]
remove fragments from syntax

2 years agomove the rest of ssr parsing to fragments
Aleksey Kladov [Mon, 27 Dec 2021 18:33:24 +0000 (21:33 +0300)]
move the rest of ssr parsing to fragments

2 years agodrop dead code
Aleksey Kladov [Mon, 27 Dec 2021 18:26:02 +0000 (21:26 +0300)]
drop dead code

2 years agoadd ssr fragment for statements
Aleksey Kladov [Mon, 27 Dec 2021 18:17:40 +0000 (21:17 +0300)]
add ssr fragment for statements

2 years agoadd ssr fragment for expressions
Aleksey Kladov [Mon, 27 Dec 2021 18:13:55 +0000 (21:13 +0300)]
add ssr fragment for expressions

2 years agoverify during parse
Aleksey Kladov [Mon, 27 Dec 2021 18:05:26 +0000 (21:05 +0300)]
verify during parse

2 years agoadd test
Aleksey Kladov [Mon, 27 Dec 2021 17:41:17 +0000 (20:41 +0300)]
add test

2 years agoremove Item::parse
Aleksey Kladov [Mon, 27 Dec 2021 17:33:33 +0000 (20:33 +0300)]
remove Item::parse

2 years agointernal: start isolating ssr-related parsing APIs to SSR
Aleksey Kladov [Mon, 27 Dec 2021 16:44:45 +0000 (19:44 +0300)]
internal: start isolating ssr-related parsing APIs to SSR

2 years agoadd missing test
Aleksey Kladov [Mon, 27 Dec 2021 16:04:49 +0000 (19:04 +0300)]
add missing test

2 years agodead code
Aleksey Kladov [Mon, 27 Dec 2021 15:04:13 +0000 (18:04 +0300)]
dead code

2 years agoadd TopEntryPoint
Aleksey Kladov [Mon, 27 Dec 2021 14:54:51 +0000 (17:54 +0300)]
add TopEntryPoint

2 years agosimplify
Aleksey Kladov [Mon, 27 Dec 2021 13:28:54 +0000 (16:28 +0300)]
simplify

2 years agomove path
Aleksey Kladov [Mon, 27 Dec 2021 13:23:07 +0000 (16:23 +0300)]
move path

2 years agomove expr
Aleksey Kladov [Mon, 27 Dec 2021 13:17:29 +0000 (16:17 +0300)]
move expr

2 years agomove ty
Aleksey Kladov [Mon, 27 Dec 2021 13:08:35 +0000 (16:08 +0300)]
move ty

2 years agomove pat to prefix entry points
Aleksey Kladov [Mon, 27 Dec 2021 13:06:02 +0000 (16:06 +0300)]
move pat to prefix entry points

2 years agomove stmt to entry points
Aleksey Kladov [Mon, 27 Dec 2021 12:54:00 +0000 (15:54 +0300)]
move stmt to entry points

2 years agointernal: move block to prefix entry point
Aleksey Kladov [Mon, 27 Dec 2021 12:39:17 +0000 (15:39 +0300)]
internal: move block to prefix entry point

2 years agointernal: move visibility to a prefix entry point
Aleksey Kladov [Mon, 27 Dec 2021 12:22:44 +0000 (15:22 +0300)]
internal: move visibility to a prefix entry point

2 years agointernal: add prefix entry points
Aleksey Kladov [Mon, 27 Dec 2021 12:17:48 +0000 (15:17 +0300)]
internal: add prefix entry points

2 years agocleanup imports
Aleksey Kladov [Mon, 27 Dec 2021 12:03:05 +0000 (15:03 +0300)]
cleanup imports

2 years agosimplify
Aleksey Kladov [Mon, 27 Dec 2021 11:58:24 +0000 (14:58 +0300)]
simplify

2 years agoMerge #11131
bors[bot] [Tue, 28 Dec 2021 13:52:52 +0000 (13:52 +0000)]
Merge #11131

11131: internal: avoid speculation when completing macros r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2 years agominor: simplify
Aleksey Kladov [Tue, 28 Dec 2021 13:51:17 +0000 (16:51 +0300)]
minor: simplify

2 years agominor: dedup
Aleksey Kladov [Tue, 28 Dec 2021 13:50:13 +0000 (16:50 +0300)]
minor: dedup

2 years agoavoid speculation when completing macros
Aleksey Kladov [Tue, 28 Dec 2021 13:47:21 +0000 (16:47 +0300)]
avoid speculation when completing macros

2 years agoMerge #11128
bors[bot] [Tue, 28 Dec 2021 10:53:02 +0000 (10:53 +0000)]
Merge #11128

11128: import style r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2 years agoimport style
Aleksey Kladov [Tue, 28 Dec 2021 10:52:40 +0000 (13:52 +0300)]
import style

2 years agoMerge #11127
bors[bot] [Tue, 28 Dec 2021 09:04:26 +0000 (09:04 +0000)]
Merge #11127

11127: internal: Set a timeout on the Octokit client r=lnicola a=lnicola

CC #11056

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2 years agoSet a timeout on the Octokit client
Laurențiu Nicola [Tue, 28 Dec 2021 08:34:14 +0000 (10:34 +0200)]
Set a timeout on the Octokit client

2 years agoMerge #11125
bors[bot] [Mon, 27 Dec 2021 18:46:05 +0000 (18:46 +0000)]
Merge #11125

11125: minor r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2 years agominor
Aleksey Kladov [Mon, 27 Dec 2021 18:45:42 +0000 (21:45 +0300)]
minor

2 years agoMerge #11122
bors[bot] [Mon, 27 Dec 2021 06:47:01 +0000 (06:47 +0000)]
Merge #11122

11122: Remove note about alpha status from vscode extension descritpion r=lnicola a=aDotInTheVoid

See https://github.com/rust-analyzer/rust-analyzer.github.io/pull/156 and https://github.com/rust-analyzer/rust-analyzer/pull/8237

Co-authored-by: Nixon Enraght-Moony <nixon.emoony@gmail.com>
2 years agoRemove note about alpha status from vscode extension descritpion
Nixon Enraght-Moony [Mon, 27 Dec 2021 01:26:25 +0000 (01:26 +0000)]
Remove note about alpha status from vscode extension descritpion

See https://github.com/rust-analyzer/rust-analyzer.github.io/pull/156 and https://github.com/rust-analyzer/rust-analyzer/pull/8237

2 years agoMerge #11120
bors[bot] [Sun, 26 Dec 2021 15:54:02 +0000 (15:54 +0000)]
Merge #11120

11120: internal: move parser tests to parser crate r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2 years agofix line endings
Aleksey Kladov [Sun, 26 Dec 2021 15:46:21 +0000 (18:46 +0300)]
fix line endings

2 years agointernal: move inline parser tests to parser crate
Aleksey Kladov [Sun, 26 Dec 2021 15:19:09 +0000 (18:19 +0300)]
internal: move inline parser tests to parser crate

2 years agointernal: move outlined parser tests
Aleksey Kladov [Sun, 26 Dec 2021 14:58:33 +0000 (17:58 +0300)]
internal: move outlined parser tests

2 years agoMerge #11118
bors[bot] [Sun, 26 Dec 2021 13:49:59 +0000 (13:49 +0000)]
Merge #11118

11118: internal: move ws attachment logic to the parser crate r=matklad a=matklad

This has to re-introduce the `sink` pattern, because doing this purely
with iterators is awkward :( Maaaybe the event vector was a false start?

But, anyway, I like the current factoring more -- it sort-of obvious
that we do want to keep ws-attachment business in the parser, and that
we also don't want that to depend on the particular tree structure. I
think `shortcuts` module achieves that.

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2 years agointernal: move ws attachment logic to the parser crate
Aleksey Kladov [Sun, 26 Dec 2021 13:47:10 +0000 (16:47 +0300)]
internal: move ws attachment logic to the parser crate

This has to re-introduce the `sink` pattern, because doing this purely
with iterators is awkward :( Maaaybe the event vector was a false start?

But, anyway, I like the current factoring more -- it sort-of obvious
that we do want to keep ws-attachment business in the parser, and that
we also don't want that to depend on the particular tree structure. I
think `shortcuts` module achieves that.

2 years agoMerge #11117
bors[bot] [Sat, 25 Dec 2021 19:13:56 +0000 (19:13 +0000)]
Merge #11117

11117: internal: replace TreeSink with a data structure  r=matklad a=matklad

The general theme of this is to make parser a better independent
library.

The specific thing we do here is replacing callback based TreeSink with
a data structure. That is, rather than calling user-provided tree
construction methods, the parser now spits out a very bare-bones tree,
effectively a log of a DFS traversal.

This makes the parser usable without any *specifc* tree sink, and allows
us to, eg, move tests into this crate.

Now, it's also true that this is a distinction without a difference, as
the old and the new interface are equivalent in expressiveness. Still,
this new thing seems somewhat simpler. But yeah, I admit I don't have a
suuper strong motivation here, just a hunch that this is better.

cc #10765

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2 years agorename
Aleksey Kladov [Sat, 25 Dec 2021 19:02:12 +0000 (22:02 +0300)]
rename

2 years agointernal: rename
Aleksey Kladov [Sat, 25 Dec 2021 18:59:02 +0000 (21:59 +0300)]
internal: rename

2 years agointernal: replace TreeSink with a data structure
Aleksey Kladov [Sun, 19 Dec 2021 14:36:23 +0000 (17:36 +0300)]
internal: replace TreeSink with a data structure

The general theme of this is to make parser a better independent
library.

The specific thing we do here is replacing callback based TreeSink with
a data structure. That is, rather than calling user-provided tree
construction methods, the parser now spits out a very bare-bones tree,
effectively a log of a DFS traversal.

This makes the parser usable without any *specifc* tree sink, and allows
us to, eg, move tests into this crate.

Now, it's also true that this is a distinction without a difference, as
the old and the new interface are equivalent in expressiveness. Still,
this new thing seems somewhat simpler. But yeah, I admit I don't have a
suuper strong motivation here, just a hunch that this is better.

2 years agoMerge #11116
bors[bot] [Sat, 25 Dec 2021 14:42:16 +0000 (14:42 +0000)]
Merge #11116

11116: :arrow_up: expect test r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2 years ago:arrow_up: expect test
Aleksey Kladov [Sat, 25 Dec 2021 14:41:17 +0000 (17:41 +0300)]
:arrow_up: expect test

2 years agoMerge #10933
bors[bot] [Thu, 23 Dec 2021 14:39:21 +0000 (14:39 +0000)]
Merge #10933

10933: show values of constants in hover r=lnicola a=HKalbasi

Fix #8497
cc #8655

Co-authored-by: hkalbasi <hamidrezakalbasi@protonmail.com>
2 years agoshow values of constants in hover
hkalbasi [Sat, 4 Dec 2021 22:21:36 +0000 (01:51 +0330)]
show values of constants in hover

2 years agoMerge #11106
bors[bot] [Thu, 23 Dec 2021 12:43:54 +0000 (12:43 +0000)]
Merge #11106

11106: internal: Remove network access from Code extension r=lnicola a=lnicola

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2 years agoSpelling fix
Laurențiu Nicola [Thu, 23 Dec 2021 12:04:46 +0000 (14:04 +0200)]
Spelling fix

2 years agoSimplify conflict check
Laurențiu Nicola [Thu, 23 Dec 2021 11:08:06 +0000 (13:08 +0200)]
Simplify conflict check

2 years agoDrop kalitaalexey.vscode-rust check
Laurențiu Nicola [Thu, 23 Dec 2021 11:05:58 +0000 (13:05 +0200)]
Drop kalitaalexey.vscode-rust check

2 years agoDon't check for platform details
Laurențiu Nicola [Thu, 23 Dec 2021 11:04:27 +0000 (13:04 +0200)]
Don't check for platform details

2 years agoUpdate privacy note
Laurențiu Nicola [Thu, 23 Dec 2021 07:55:39 +0000 (09:55 +0200)]
Update privacy note

2 years agoRemove ETXTBUSY check, we don't overwrite binaries
Laurențiu Nicola [Thu, 23 Dec 2021 07:50:09 +0000 (09:50 +0200)]
Remove ETXTBUSY check, we don't overwrite binaries

2 years agoImprove NixOS handling
Laurențiu Nicola [Thu, 23 Dec 2021 07:49:24 +0000 (09:49 +0200)]
Improve NixOS handling

2 years agoDrop extensionUri copy
Laurențiu Nicola [Thu, 23 Dec 2021 06:44:23 +0000 (08:44 +0200)]
Drop extensionUri copy

2 years agoRemove proxy settings
Laurențiu Nicola [Thu, 23 Dec 2021 06:33:34 +0000 (08:33 +0200)]
Remove proxy settings

2 years agoRemove channel and ask before download prefs
Laurențiu Nicola [Thu, 23 Dec 2021 06:32:58 +0000 (08:32 +0200)]
Remove channel and ask before download prefs

2 years agoRemove node-fetch and https-proxy-agent deps
Laurențiu Nicola [Thu, 23 Dec 2021 06:31:16 +0000 (08:31 +0200)]
Remove node-fetch and https-proxy-agent deps

2 years agoRemove network functions
Laurențiu Nicola [Thu, 23 Dec 2021 06:28:25 +0000 (08:28 +0200)]
Remove network functions

2 years agoRemove server download and update checks
Laurențiu Nicola [Thu, 23 Dec 2021 06:24:58 +0000 (08:24 +0200)]
Remove server download and update checks

2 years agoMerge #11103
bors[bot] [Wed, 22 Dec 2021 19:34:12 +0000 (19:34 +0000)]
Merge #11103

11103: internal: Improve `github-release` action r=lnicola a=lnicola

Upgrade ``@actions/github`` to get `listReleaseAssets` and retry individual uploads in addition to the whole thing.

Also disables `ci`, `metrics` and `rustdoc` on forks to save some CPU time.

CC #11056

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2 years agoGate workflows to only run on upstream
Laurențiu Nicola [Wed, 22 Dec 2021 18:57:26 +0000 (20:57 +0200)]
Gate workflows to only run on upstream

2 years agoImprove github-release action
Laurențiu Nicola [Wed, 22 Dec 2021 17:56:54 +0000 (19:56 +0200)]
Improve github-release action