]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoMerge #3071
bors[bot] [Sun, 9 Feb 2020 20:21:47 +0000 (20:21 +0000)]
Merge #3071

3071: Freshen docs for prebuilt binaries and raLspServer setting r=matklad a=Veetaha

Better documented breaking changes as per an incident in #2988
Follow up for #3053

Co-authored-by: Veetaha <gerzoh1@gmail.com>
4 years agodocs: quick fix inner link in docs
Veetaha [Sun, 9 Feb 2020 19:40:39 +0000 (21:40 +0200)]
docs: quick fix inner link in docs

4 years agodocs: more documentation on prebuilt binaries all-editors-wise
Veetaha [Sun, 9 Feb 2020 19:25:24 +0000 (21:25 +0200)]
docs: more documentation on prebuilt binaries all-editors-wise

4 years agodocs: Freshen docs for prebuilt binaries and raLspServer setting
Veetaha [Sun, 9 Feb 2020 18:19:23 +0000 (20:19 +0200)]
docs: Freshen docs for prebuilt binaries and raLspServer setting

4 years agoMerge #3068
bors[bot] [Sun, 9 Feb 2020 15:32:39 +0000 (15:32 +0000)]
Merge #3068

3068: Do not import anything if first segment of the qualified path resolves r=matklad a=SomeoneToIgnore

Part of initial https://github.com/rust-analyzer/rust-analyzer/pull/3061, closing 2nd issue mentioned in the last comment there.

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
4 years agoFix rebase leftovers
Kirill Bulatov [Sun, 9 Feb 2020 15:25:05 +0000 (17:25 +0200)]
Fix rebase leftovers

4 years agoDo not import anything if first segment of FQN resolves
Kirill Bulatov [Sat, 8 Feb 2020 23:56:17 +0000 (01:56 +0200)]
Do not import anything if first segment of FQN resolves

4 years agoMerge #3053
bors[bot] [Sun, 9 Feb 2020 15:21:12 +0000 (15:21 +0000)]
Merge #3053

3053: Feature: downloading lsp server from GitHub r=matklad a=Veetaha

This is currently very WIP, I may need to change this and that, add "download language server command", logging stuff (for future bug reports), etc., but it already works.
Also didn't test this on windows yet and mac (don't have the latter)

