]> git.lizzy.rs Git - rust.git/log
rust.git
21 months agoImplement invocation location config
Lukas Wirth [Sat, 22 Oct 2022 21:02:59 +0000 (23:02 +0200)]
Implement invocation location config

21 months agoAuto merge of #13463 - lowr:fix/builtin-derive-with-const-generics, r=Veykril
bors [Sat, 22 Oct 2022 15:49:00 +0000 (15:49 +0000)]
Auto merge of #13463 - lowr:fix/builtin-derive-with-const-generics, r=Veykril

Support const generics for builtin derive macro

Fixes #13121

We have been treating every generic parameter as type parameter during builtin derive macro expansion. This patch adds support for const generics in such expansions.

21 months agoSupport const generics for builtin derive macro
Ryo Yoshida [Sat, 22 Oct 2022 08:49:38 +0000 (17:49 +0900)]
Support const generics for builtin derive macro

21 months agoAuto merge of #13460 - emilio:scip-cleanups, r=Veykril
bors [Sat, 22 Oct 2022 13:46:23 +0000 (13:46 +0000)]
Auto merge of #13460 - emilio:scip-cleanups, r=Veykril

scip: minor clean-ups

Avoids a couple redundant hash map lookups and so.

21 months agoAuto merge of #13461 - emilio:ide-cleanup-continue, r=Veykril
bors [Sat, 22 Oct 2022 13:29:58 +0000 (13:29 +0000)]
Auto merge of #13461 - emilio:ide-cleanup-continue, r=Veykril

ide: Remove unnecessary continue.

Just a minor clean-up I found while going through the code.

21 months agoscip: Rewrite tests to be closer to what we actually do.
Emilio Cobos Álvarez [Fri, 21 Oct 2022 20:04:43 +0000 (22:04 +0200)]
scip: Rewrite tests to be closer to what we actually do.

It's also less code.

21 months agoide: Remove unnecessary continue.
Emilio Cobos Álvarez [Sat, 22 Oct 2022 12:04:47 +0000 (14:04 +0200)]
ide: Remove unnecessary continue.

21 months agoscip: minor clean-ups
Emilio Cobos Álvarez [Sat, 22 Oct 2022 11:50:02 +0000 (13:50 +0200)]
scip: minor clean-ups

Avoids a couple redundant hash map lookups and so.

21 months agoAuto merge of #13453 - Veykril:disabled-commands, r=Veykril
bors [Fri, 21 Oct 2022 14:05:25 +0000 (14:05 +0000)]
Auto merge of #13453 - Veykril:disabled-commands, r=Veykril

internal: Properly handle commands in the VSCode client when the server is stopped

21 months agointernal: Properly handle commands in the VSCode client when the server is stopped
Lukas Wirth [Fri, 21 Oct 2022 14:00:43 +0000 (16:00 +0200)]
internal: Properly handle commands in the VSCode client when the server is stopped

21 months agoAuto merge of #13451 - Veykril:lang-config, r=Veykril
bors [Thu, 20 Oct 2022 19:15:30 +0000 (19:15 +0000)]
Auto merge of #13451 - Veykril:lang-config, r=Veykril

internal: Properly handle language configuration config changes

21 months agointernal: Properly handle language configuration config changes
Lukas Wirth [Thu, 20 Oct 2022 19:12:58 +0000 (21:12 +0200)]
internal: Properly handle language configuration config changes

21 months agoAuto merge of #13447 - Veykril:didsavedoc-block, r=Veykril
bors [Thu, 20 Oct 2022 18:13:09 +0000 (18:13 +0000)]
Auto merge of #13447 - Veykril:didsavedoc-block, r=Veykril

fix: Fix DidSaveDocument requests blocking the server on startup

Follow up to https://github.com/rust-lang/rust-analyzer/pull/13428
Fixes https://github.com/rust-lang/rust-analyzer/issues/13434

21 months agoAuto merge of #13448 - yotamofek:python-ext-polyfill-workaround, r=Veykril
bors [Thu, 20 Oct 2022 17:59:14 +0000 (17:59 +0000)]
Auto merge of #13448 - yotamofek:python-ext-polyfill-workaround, r=Veykril

Workaround the python vscode extension's polyfill

Fixes #13442

`String.replaceAll` and `String.replace` behave the same when given a (/g-flagged) Regex, so fix is very simple.

