aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | Add support for custom flycheck commands with JSON project workspacesAaron Wood2020-09-162-7/+19
| | | | | | | | | | | | | | | | | | | | | | | | | Enable flychecks with JSON project workspaces if an override command was provided as part of the client configuration.
* | | | | Merge #5993bors[bot]2020-09-1615-44/+166
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5993: Update chalk to 0.27 and add support for extern opaque types. r=crlf0710 a=crlf0710 Co-authored-by: Charles Lew <[email protected]>
| * | | | Use Ty::apply instead of simple and fix method resolution.Charles Lew2020-09-163-8/+14
| | | | |
| * | | | Add a test.Charles Lew2020-09-161-0/+38
| | | | |
| * | | | Lower extern type alias as foreign opaque type.Charles Lew2020-09-162-2/+8
| | | | |
| * | | | Update chalk to 0.27 and adapt to chalk changes.Charles Lew2020-09-1511-41/+113
| | | | |
* | | | | Merge #6011bors[bot]2020-09-161-0/+4
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6011: Document "consuming" semantic tokens modifier r=jonas-schievink a=Veetaha cc https://github.com/rust-analyzer/rust-analyzer/pull/5957/files Co-authored-by: Veetaha <[email protected]>
| * | | | | Document "consuming" semantic tokens modifierVeetaha2020-09-151-0/+4
|/ / / / /
* | | | | Merge #6010bors[bot]2020-09-151-33/+215
|\ \ \ \ \ | |_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6010: Avoid checking all ancestors and fix mis-completion r=jonas-schievink a=oxalica Refactor the logic of `completion_match` to check deterministic number of ancestors instead of `token.ancestors().find_map()`. This should fix wrong completions (https://github.com/rust-analyzer/rust-analyzer/pull/5976#issuecomment-692332191) and hopefully make completion to be faster (#6004). More play and test? @jonas-schievink @hammypants If this patch works, we can avoid the revert #6005 . :disappointed: Co-authored-by: oxalica <[email protected]>
| * | | | Avoid checking all ancestors and fix mis-completionoxalica2020-09-151-33/+215
|/ / / /
* | | | Merge #6008bors[bot]2020-09-152-1/+30
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | 6008: inline parameters for a function description r=jonas-schievink a=bnjjj close #6002 Co-authored-by: Benjamin Coenen <[email protected]>
| * | | inline parameters for a function description #6002Benjamin Coenen2020-09-151-5/+6
| | | | | | | | | | | | | | | | Signed-off-by: Benjamin Coenen <[email protected]>
| * | | inline parameters for a function description #6002Benjamin Coenen2020-09-152-1/+29
| | | | | | | | | | | | | | | | Signed-off-by: Benjamin Coenen <[email protected]>
* | | | Merge #6006bors[bot]2020-09-151-1/+1
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | 6006: Fix delimiter in SSR example r=jonas-schievink a=lnicola Co-authored-by: LaurenČ›iu Nicola <[email protected]>
| * | | Fix delimiter in SSR exampleLaurențiu Nicola2020-09-151-1/+1
| | | |
* | | | Merge #6001bors[bot]2020-09-141-1/+2
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6001: Add GitHub Sponsors link to blog post template r=jonas-schievink a=jonas-schievink Co-authored-by: Jonas Schievink <[email protected]>
| * | | | Add GitHub Sponsors link to blog post templateJonas Schievink2020-09-141-1/+2
|/ / / /
* | | | Merge #5999bors[bot]2020-09-141-6/+7
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | 5999: Update crates r=kjeremy a=kjeremy Co-authored-by: kjeremy <[email protected]>
| * | | Update crateskjeremy2020-09-141-6/+7
|/ / /
* | | Merge #5976bors[bot]2020-09-141-56/+119
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5976: Complete trait impl immediately after type/const/fn r=jonas-schievink a=oxalica Currently, we can complete type/const/fn but only if we typed an identifier. That is, `impl .. { fn f<|> }` has completions with all trait fn including `f`, but `impl .. { fn <|> }` doesn't provide any suggestion (even if explicit trigger it). This PR tweak the logic of completion match to make it possible. However, we still need to explicit trigger suggestions (`Control + Space` by default) in vscode to show. Not sure if we can make it automatically triggered after typing the space after `fn`. Another question is that I cannot figure out why `BLOCK_EXPR` need to be checked. A block expr directly inside a impl block should be invalid, and nested items will failed to locate impl block in specific offset and skip the suggestion. Now I simply removed it and no tests are broken. https://github.com/rust-analyzer/rust-analyzer/blob/4f91478e50dc5c2a87235e9be8bd91e3f62de4b4/crates/ide/src/completion/complete_trait_impl.rs#L109 Co-authored-by: oxalica <[email protected]>
| * | | Complete trait impl immediately after type/const/fnoxalica2020-09-111-56/+119
| | | |
* | | | Merge #5985bors[bot]2020-09-149-17/+65
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5985: Make MergeBehaviour configurable r=jonas-schievink a=Veykril This should make the newly implemented `MergeBehaviour` for import insertion configurable as roughly outlined in https://github.com/rust-analyzer/rust-analyzer/pull/5935#issuecomment-685834257. For the config name and the like I just picked what came to mind so that might be up for bikeshedding. Co-authored-by: Lukas Wirth <[email protected]>
| * | | | Make MergeBehaviour configurableLukas Wirth2020-09-129-17/+65
| | |/ / | |/| |
* | | | Merge #5971bors[bot]2020-09-1312-55/+314
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5971: Implement async blocks r=flodiebold a=oxalica Fix #4018 @flodiebold already gave a generic guide in the issue. Here's some concern about implementation detail: - Chalk doesn't support generator type yet. - Adding generator type as a brand new type (ctor) can be complex and need to *re-introduced* builtin impls. (Like how we implement closures before native closure support of chalk, which is already removed in #5401 ) - The output type of async block should be known after type inference of the whole body. - We cannot directly get the type from source like return-positon-impl-trait. But we still need to provide trait bounds when chalk asking for `opaque_ty_data`. - During the inference, the output type of async block can be temporary unknown and participate the later inference. `let a = async { None }; let _: i32 = a.await.unwrap();` So in this PR, the type of async blocks is inferred as an opaque type parameterized by the `Future::Output` type it should be, like what we do with closure type. And it really works now. Well, I still have some questions: - The bounds `AsyncBlockImplType<T>: Future<Output = T>` is currently generated in `opaque_ty_data`. I'm not sure if we should put this code here. - Type of async block is now rendered as `impl Future<Output = OutputType>`. Do we need to special display to hint that it's a async block? Note that closure type has its special format, instead of `impl Fn(..) -> ..` or function type. Co-authored-by: oxalica <[email protected]>
| * | | | Fix type walking about type of async blockoxalica2020-09-113-14/+78
| | | | |
| * | | | Fix and prettify commentsoxalica2020-09-111-4/+6
| | | | |
| * | | | Implement async blocksoxalica2020-09-1011-55/+248
| | | | |
* | | | | Merge #5987bors[bot]2020-09-122-4/+4
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5987: Bump node-fetch from 2.6.0 to 2.6.1 in /editors/code r=kjeremy a=dependabot[bot] Bumps [node-fetch](https://github.com/bitinn/node-fetch) from 2.6.0 to 2.6.1. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/bitinn/node-fetch/releases">node-fetch's releases</a>.</em></p> <blockquote> <h2>v2.6.1</h2> <p><strong>This is an important security release. It is strongly recommended to update as soon as possible.</strong></p> <p>See <a href="https://github.com/node-fetch/node-fetch/blob/master/docs/CHANGELOG.md#v261">CHANGELOG</a> for details.</p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/node-fetch/node-fetch/blob/master/docs/CHANGELOG.md">node-fetch's changelog</a>.</em></p> <blockquote> <h2>v2.6.1</h2> <p><strong>This is an important security release. It is strongly recommended to update as soon as possible.</strong></p> <ul> <li>Fix: honor the <code>size</code> option after following a redirect.</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/node-fetch/node-fetch/commit/b5e2e41b2b50bf2997720d6125accaf0dd68c0ab"><code>b5e2e41</code></a> update version number</li> <li><a href="https://github.com/node-fetch/node-fetch/commit/2358a6c2563d1730a0cdaccc197c611949f6a334"><code>2358a6c</code></a> Honor the <code>size</code> option after following a redirect and revert data uri support</li> <li><a href="https://github.com/node-fetch/node-fetch/commit/8c197f8982a238b3c345c64b17bfa92e16b4f7c4"><code>8c197f8</code></a> docs: Fix typos and grammatical errors in README.md (<a href="https://github-redirect.dependabot.com/bitinn/node-fetch/issues/686">#686</a>)</li> <li><a href="https://github.com/node-fetch/node-fetch/commit/1e99050f944ac435fce26a9549eadcc2419a968a"><code>1e99050</code></a> fix: Change error message thrown with redirect mode set to error (<a href="https://github-redirect.dependabot.com/bitinn/node-fetch/issues/653">#653</a>)</li> <li><a href="https://github.com/node-fetch/node-fetch/commit/244e6f63d42025465796e3ca4ce813bf2c31fc5b"><code>244e6f6</code></a> docs: Show backers in README</li> <li><a href="https://github.com/node-fetch/node-fetch/commit/6a5d192034a0f438551dffb6d2d8df2c00921d16"><code>6a5d192</code></a> fix: Properly parse meta tag when parameters are reversed (<a href="https://github-redirect.dependabot.com/bitinn/node-fetch/issues/682">#682</a>)</li> <li><a href="https://github.com/node-fetch/node-fetch/commit/47a24a03eb49a49d81b768892aee10074ed54a91"><code>47a24a0</code></a> chore: Add opencollective badge</li> <li><a href="https://github.com/node-fetch/node-fetch/commit/7b136627c537cb24430b0310638c9177a85acee1"><code>7b13662</code></a> chore: Add funding link</li> <li><a href="https://github.com/node-fetch/node-fetch/commit/5535c2ed478d418969ecfd60c16453462de2a53f"><code>5535c2e</code></a> fix: Check for global.fetch before binding it (<a href="https://github-redirect.dependabot.com/bitinn/node-fetch/issues/674">#674</a>)</li> <li><a href="https://github.com/node-fetch/node-fetch/commit/1d5778ad0d910dbd1584fb407a186f5a0bc1ea22"><code>1d5778a</code></a> docs: Add Discord badge</li> <li>Additional commits viewable in <a href="https://github.com/bitinn/node-fetch/compare/v2.6.0...v2.6.1">compare view</a></li> </ul> </details> <details> <summary>Maintainer changes</summary> <p>This version was pushed to npm by <a href="https://www.npmjs.com/~akepinski">akepinski</a>, a new releaser for node-fetch since your current version.</p> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=node-fetch&package-manager=npm_and_yarn&previous-version=2.6.0&new-version=2.6.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/configuring-github-dependabot-security-updates) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/rust-analyzer/rust-analyzer/network/alerts). </details> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
| * | | | | Bump node-fetch from 2.6.0 to 2.6.1 in /editors/codedependabot[bot]2020-09-122-4/+4
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bumps [node-fetch](https://github.com/bitinn/node-fetch) from 2.6.0 to 2.6.1. - [Release notes](https://github.com/bitinn/node-fetch/releases) - [Changelog](https://github.com/node-fetch/node-fetch/blob/master/docs/CHANGELOG.md) - [Commits](https://github.com/bitinn/node-fetch/compare/v2.6.0...v2.6.1) Signed-off-by: dependabot[bot] <[email protected]>
* | | | | Merge #5990bors[bot]2020-09-124-2/+45
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5990: Implement box patterns r=jonas-schievink a=jonas-schievink Co-authored-by: Jonas Schievink <[email protected]>
| * | | | Implement box pattern inferenceJonas Schievink2020-09-123-2/+20
| | | | |
| * | | | Add box pattern testJonas Schievink2020-09-121-0/+25
|/ / / /
* | | | Merge #5981bors[bot]2020-09-111-25/+16
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5981: Properly preserve macro braces during dbg! removal r=jonas-schievink a=SomeoneToIgnore Do `dbg![2 + 2] * 5` -> `(2 + 2) * 5` This PR also implicitly handles the `{}` case too, but I decided not to add it into the test case since it's a compiler error on the latest stable rustc. Co-authored-by: Kirill Bulatov <[email protected]>
| * | | | Properly preserve macro bracesKirill Bulatov2020-09-111-25/+16
| | | | |
* | | | | Merge #5980bors[bot]2020-09-111-4/+4
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5980: Update serde r=kjeremy a=kjeremy Co-authored-by: kjeremy <[email protected]>
| * | | | Update serdekjeremy2020-09-111-4/+4
|/ / / /
* | | | Merge #5977bors[bot]2020-09-111-6/+6
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5977: cargo update r=kjeremy a=kjeremy Co-authored-by: kjeremy <[email protected]>
| * | | | cargo updatekjeremy2020-09-111-6/+6
|/ / / /
* | | | Merge #5955bors[bot]2020-09-112-82/+114
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5955: Remove merge import code duplication r=jonas-schievink a=Veykril This removes the code duplication caused by #5935, this also allows the assist to merge imports that have equal visibility and prevents merges of unequal visibility. This PR also fixes an iteration mistake in the mentioned PR: Turns out I made a mistake when writing the `segment_iter` function, I was assuming that the `children` of a path will just be the segments, which is obviously not the case. This also brings insertion order of shorter paths in line with how `rustfmt` orders them. Co-authored-by: Lukas Wirth <[email protected]>
| * | | | Allow merge_imports assists to merge imports of equal visibilityLukas Wirth2020-09-052-6/+61
| | | | |
| * | | | Remove duplicated import merge logicLukas Wirth2020-09-052-77/+43
| | | | |
| * | | | Fix segment_iter not iterating segments properlyLukas Wirth2020-09-051-5/+16
| |/ / /
| | | |
| \ \ \
*-. \ \ \ Merge #5951 #5975bors[bot]2020-09-1114-34/+53
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5951: Rename record_field_pat to record_pat_field r=jonas-schievink a=pksunkara The token was renamed but not this. 5975: Report better errors in project.json/sysroot r=jonas-schievink a=jonas-schievink This does a bunch of light refactoring so that the `Sysroot` is loaded later, which makes sure that any errors are reported to the user. I then added a check that reports an error if libcore is missing in the loaded sysroot. Since a sysroot without libcore is very useless, this indicates a configuration error. Co-authored-by: Pavan Kumar Sunkara <[email protected]> Co-authored-by: Jonas Schievink <[email protected]>
| | * | | | Report better errors in project.json/sysrootJonas Schievink2020-09-114-17/+36
| | | |/ / | | |/| |
| * | | | Rename record_field_pat to record_pat_fieldPavan Kumar Sunkara2020-09-1010-17/+17
| | | | |
* | | | | Merge #5970bors[bot]2020-09-111-37/+118
|\ \ \ \ \ | |_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5970: Use better heuristics for replacement text when removing dbg! r=jonas-schievink a=SomeoneToIgnore Closes https://github.com/rust-analyzer/rust-analyzer/issues/5911 Co-authored-by: Kirill Bulatov <[email protected]>
| * | | | One more testKirill Bulatov2020-09-101-0/+2
| | | | |
| * | | | Use better heuristics for replacement text when removing dbg!Kirill Bulatov2020-09-101-37/+116
| |/ / /
* | | | Merge #5969bors[bot]2020-09-1110-5/+431
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5969: Propose module name completion options r=jonas-schievink a=SomeoneToIgnore <img width="539" alt="image" src="https://user-images.githubusercontent.com/2690773/92663009-cb0aec00-f308-11ea-9ef5-1faa91518031.png"> Currently traverses the whole file set every time we try to complete the module, as discussed in https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/mod.3C.7C.3E.20completion Co-authored-by: Kirill Bulatov <[email protected]>
| * | | | Adjust the test commentKirill Bulatov2020-09-111-9/+16
| | | | |