The quirks:
* Downloaded binary doesn't have executable permissions by default, that's why we ~~`chmod 111`~~ (**[UPD]** `chmod 755` as per @lnicola [suggestion](https://github.com/rust-analyzer/rust-analyzer/pull/3053#discussion_r376694456)) for it.
* To remove installed binary run `rm /${HOME}/.config/Code/User/globalStorage/matklad.rust-analyzer/ra_lsp_server-linux`, ~~note that `-f` flag is necessary, because of `111` permissions (I think this should be changed)~~ (**[UPD]** --force is no longer needed due to 755 permissions).

I also tried to keep things simple and not to use too many dependencies, all the ones added have 0 dependencies, (`ts-not-nil` is my personal npm package, that imitates `unwrap()` in TypeScript)

**[UPD]** I reduced throttle latency of progress indicator to 200ms for smoother UX

// TODO:
- [x] ~~Add `Rust Analyzer: Download latest language server` vscode command.~~ **[UPD]**: having reviewed the code and estimated available options I concluded that this feature requires too many code changes, I'd like to extract this into a separate PR after we merge this one.
- [x] Add some logging for future debugging
- [x] ~~Gracefully handle the case when language server is not available (e.g. no internet connection, user explicitly rejected the download, etc.)~~ **[UPD]** Decided to postpone better implementation of graceful degradation logic as per [conversation](https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/Deployment.20and.20installation/near/187758550).

Demo (**[UPD]** this is a bit outdated, but still mainly reflects the feature):
![ra-github-release-download-mvp](https://user-images.githubusercontent.com/36276403/74077961-4f248a80-4a2d-11ea-962f-27c650fd6c4c.gif)

Related issue: #2988 #3007

Co-authored-by: Veetaha <gerzoh1@gmail.com>
Co-authored-by: Veetaha <veetaha2@gmail.com>
4 years agoMerge #3070
bors[bot] [Sun, 9 Feb 2020 15:14:30 +0000 (15:14 +0000)]
Merge #3070

3070: Set auto-import target r=matklad a=matklad

closes #3067

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoSet auto-import target
Aleksey Kladov [Sun, 9 Feb 2020 15:13:29 +0000 (16:13 +0100)]
Set auto-import target

closes #3067

4 years agodocs: fix spelling untill -> until
Veetaha [Sun, 9 Feb 2020 15:04:33 +0000 (17:04 +0200)]
docs: fix spelling untill -> until

Co-Authored-By: Jonas Platte <jplatte@users.noreply.github.com>
4 years agoMerge #3069
bors[bot] [Sun, 9 Feb 2020 15:04:20 +0000 (15:04 +0000)]
Merge #3069

3069: Simplify Assists interface r=matklad a=matklad

Instead of building a physical tree structure, just tag related
assists with the same group

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoSimplify Assists interface
Aleksey Kladov [Sun, 9 Feb 2020 14:32:53 +0000 (15:32 +0100)]
Simplify Assists interface

Instead of building a physical tree structure, just "tag" related
assists with the same group

4 years agodocs: minor fixes in wordings and punctuation
Veetaha [Sun, 9 Feb 2020 13:54:54 +0000 (15:54 +0200)]
docs: minor fixes in wordings and punctuation

4 years agovscode: updated docs on prebuilt binaries
Veetaha [Sun, 9 Feb 2020 13:51:28 +0000 (15:51 +0200)]
vscode: updated docs on prebuilt binaries

4 years agoSlightly simpler API for groups
Aleksey Kladov [Sun, 9 Feb 2020 13:30:27 +0000 (14:30 +0100)]
Slightly simpler API for groups

4 years agovscode: added logging when donloading binaries
Veetaha [Sun, 9 Feb 2020 13:01:00 +0000 (15:01 +0200)]
vscode: added logging when donloading binaries

4 years agoMerge #3066
bors[bot] [Sun, 9 Feb 2020 12:41:36 +0000 (12:41 +0000)]
Merge #3066

3066: Some README fixes/cleanups r=matklad a=flodiebold

Make capitalization more consistent and fix some typos.

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
4 years agoSome README fixes/cleanups
Florian Diebold [Sun, 9 Feb 2020 12:34:56 +0000 (13:34 +0100)]
Some README fixes/cleanups

Make capitalization more consistent and fix some typos.

4 years agovscode: move throtting of download progress to call site
Veetaha [Sun, 9 Feb 2020 12:18:05 +0000 (14:18 +0200)]
vscode: move throtting of download progress to call site

4 years agovscode: replaced unwrapNotNil() with ! as per @matklad
Veetaha [Sun, 9 Feb 2020 11:59:27 +0000 (13:59 +0200)]
vscode: replaced unwrapNotNil() with ! as per @matklad

4 years agovscode: refactor inverted ternaries to if statements as per @matklad
Veetaha [Sun, 9 Feb 2020 11:45:06 +0000 (13:45 +0200)]
vscode: refactor inverted ternaries to if statements as per @matklad

4 years agovscode: remove noise data fields declarations as per @matklad
Veetaha [Sun, 9 Feb 2020 11:39:54 +0000 (13:39 +0200)]
vscode: remove noise data fields declarations as per @matklad

4 years agovscode: refactor levels of code nesting and string literals quotes
Veetaha [Sun, 9 Feb 2020 11:36:36 +0000 (13:36 +0200)]
vscode: refactor levels of code nesting and string literals quotes

4 years agoMerge #3050
bors[bot] [Sun, 9 Feb 2020 11:35:08 +0000 (11:35 +0000)]
Merge #3050

3050: Refactor type parameters, implement argument position impl trait r=matklad a=flodiebold

I wanted to implement APIT by lowering to type parameters because we need to do that anyway for correctness and don't need Chalk support for it; this grew into some more wide-ranging refactoring of how type parameters are handled :sweat_smile:

 - use Ty::Bound instead of Ty::Param to represent polymorphism, and explicitly
   count binders. This gets us closer to Chalk's way of doing things, and means
   that we now only use Param as a placeholder for an unknown type, e.g. within
   a generic function. I.e. we're never using Param in a situation where we want
   to substitute it, and the method to do that is gone; `subst` now always works
   on bound variables. (This changes how the types of generic functions print;
   previously, you'd get something like `fn identity<i32>(T) -> T`, but now we
   display the substituted signature `fn identity<i32>(i32) -> i32`, which I think
   makes more sense.)
 - once we do this, it's more natural to represent `Param` by a globally unique
   ID; the use of indices was mostly to make substituting easier. This also
   means we fix the bug where `Param` loses its name when going through Chalk.
 - I would actually like to rename `Param` to `Placeholder` to better reflect its use and
   get closer to Chalk, but I'll leave that to a follow-up.
 - introduce a context for type lowering, to allow lowering `impl Trait` to
   different things depending on where we are. And since we have that, we can
   also lower type parameters directly to variables instead of placeholders.
   Also, we'll be able to use this later to collect diagnostics.
 - implement argument position impl trait by lowering it to type parameters.
   I've realized that this is necessary to correctly implement it; e.g. consider
   `fn foo(impl Display) -> impl Something`. It's observable that the return
   type of e.g. `foo(1u32)` unifies with itself, but doesn't unify with e.g.
   `foo(1i32)`; so the return type needs to be parameterized by the argument
   type.

This fixes a few bugs as well:
 - type parameters 'losing' their name when they go through Chalk, as mentioned
   above (i.e. getting `[missing name]` somewhere)
 - impl trait not being considered as implementing the super traits (very
   noticeable for the `db` in RA)
 - the fact that argument impl trait was only turned into variables when the
   function got called caused type mismatches when the function was used as a
   value (fixes a few type mismatches in RA)

The one thing I'm not so happy with here is how we're lowering `impl Trait` types to variables; since `TypeRef`s don't have an identity currently, we just count how many of them we have seen while going through the function signature. That's quite fragile though, since we have to do it while desugaring generics and while lowering the type signature, and in the exact same order in both cases. We could consider either giving only `TypeRef::ImplTrait` a local id, or maybe just giving all `TypeRef`s an identity after all (we talked about this before)...

Follow-up tasks:
 - handle return position impl trait; we basically need to create a variable and some trait obligations for that variable
 - rename `Param` to `Placeholder`

Co-authored-by: Florian Diebold <florian.diebold@freiheit.com>
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
4 years agovscode: fix chmod to octal literal
Veetaha [Sun, 9 Feb 2020 10:54:51 +0000 (12:54 +0200)]
vscode: fix chmod to octal literal

Co-Authored-By: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoMerge #3065
bors[bot] [Sun, 9 Feb 2020 10:47:15 +0000 (10:47 +0000)]
Merge #3065

3065: Remove ImportResolver-related stubs r=matklad a=SomeoneToIgnore

A follow-up for https://github.com/rust-analyzer/rust-analyzer/pull/3063/, removes the FIXME added during the https://github.com/rust-analyzer/rust-analyzer/pull/2982#issuecomment-581130028 changes.

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
4 years agoRemove ImportResolver-related stubs
Kirill Bulatov [Sun, 9 Feb 2020 10:34:41 +0000 (12:34 +0200)]
Remove ImportResolver-related stubs

4 years agoMerge #3063
bors[bot] [Sun, 9 Feb 2020 09:09:06 +0000 (09:09 +0000)]
Merge #3063

3063: Remove hard-coded auto-import during completion r=matklad a=matklad

We now have a real auto-import system, so we can do a proper thing.

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoRemove hard-coded auto-import during completion
Aleksey Kladov [Sun, 9 Feb 2020 09:04:47 +0000 (10:04 +0100)]
Remove hard-coded auto-import during completion

We now have a real auto-import system, so we can do a proper thing.

4 years agoMerge #3052
bors[bot] [Sun, 9 Feb 2020 08:51:56 +0000 (08:51 +0000)]
Merge #3052

3052: Rename add import assist r=matklad a=SomeoneToIgnore

Based on the https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/2.20assists.20with.20the.20same.20action.20name/near/187655643 and the related discussion.

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
4 years agovscode: minor names and message contents changes
Veetaha [Sat, 8 Feb 2020 22:58:53 +0000 (00:58 +0200)]
vscode: minor names and message contents changes

4 years agovscode: rename raLspServer variable to langServer
Veetaha [Sat, 8 Feb 2020 22:42:51 +0000 (00:42 +0200)]
vscode: rename raLspServer variable to langServer

4 years agovscode: refactor comment
Veetaha [Sat, 8 Feb 2020 22:28:32 +0000 (00:28 +0200)]
vscode: refactor comment

4 years agovscode: refactor platform artifact name query to switch statement, move BinarySource...
Veetaha [Sat, 8 Feb 2020 22:27:04 +0000 (00:27 +0200)]
vscode: refactor platform artifact name query to switch statement, move BinarySource union variants into a namespace

4 years agovscode: reduce throttle latency of downloadFile() progress callback for smoother UX
Veetaha [Sat, 8 Feb 2020 19:25:03 +0000 (21:25 +0200)]
vscode: reduce throttle latency of downloadFile() progress callback for smoother UX

4 years agovscode: add name to the second unused argument of withProgress() callback
Veetaha [Sat, 8 Feb 2020 19:24:29 +0000 (21:24 +0200)]
vscode: add name to the second unused argument of withProgress() callback

4 years agovscode: add docs to installation module interfaces and sanity check to donloadFile()
Veetaha [Sat, 8 Feb 2020 19:03:27 +0000 (21:03 +0200)]
vscode: add docs to installation module interfaces and sanity check to donloadFile()

4 years agovscode: converted fetchLatestArtifactMetadata params to positional, added docs
Veetaha [Sat, 8 Feb 2020 18:18:33 +0000 (20:18 +0200)]
vscode: converted fetchLatestArtifactMetadata params to positional, added docs

4 years agovscode: changed chmod value to 755 as per @lnicola
Veetaha [Sat, 8 Feb 2020 18:07:00 +0000 (20:07 +0200)]
vscode: changed chmod value to 755 as per @lnicola

4 years agoMerge #3054
bors[bot] [Sat, 8 Feb 2020 15:18:55 +0000 (15:18 +0000)]
Merge #3054

3054: Move emacs support to emacs-lsp r=flodiebold a=flodiebold

emacs-lsp has integrated most of the support code (https://github.com/emacs-lsp/lsp-mode/pull/1395 will remove the last differences, as far as I can tell), so remove rust-analyzer.el here and update the documentation.

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
4 years agoDocs cleanups
Florian Diebold [Sat, 8 Feb 2020 15:02:37 +0000 (16:02 +0100)]
Docs cleanups

4 years agoRemove rust-analyzer.el
Florian Diebold [Sat, 8 Feb 2020 14:55:05 +0000 (15:55 +0100)]
Remove rust-analyzer.el

The support has been moved to emacs-lsp.

4 years agovscode: amended config to use binary from globalStoragePath, added ui for downloading
Veetaha [Sat, 8 Feb 2020 02:22:44 +0000 (04:22 +0200)]
vscode: amended config to use binary from globalStoragePath, added ui for downloading

4 years agoadded fetchLatestArtifactMetadata() and downloadFile() functions
Veetaha [Fri, 7 Feb 2020 01:11:24 +0000 (03:11 +0200)]
added fetchLatestArtifactMetadata() and downloadFile() functions

4 years agovscode: add FIXME about language client shared resource protection
Veetaha [Thu, 6 Feb 2020 22:09:13 +0000 (00:09 +0200)]
vscode: add FIXME about language client shared resource protection

4 years agoRename add import assist
Kirill Bulatov [Fri, 7 Feb 2020 21:35:34 +0000 (23:35 +0200)]
Rename add import assist

4 years agoAdd two more tests
Florian Diebold [Fri, 7 Feb 2020 17:27:54 +0000 (18:27 +0100)]
Add two more tests

4 years agoFix some TODOs
Florian Diebold [Fri, 7 Feb 2020 17:17:23 +0000 (18:17 +0100)]
Fix some TODOs

4 years agoFix add_new assist (kind of)
Florian Diebold [Fri, 7 Feb 2020 17:17:08 +0000 (18:17 +0100)]
Fix add_new assist (kind of)

4 years agoDon't print implicit type args from impl Trait
Florian Diebold [Fri, 7 Feb 2020 15:39:48 +0000 (16:39 +0100)]
Don't print implicit type args from impl Trait

4 years agoDeal better with implicit type parameters and argument lists
Florian Diebold [Fri, 7 Feb 2020 15:24:09 +0000 (16:24 +0100)]
Deal better with implicit type parameters and argument lists

4 years agoFormatting
Florian Diebold [Fri, 7 Feb 2020 14:13:15 +0000 (15:13 +0100)]
Formatting

4 years agoClean up RPIT a bit
Florian Diebold [Fri, 7 Feb 2020 14:13:00 +0000 (15:13 +0100)]
Clean up RPIT a bit

4 years agoFix compilation of other crates
Florian Diebold [Tue, 4 Feb 2020 20:33:03 +0000 (21:33 +0100)]
Fix compilation of other crates

4 years agoUse variables in predicates as well
Florian Diebold [Sun, 2 Feb 2020 16:11:54 +0000 (17:11 +0100)]
Use variables in predicates as well

4 years agoComment fixes / todos
Florian Diebold [Sun, 2 Feb 2020 12:43:04 +0000 (13:43 +0100)]
Comment fixes / todos

4 years agoFix APIT some more
Florian Diebold [Sun, 2 Feb 2020 12:04:22 +0000 (13:04 +0100)]
Fix APIT some more

4 years agoFix APIT
Florian Diebold [Sat, 1 Feb 2020 16:45:43 +0000 (17:45 +0100)]
Fix APIT

4 years agoChange Ty::Param to contain param ID
Florian Diebold [Fri, 31 Jan 2020 15:52:43 +0000 (16:52 +0100)]
Change Ty::Param to contain param ID

4 years agoWIP use params for APIT
Florian Diebold [Fri, 31 Jan 2020 15:05:58 +0000 (16:05 +0100)]
WIP use params for APIT

4 years agoFix assoc type selection
Florian Diebold [Fri, 31 Jan 2020 14:57:44 +0000 (15:57 +0100)]
Fix assoc type selection

4 years agoFix another test
Florian Diebold [Fri, 31 Jan 2020 14:34:43 +0000 (15:34 +0100)]
Fix another test

4 years agoFirst stab at desugaring bounds for APIT
Florian Diebold [Fri, 31 Jan 2020 14:17:48 +0000 (15:17 +0100)]
First stab at desugaring bounds for APIT

4 years agoFix crash
Florian Diebold [Wed, 29 Jan 2020 21:32:37 +0000 (22:32 +0100)]
Fix crash

4 years agoFix enum constructors
Florian Diebold [Wed, 29 Jan 2020 20:30:24 +0000 (21:30 +0100)]
Fix enum constructors

4 years agoFix printing of function types
Florian Diebold [Tue, 28 Jan 2020 20:42:58 +0000 (21:42 +0100)]
Fix printing of function types

4 years agoLower impl trait to variables, move away from using placeholders where they don't...
Florian Diebold [Sat, 25 Jan 2020 22:38:33 +0000 (23:38 +0100)]
Lower impl trait to variables, move away from using placeholders where they don't belong

4 years agowip lower impl trait to type args
Florian Diebold [Fri, 24 Jan 2020 18:35:09 +0000 (19:35 +0100)]
wip lower impl trait to type args

4 years agowip implement lowering mode
Florian Diebold [Fri, 24 Jan 2020 15:46:43 +0000 (16:46 +0100)]
wip implement lowering mode

4 years agoAdd impl trait lowering mode
Florian Diebold [Fri, 24 Jan 2020 14:22:00 +0000 (15:22 +0100)]
Add impl trait lowering mode

4 years agoIntroduce TyLoweringContext
Florian Diebold [Fri, 24 Jan 2020 13:32:47 +0000 (14:32 +0100)]
Introduce TyLoweringContext

4 years agoMerge #3049
bors[bot] [Fri, 7 Feb 2020 16:28:33 +0000 (16:28 +0000)]
Merge #3049

3049: Introduce assists utils r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoIntroduce assists utils
Aleksey Kladov [Fri, 7 Feb 2020 14:57:38 +0000 (15:57 +0100)]
Introduce assists utils

4 years agoName assist handlers
Aleksey Kladov [Fri, 7 Feb 2020 14:53:31 +0000 (15:53 +0100)]
Name assist handlers

4 years agoCleanups
Aleksey Kladov [Fri, 7 Feb 2020 14:12:51 +0000 (15:12 +0100)]
Cleanups

4 years agoCleanup imports
Aleksey Kladov [Fri, 7 Feb 2020 14:10:19 +0000 (15:10 +0100)]
Cleanup imports

4 years agoCleanup
Aleksey Kladov [Fri, 7 Feb 2020 14:04:50 +0000 (15:04 +0100)]
Cleanup

4 years agoCleanup
Aleksey Kladov [Fri, 7 Feb 2020 13:55:47 +0000 (14:55 +0100)]
Cleanup

4 years agoSimplify
Aleksey Kladov [Fri, 7 Feb 2020 13:53:50 +0000 (14:53 +0100)]
Simplify

4 years agoMerge #3048
bors[bot] [Fri, 7 Feb 2020 13:35:02 +0000 (13:35 +0000)]
Merge #3048

3048: Remove irrelevant distinction r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoRename
Aleksey Kladov [Fri, 7 Feb 2020 13:26:59 +0000 (14:26 +0100)]
Rename

4 years agoRemove irrelevant distinction
Aleksey Kladov [Fri, 7 Feb 2020 11:51:12 +0000 (12:51 +0100)]
Remove irrelevant distinction

4 years agoMerge #3047
bors[bot] [Fri, 7 Feb 2020 13:21:02 +0000 (13:21 +0000)]
Merge #3047

3047: Update async unsafe fn ordering in parser r=matklad a=kiljacken

As of rust-lang/rust#61319 the correct order for functions that are both unsafe and async is: `async unsafe fn` and not `unsafe async fn`.

This commit updates the parser tests to reflect this, and corrects parsing behavior to accept the correct ordering.

Fixes #3025

Co-authored-by: Emil Lauridsen <mine809@gmail.com>
4 years agoMerge #3040
bors[bot] [Fri, 7 Feb 2020 13:13:36 +0000 (13:13 +0000)]
Merge #3040

3040: Rework value parameter parsing r=matklad a=tobz1000

Fixes #2847.

- `Fn__(...)` parameters with idents/patterns no longer parse
- Trait function parameters with arbitrary patterns parse
- Trait function parameters without idents/patterns no longer parse
- `fn(...)` parameters no longer parse with patterns other than a single ident

__Question__: The pre-existing test `param_list_opt_patterns` has been kept as-is, although the name no longer makes sense (it's testing `Fn__(...)` params, which aren't allowed patterns any more). What would be best to do about this?

Co-authored-by: Toby Dimmick <tobydimmick@pm.me>
4 years agoUpdate async unsafe fn ordering.
Emil Lauridsen [Fri, 7 Feb 2020 12:51:51 +0000 (13:51 +0100)]
Update async unsafe fn ordering.

As of rust-lang/rust#61319 the correct order for functions that are both
unsafe and async is: `async unsafe fn` and not `unsafe async fn`.

This commit updates the parser tests to reflect this, and corrects
parsing behavior to accept the correct ordering.

Fixes #3025

4 years agoPR tweaks
Toby Dimmick [Fri, 7 Feb 2020 12:36:33 +0000 (12:36 +0000)]
PR tweaks

4 years agoMerge #3044
bors[bot] [Fri, 7 Feb 2020 11:41:25 +0000 (11:41 +0000)]
Merge #3044

3044: Don't crash when recieving unkown file for cargo diagnostic. r=matklad a=kiljacken

Fixes #3014

Co-authored-by: Emil Lauridsen <mine809@gmail.com>
4 years agoto_string_lossy() -> display()
Emil Lauridsen [Fri, 7 Feb 2020 11:35:36 +0000 (12:35 +0100)]
to_string_lossy() -> display()

4 years agoMerge #3045
bors[bot] [Fri, 7 Feb 2020 11:34:31 +0000 (11:34 +0000)]
Merge #3045

3045: Cleanup early return assist r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoCleanup early return assist
Aleksey Kladov [Fri, 7 Feb 2020 10:51:16 +0000 (11:51 +0100)]
Cleanup early return assist

4 years agoDon't crash when recieving unkown file for cargo diagnostic.
Emil Lauridsen [Fri, 7 Feb 2020 11:30:29 +0000 (12:30 +0100)]
Don't crash when recieving unkown file for cargo diagnostic.

4 years agoGeneralize invert_if to just always work
Aleksey Kladov [Fri, 7 Feb 2020 11:07:38 +0000 (12:07 +0100)]
Generalize invert_if to just always work

4 years agoMerge #3042
bors[bot] [Thu, 6 Feb 2020 23:00:07 +0000 (23:00 +0000)]
Merge #3042

3042: A tiny bit more consistent API r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoA tiny bit more consistent API
Aleksey Kladov [Thu, 6 Feb 2020 22:59:27 +0000 (23:59 +0100)]
A tiny bit more consistent API

4 years agoClosure params test
Toby Dimmick [Thu, 6 Feb 2020 20:39:27 +0000 (20:39 +0000)]
Closure params test

4 years agorustfmt
Toby Dimmick [Thu, 6 Feb 2020 20:04:35 +0000 (20:04 +0000)]
rustfmt

4 years agoRework value parameter parsing
Toby Dimmick [Thu, 6 Feb 2020 11:44:00 +0000 (11:44 +0000)]
Rework value parameter parsing

- `Fn__(...)` parameters with idents/patterns no longer parse
- Trait function parameters with arbitrary patterns parse
- Trait function parameters without idents/patterns no longer parse
- `fn(...)` parameters no longer parse with patterns other than a single ident

4 years agoMerge #3038
bors[bot] [Thu, 6 Feb 2020 17:50:11 +0000 (17:50 +0000)]
Merge #3038

3038: Minor rename r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoMinor rename
Aleksey Kladov [Thu, 6 Feb 2020 17:46:11 +0000 (18:46 +0100)]
Minor rename