21 months agoWorkaround the python vscode extension's polyfill
Yotam Ofek [Thu, 20 Oct 2022 17:56:51 +0000 (17:56 +0000)]
Workaround the python vscode extension's polyfill

21 months agofix: Fix DidSaveDocument requests blocking the server on startup
Lukas Wirth [Thu, 20 Oct 2022 17:28:28 +0000 (19:28 +0200)]
fix: Fix DidSaveDocument requests blocking the server on startup

21 months agoAuto merge of #13365 - feniljain:master, r=Veykril
bors [Thu, 20 Oct 2022 12:07:28 +0000 (12:07 +0000)]
Auto merge of #13365 - feniljain:master, r=Veykril

feat: add multiple getters mode in `generate_getter`

This commit adds two modes to generate_getter action.
First, the plain old working on single fields.
Second, working on a selected range of fields.

Should partially solve #13246
If this gets approved will create a separate PR for setters version of the same

### Points to help in review:

- `generate_getter_from_record_info` contains code which is mostly taken from assist before refactor
- Same goes for `parse_record_fields`
- There are changes in other assists, as one of the methods in utils named `find_struct_impl` is changed, before it used to accept a single `fn_name`, now it takes a list of function names to check against. All old impls are updated to create a small list to pass their single element.

### Assumptions:

- If any of the fields have an implementation, the action will quit.

21 months agofeat: add multiple getters mode in `generate_getter`
feniljain [Fri, 7 Oct 2022 19:24:57 +0000 (00:54 +0530)]
feat: add multiple getters mode in `generate_getter`

This commit adds two modes to generate_getter action.
First, the plain old working on single fields.
Second, working on a selected range of fields.

21 months agoAuto merge of #13444 - Veykril:rethrow-err, r=Veykril
bors [Thu, 20 Oct 2022 09:34:06 +0000 (09:34 +0000)]
Auto merge of #13444 - Veykril:rethrow-err, r=Veykril

fix: Don't catch the server activation error

We are are rethrowing and showing errors higher up in the call stack already. This just ate the error hiding the stacktrace unnecessarily.

21 months agoDon't catch the server activation error
Lukas Wirth [Thu, 20 Oct 2022 09:32:02 +0000 (11:32 +0200)]
Don't catch the server activation error

21 months agoAuto merge of #13128 - Veykril:invocation-strategy, r=Veykril
bors [Wed, 19 Oct 2022 21:53:19 +0000 (21:53 +0000)]
Auto merge of #13128 - Veykril:invocation-strategy, r=Veykril

Implement invocation strategy config

Fixes https://github.com/rust-lang/rust-analyzer/issues/10793

This allows to change how we run build scripts (and `checkOnSave`), exposing two configs:
- `once`: run the specified command once in the project root (the working dir of the server)
- `per_workspace`: run the specified command per workspace in the corresponding workspace

This also applies to `checkOnSave` likewise, though `once_in_root` is useless there currently, due to https://github.com/rust-lang/cargo/issues/11007

21 months agoRemove simplistic interpolation for manifest-path
Lukas Wirth [Wed, 19 Oct 2022 21:34:36 +0000 (23:34 +0200)]
Remove simplistic interpolation for manifest-path

21 months ago{manifest-path} interpolation
Lukas Wirth [Mon, 26 Sep 2022 13:58:55 +0000 (15:58 +0200)]
{manifest-path} interpolation

21 months agoUse correct invocation strategy config for checkOnSave
Lukas Wirth [Thu, 15 Sep 2022 11:35:46 +0000 (13:35 +0200)]
Use correct invocation strategy config for checkOnSave

21 months agoImplement invocation strategy config for checkOnSave
Lukas Wirth [Thu, 15 Sep 2022 11:28:09 +0000 (13:28 +0200)]
Implement invocation strategy config for checkOnSave

Note that due to how cargo works, none of the modes currently work for r-a

21 months agoImplement invocation strategy config for build scripts
Lukas Wirth [Sat, 27 Aug 2022 16:28:09 +0000 (18:28 +0200)]
Implement invocation strategy config for build scripts

21 months agoAuto merge of #13441 - Veykril:sysroot-logging, r=Veykril
bors [Wed, 19 Oct 2022 20:27:09 +0000 (20:27 +0000)]
Auto merge of #13441 - Veykril:sysroot-logging, r=Veykril

Add some sysroot logging

21 months agoAdd some sysroot logging
Lukas Wirth [Wed, 19 Oct 2022 20:25:57 +0000 (22:25 +0200)]
Add some sysroot logging

21 months agoAuto merge of #13439 - Veykril:simplify, r=Veykril
bors [Wed, 19 Oct 2022 19:18:00 +0000 (19:18 +0000)]
Auto merge of #13439 - Veykril:simplify, r=Veykril

Simplify

21 months agoSimplify
Lukas Wirth [Wed, 19 Oct 2022 19:17:11 +0000 (21:17 +0200)]
Simplify

21 months agoAuto merge of #13433 - rust-lang:revert-13354-try-stuff, r=Veykril
bors [Tue, 18 Oct 2022 12:19:58 +0000 (12:19 +0000)]
Auto merge of #13433 - rust-lang:revert-13354-try-stuff, r=Veykril

Revert "feat: Diagnose some incorrect usages of the question mark operator"

Reverts rust-lang/rust-analyzer#13354

It seems like we are getting stuck with inference variables here, not just placeholders and errors so there is probably more wrong here that I don't understand. Reverting seems like the best solution right now as I don't have the time to look into this this week.

21 months agoRevert "feat: Diagnose some incorrect usages of the question mark operator"
Lukas Wirth [Tue, 18 Oct 2022 12:18:59 +0000 (14:18 +0200)]
Revert "feat: Diagnose some incorrect usages of the question mark operator"

21 months agoAuto merge of #13428 - Veykril:fmt-stuck, r=Veykril
bors [Mon, 17 Oct 2022 16:21:32 +0000 (16:21 +0000)]
Auto merge of #13428 - Veykril:fmt-stuck, r=Veykril

fix: Fix formatting requests hanging when r-a is still starting

The reason for that was that we were calculating the crate defmaps of the file we are saving by accident causing us to get stuck waiting on their expensive computation, while we only need the relevant crate id.

Closes https://github.com/rust-lang/rust-analyzer/issues/4054
Closes https://github.com/rust-lang/rust-analyzer/issues/11654

21 months agofix: Fix formatting requests hanging when r-a is still starting
Lukas Wirth [Mon, 17 Oct 2022 15:53:50 +0000 (17:53 +0200)]
fix: Fix formatting requests hanging when r-a is still starting

The reason for that was that we were calculating the crate defmaps
of the file we are saving by accident causing us to get stuck waiting
on their expensive computation, while we only need the relevant crate
id.

21 months agoAuto merge of #13427 - Veykril:cancel-check, r=Veykril
bors [Mon, 17 Oct 2022 14:41:57 +0000 (14:41 +0000)]
Auto merge of #13427 - Veykril:cancel-check, r=Veykril

feat: Make flycheck workdone progress reports cancellable

In clients that support this (like VSCode), the clients will now render a cancel button on the notification message which can be clicked to cancel the flycheck instead.

Closes https://github.com/rust-lang/rust-analyzer/issues/6895
![Code_VbXgP3SbFD](https://user-images.githubusercontent.com/3757771/196205329-2df93451-c143-4d1b-a700-d988edf55efa.gif)

21 months agoMake flycheck workdone progress reports cancellable
Lukas Wirth [Mon, 17 Oct 2022 14:32:47 +0000 (16:32 +0200)]
Make flycheck workdone progress reports cancellable

21 months agoAuto merge of #13426 - Veykril:client-refactor, r=Veykril
bors [Mon, 17 Oct 2022 14:12:01 +0000 (14:12 +0000)]
Auto merge of #13426 - Veykril:client-refactor, r=Veykril

Refactor language client handling

Follow up to https://github.com/rust-lang/rust-analyzer/pull/12847 (turns out they fixed parts of the problem)

The PR will attempt to allow us to dispose more resources at will, so that we can implement restarts for the server properly instead of restating the entire extension as well as allowing us to implement a stop command.

Closes https://github.com/rust-lang/rust-analyzer/issues/12936
Closes https://github.com/rust-lang/rust-analyzer/issues/4697

21 months agoCleanup output channels
Lukas Wirth [Mon, 17 Oct 2022 14:01:39 +0000 (16:01 +0200)]
Cleanup output channels

21 months agoDowngrade vscode types dependency
Lukas Wirth [Mon, 17 Oct 2022 13:48:36 +0000 (15:48 +0200)]
Downgrade vscode types dependency

21 months agoImplement stop and start server commands
Lukas Wirth [Mon, 17 Oct 2022 13:43:15 +0000 (15:43 +0200)]
Implement stop and start server commands

21 months agoMake more things private
Lukas Wirth [Mon, 17 Oct 2022 13:05:20 +0000 (15:05 +0200)]
Make more things private

21 months agoProperly reload changed configs for server start
Lukas Wirth [Mon, 17 Oct 2022 12:53:46 +0000 (14:53 +0200)]
Properly reload changed configs for server start

21 months agoRefactor language client handling
Lukas Wirth [Mon, 17 Oct 2022 12:20:14 +0000 (14:20 +0200)]
Refactor language client handling

21 months agoAuto merge of #13302 - Veykril:auto-publish, r=Veykril
bors [Mon, 17 Oct 2022 10:22:25 +0000 (10:22 +0000)]
Auto merge of #13302 - Veykril:auto-publish, r=Veykril

Don't auto-publish lib crates

I believe this should *just* work? With this cargo-workspaces should not consider them

21 months agoAuto merge of #13423 - Veykril:vscode-vars, r=Veykril
bors [Mon, 17 Oct 2022 10:08:12 +0000 (10:08 +0000)]
Auto merge of #13423 - Veykril:vscode-vars, r=Veykril

Substitute some VSCode variables in the VSCode client

cc https://github.com/rust-lang/rust-analyzer/issues/13405

21 months agoAuto merge of #13399 - DropDemBits:assists-format-args-capture-pt2, r=Veykril
bors [Mon, 17 Oct 2022 09:54:07 +0000 (09:54 +0000)]
Auto merge of #13399 - DropDemBits:assists-format-args-capture-pt2, r=Veykril

Migrate assists to format args captures, part 2

Continuation of #13379

Migrates:

- `generate_constant`
- `generate_default_from_enum_variant`
- `generate_default_from_new`
- `generate_delegate_methods`
- `generate_deref`
- `generate_documentation_template`
- `generate_enum_is_method`
- `generate_enum_projection_method`
- `generate_from_impl_for_enum`
- `generate_function`
- `generate_getter`
- `generate_impl`
- `generate_new`
- `generate_setter`

21 months agoSubstitute some VSCode variables in the VSCode client
Lukas Wirth [Sun, 16 Oct 2022 15:11:24 +0000 (17:11 +0200)]
Substitute some VSCode variables in the VSCode client

21 months agoAuto merge of #13397 - zyctree:zyctree-patch-2, r=lnicola
bors [Sun, 16 Oct 2022 17:40:21 +0000 (17:40 +0000)]
Auto merge of #13397 - zyctree:zyctree-patch-2, r=lnicola

fix link in syntax.md

21 months agoupdate link in syntax.md
zyctree [Sun, 16 Oct 2022 17:39:19 +0000 (01:39 +0800)]
update link in syntax.md

21 months agoupdate link in syntax.md
zyctree [Sun, 16 Oct 2022 15:41:32 +0000 (23:41 +0800)]
update link in syntax.md

21 months agoAuto merge of #13354 - Veykril:try-stuff, r=Veykril
bors [Sun, 16 Oct 2022 11:11:08 +0000 (11:11 +0000)]
Auto merge of #13354 - Veykril:try-stuff, r=Veykril

feat: Diagnose some incorrect usages of the question mark operator

Trying to figure out how the type stuff in r-a works some more, I think I am doing this correct here but I am not quite sure :)

21 months agoDiagnose incorrect usages of the question mark operator
Lukas Wirth [Wed, 5 Oct 2022 17:15:07 +0000 (19:15 +0200)]
Diagnose incorrect usages of the question mark operator

21 months agoAuto merge of #13408 - lowr:patch/bump-chalk-0.86, r=Veykril
bors [Sun, 16 Oct 2022 10:57:23 +0000 (10:57 +0000)]
Auto merge of #13408 - lowr:patch/bump-chalk-0.86, r=Veykril

Bump chalk

There's a bug in current chalk that prevents us from properly supporting GATs, which is supposed to be fixed in v0.86. Note the following:
- v0.86 is only going to be released next Sunday so I'll keep this PR as draft until then.
- This doesn't compile without https://github.com/rust-lang/chalk/pull/779, which I hope will be included in v0.86. I confirmed this compiles with it locally.

Two breaking changes from v0.84:
- `TypeFolder` has been split into `TypeFolder` and `FallibleTypeFolder` (https://github.com/rust-lang/chalk/pull/772)
- `ProjectionTy::self_type_parameter()` has been removed (https://github.com/rust-lang/chalk/pull/778)

21 months agoBump chalk to 0.86
Ryo Yoshida [Thu, 13 Oct 2022 15:39:14 +0000 (00:39 +0900)]
Bump chalk to 0.86

Two breaking changes:
- `TypeFolder` has been split into `TypeFolder` and `FallibleTypeFolder`
- `ProjectionTy::self_type_parameter()` has been removed

21 months agoAuto merge of #13421 - rust-lang:Veykril-patch-1, r=Veykril
bors [Sun, 16 Oct 2022 09:52:16 +0000 (09:52 +0000)]
Auto merge of #13421 - rust-lang:Veykril-patch-1, r=Veykril

Update guide.md to reflect support for proc-macros

21 months agoUpdate guide.md to reflect support for proc-macros
Lukas Wirth [Sun, 16 Oct 2022 09:52:01 +0000 (11:52 +0200)]
Update guide.md to reflect support for proc-macros

21 months agoAuto merge of #13402 - HKalbasi:patch-1, r=Veykril
bors [Sun, 16 Oct 2022 09:20:38 +0000 (09:20 +0000)]
Auto merge of #13402 - HKalbasi:patch-1, r=Veykril

Cast runnableEnv items to string

fix #13390

An alternative approach could be raising an error if there is non string values.

21 months agoAuto merge of #13420 - volsa:master, r=Veykril
bors [Sun, 16 Oct 2022 08:42:24 +0000 (08:42 +0000)]
Auto merge of #13420 - volsa:master, r=Veykril

fix: Ignore auto-import assist on parameter names

Fixes #13105; before & after

https://user-images.githubusercontent.com/29666622/195999489-0474c93a-b2bf-41c4-b7da-a4242a8082d8.mov

https://user-images.githubusercontent.com/29666622/195999571-605ee09c-bc6f-4ee5-bfe4-73e37254c647.mov

21 months agofix #13105: Ignore auto-import assist on parameter names
Volkan Sagcan [Sat, 15 Oct 2022 16:00:32 +0000 (18:00 +0200)]
fix #13105: Ignore auto-import assist on parameter names

21 months agoAuto merge of #13419 - lnicola:bump-setup-node, r=lnicola
bors [Sat, 15 Oct 2022 11:48:14 +0000 (11:48 +0000)]
Auto merge of #13419 - lnicola:bump-setup-node, r=lnicola

Bump `actions/setup-node`

Fixes more Node 12 deprecation warnings.

21 months agoBump actions/setup-node
Laurențiu Nicola [Sat, 15 Oct 2022 11:44:51 +0000 (14:44 +0300)]
Bump actions/setup-node

21 months agoAuto merge of #13418 - lnicola:bump-deps, r=lnicola
bors [Sat, 15 Oct 2022 11:27:12 +0000 (11:27 +0000)]
Auto merge of #13418 - lnicola:bump-deps, r=lnicola

Bump deps

21 months agoAdd new license
Laurențiu Nicola [Sat, 15 Oct 2022 11:07:21 +0000 (14:07 +0300)]
Add new license

21 months agoBump the rest of the deps
Laurențiu Nicola [Sat, 15 Oct 2022 10:06:10 +0000 (13:06 +0300)]
Bump the rest of the deps

21 months agoBump notify
Laurențiu Nicola [Sat, 15 Oct 2022 10:03:39 +0000 (13:03 +0300)]
Bump notify

21 months agoBump proc-macro2
Laurențiu Nicola [Sat, 15 Oct 2022 10:02:10 +0000 (13:02 +0300)]
Bump proc-macro2

21 months agoBump pulldown-cmark-to-cmark
Laurențiu Nicola [Sat, 15 Oct 2022 10:00:41 +0000 (13:00 +0300)]
Bump pulldown-cmark-to-cmark

21 months agoBump mimalloc
Laurențiu Nicola [Sat, 15 Oct 2022 09:59:56 +0000 (12:59 +0300)]
Bump mimalloc

21 months agoBump rowan
Laurențiu Nicola [Sat, 15 Oct 2022 09:58:57 +0000 (12:58 +0300)]
Bump rowan

21 months agoBump url
Laurențiu Nicola [Sat, 15 Oct 2022 09:57:30 +0000 (12:57 +0300)]
Bump url

21 months agoBump libc
Laurențiu Nicola [Sat, 15 Oct 2022 09:55:56 +0000 (12:55 +0300)]
Bump libc

21 months agoBump dashmap
Laurențiu Nicola [Sat, 15 Oct 2022 09:54:25 +0000 (12:54 +0300)]
Bump dashmap

21 months agoBump home
Laurențiu Nicola [Sat, 15 Oct 2022 09:53:26 +0000 (12:53 +0300)]
Bump home

21 months agoBump tracing
Laurențiu Nicola [Sat, 8 Oct 2022 18:30:04 +0000 (21:30 +0300)]
Bump tracing

21 months agoBump smallvec
Laurențiu Nicola [Thu, 6 Oct 2022 12:28:50 +0000 (15:28 +0300)]
Bump smallvec

21 months agoBump anyhow, arbitrary, itertools, semver, serde
Laurențiu Nicola [Mon, 3 Oct 2022 06:02:42 +0000 (09:02 +0300)]
Bump anyhow, arbitrary, itertools, semver, serde

21 months agoAuto merge of #13415 - lnicola:ovsx-timeout, r=lnicola
bors [Fri, 14 Oct 2022 16:39:16 +0000 (16:39 +0000)]
Auto merge of #13415 - lnicola:ovsx-timeout, r=lnicola

internal: Set a timeout when publishing to OVSX

CC https://github.com/rust-lang/rust-analyzer/issues/11080#issuecomment-1279212120

21 months agoSet a timeout when publishing to OVSX
Laurențiu Nicola [Fri, 14 Oct 2022 16:23:32 +0000 (19:23 +0300)]
Set a timeout when publishing to OVSX

21 months agoAuto merge of #13414 - lnicola:bump-cache, r=lnicola
bors [Fri, 14 Oct 2022 14:32:00 +0000 (14:32 +0000)]
Auto merge of #13414 - lnicola:bump-cache, r=lnicola

minor: Bump `Swatinem/rust-cache` to move off Node 12

21 months agoBump Swatinem/rust-cache to move off Node 12
Laurențiu Nicola [Fri, 14 Oct 2022 14:31:22 +0000 (17:31 +0300)]
Bump Swatinem/rust-cache to move off Node 12

21 months agoAuto merge of #13413 - rust-lang:revert-13367-fix-problem-matchers, r=jonas-schievink
bors [Fri, 14 Oct 2022 07:32:44 +0000 (07:32 +0000)]
Auto merge of #13413 - rust-lang:revert-13367-fix-problem-matchers, r=jonas-schievink

Revert "fix: in VSCode, correctly resolve relative paths to errors"

Reverts rust-lang/rust-analyzer#13367

I didn't manage to figure out what exactly is the issue, so reverting this to fix https://github.com/rust-lang/rust-analyzer/issues/13404 before monday.

21 months agoRevert "fix: in VSCode, correctly resolve relative paths to errors"
Jonas Schievink [Fri, 14 Oct 2022 07:28:44 +0000 (09:28 +0200)]
Revert "fix: in VSCode, correctly resolve relative paths to errors"

21 months agoAuto merge of #13401 - lnicola:opt-tests, r=lnicola
bors [Fri, 14 Oct 2022 07:00:38 +0000 (07:00 +0000)]
Auto merge of #13401 - lnicola:opt-tests, r=lnicola

Run `analysis-stats` on CI, with `opt-level = 1`

We might want to run `analysis-stats` on PRs, and this makes it less unbearable.

21 months agoRun analysis-stats on CI
Laurențiu Nicola [Thu, 13 Oct 2022 09:49:16 +0000 (12:49 +0300)]
Run analysis-stats on CI

21 months agofix formatting
HKalbasi [Wed, 12 Oct 2022 21:14:59 +0000 (14:14 -0700)]
fix formatting

21 months agoCast runnableEnv items to string
HKalbasi [Wed, 12 Oct 2022 17:10:49 +0000 (20:40 +0330)]
Cast runnableEnv items to string

21 months agoAvoid format! in favor of to_string
Laurențiu Nicola [Wed, 12 Oct 2022 14:01:54 +0000 (17:01 +0300)]
Avoid format! in favor of to_string

21 months agoSet opt-level = 1 on dev profile
Laurențiu Nicola [Wed, 12 Oct 2022 14:01:27 +0000 (17:01 +0300)]
Set opt-level = 1 on dev profile

21 months agoMigrate assists to format args captures, part 2
DropDemBits [Mon, 10 Oct 2022 18:22:01 +0000 (14:22 -0400)]
Migrate assists to format args captures, part 2

21 months agoAuto merge of #13358 - btwotwo:feature/env-vars-autocompletion, r=Veykril
bors [Tue, 11 Oct 2022 18:45:31 +0000 (18:45 +0000)]
Auto merge of #13358 - btwotwo:feature/env-vars-autocompletion, r=Veykril

feat: Autocomplete Cargo-defined env vars in `env!` and `option_env!` (#12448)

Closes #12448

Important to know:

- Variables are taken from https://doc.rust-lang.org/cargo/reference/environment-variables.html and hardcoded as a const array.
- For the sake of simplicity I didn't include the autocompletion of `CARGO_BIN_EXE_<name>` and `OUT_DIR` since it would require information about build.rs and binary name. If somebody knows an easy way of obtaining them I can add those vars as well :)

21 months agoFormatting
btwotwo [Tue, 11 Oct 2022 17:53:22 +0000 (19:53 +0200)]
Formatting

21 months agoFix formatting for cargo vars list
btwotwo [Tue, 11 Oct 2022 17:29:09 +0000 (19:29 +0200)]
Fix formatting for cargo vars list

21 months agoRename `get_outer_macro` to `macro_call_for_string_token`
btwotwo [Tue, 11 Oct 2022 17:28:42 +0000 (19:28 +0200)]
Rename `get_outer_macro` to `macro_call_for_string_token`

21 months agoRemove extra parameter, access Db through semantics
btwotwo [Tue, 11 Oct 2022 17:23:41 +0000 (19:23 +0200)]
Remove extra parameter, access Db through semantics

21 months agoAuto merge of #13382 - lowr:fix/reorder-dyn-bounds-on-render, r=lowr
bors [Tue, 11 Oct 2022 11:44:32 +0000 (11:44 +0000)]
Auto merge of #13382 - lowr:fix/reorder-dyn-bounds-on-render, r=lowr

fix: reorder dyn bounds on render

Fixes #13368

#13192 changed the order of dyn bounds, violating the [contract](https://github.com/rust-lang/rust-analyzer/blob/3a69435af7a1e6273744085cb251adb2b9c30a03/crates/hir-ty/src/display.rs#L896-L901) with `write_bounds_like_dyn_trait()` on render. The projection bounds are expected to come right after the trait bound they are accompanied with.

Although the reordering procedure can be made a bit more efficient, I opted for relying only on the [invariants](https://github.com/rust-lang/rust-analyzer/blob/3a69435af7a1e6273744085cb251adb2b9c30a03/crates/hir-ty/src/lower.rs#L995-L998) currently documented in `lower_dyn_trait()`. It's not the hottest path and dyn bounds tend to be short so I believe it shouldn't hurt performance noticeably.

21 months agoUpdate docs/dev/syntax.md
zyctree [Tue, 11 Oct 2022 11:37:49 +0000 (19:37 +0800)]
Update docs/dev/syntax.md

Co-authored-by: Laurențiu Nicola <lnicola@users.noreply.github.com>
21 months agofix: reorder dyn bounds on render
Ryo Yoshida [Mon, 10 Oct 2022 10:32:24 +0000 (19:32 +0900)]
fix: reorder dyn bounds on render

21 months agofix link in syntax.md
zyctree [Tue, 11 Oct 2022 06:05:04 +0000 (14:05 +0800)]
fix link in syntax.md

21 months agoAuto merge of #13357 - Veykril:minicore, r=Veykril
bors [Mon, 10 Oct 2022 21:43:17 +0000 (21:43 +0000)]
Auto merge of #13357 - Veykril:minicore, r=Veykril

internal: Allow minicore flags specification to be order independent

21 months agoAuto merge of #13329 - Veykril:rustc-proc-macro, r=Veykril
bors [Mon, 10 Oct 2022 21:35:07 +0000 (21:35 +0000)]
Auto merge of #13329 - Veykril:rustc-proc-macro, r=Veykril

Use $crate instead of std for panic builtin_fn_macro

This should be closer to the expected output and gets rid of a few type mismatches in rustc/library