]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agoSplit parse and expand errors
Wilco Kusee [Sun, 3 Mar 2019 09:40:03 +0000 (10:40 +0100)]
Split parse and expand errors

5 years agoFormatting
Wilco Kusee [Sat, 2 Mar 2019 19:49:13 +0000 (20:49 +0100)]
Formatting

5 years agoReplace option with result in mbe
Wilco Kusee [Sat, 2 Mar 2019 19:20:26 +0000 (20:20 +0100)]
Replace option with result in mbe

5 years agoMerge #910
bors[bot] [Thu, 28 Feb 2019 19:53:15 +0000 (19:53 +0000)]
Merge #910

910: Update hover message since we do support globs r=matklad a=kjeremy

#909 drew attention to this.

Co-authored-by: kjeremy <kjeremy@gmail.com>
5 years agoUpdate hover message since we do support globs
kjeremy [Thu, 28 Feb 2019 19:48:21 +0000 (14:48 -0500)]
Update hover message since we do support globs

5 years agoadd syntax-trees video
Aleksey Kladov [Thu, 28 Feb 2019 19:08:17 +0000 (22:08 +0300)]
add syntax-trees video

5 years agoMerge #906
bors[bot] [Wed, 27 Feb 2019 15:59:56 +0000 (15:59 +0000)]
Merge #906

906: Add support for goto definition and hover for struct fields r=matklad a=vipentti

This works partially towards fixing #512

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
5 years agoEnable hover support for NamedFieldDefs
Ville Penttinen [Wed, 27 Feb 2019 15:52:37 +0000 (17:52 +0200)]
Enable hover support for NamedFieldDefs

Additionally add type ascription for const and statics as well.

5 years agoAllow goto-definition to work for named fields in struct initializer
Ville Penttinen [Wed, 27 Feb 2019 15:22:53 +0000 (17:22 +0200)]
Allow goto-definition to work for named fields in struct initializer

Now goto definition should work when done on a named field in a struct
initializer.

5 years agoMerge #905
bors[bot] [Wed, 27 Feb 2019 15:22:53 +0000 (15:22 +0000)]
Merge #905

905: Update deps r=kjeremy a=kjeremy

Co-authored-by: kjeremy <kjeremy@gmail.com>
5 years agoFix the build
kjeremy [Wed, 27 Feb 2019 14:35:04 +0000 (09:35 -0500)]
Fix the build

5 years agoUpdate deps
kjeremy [Wed, 27 Feb 2019 13:58:13 +0000 (08:58 -0500)]
Update deps

5 years agoMerge #900
bors[bot] [Wed, 27 Feb 2019 12:18:55 +0000 (12:18 +0000)]
Merge #900

900: Add new trait ast::TypeAscriptionOwner r=vipentti a=vipentti

This trait should be implemented for nodes which have an ascribed type,
e.g. thing : Type. Such as let, const, static, param, named struct fields.

In addition, we update some places where previously we used node + node.type_ref() with `TypeAscriptionOwner` in the trait bounds.

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
5 years agoRemove `TypeRef` from item opts which implement TypeAscriptionOwner
Ville Penttinen [Wed, 27 Feb 2019 12:00:08 +0000 (14:00 +0200)]
Remove `TypeRef` from item opts which implement TypeAscriptionOwner

5 years agoMerge #901
bors[bot] [Wed, 27 Feb 2019 11:50:38 +0000 (11:50 +0000)]
Merge #901

901: Add basic support for showing fn signature when hovering r=matklad a=vipentti

This adds basic support for displaying function signature when hovering over a usage of a function.

Additionally refactored `hover` to return `HoverResult` to ease with testing and in general to be more robust.

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
5 years agoMerge #903
bors[bot] [Wed, 27 Feb 2019 11:09:47 +0000 (11:09 +0000)]
Merge #903

903: Work around for issue in vscode reporting a failure in request r=matklad a=vipentti

vscode would report "A request has failed" when it got "Content modified"
message and this would cause a pop-up to appear. This works around the issue by
returning an "empty" response that vscode can ignore.

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
5 years agoRemove RawResponse::empty()
Ville Penttinen [Wed, 27 Feb 2019 10:57:59 +0000 (12:57 +0200)]
Remove RawResponse::empty()

5 years agoWork around for issue in vscode reporting a failure in request
Ville Penttinen [Wed, 27 Feb 2019 10:49:04 +0000 (12:49 +0200)]
Work around for issue in vscode reporting a failure in request

vscode would report "A request has failed" when it got "Content modified"
message and this would cause a pop-up to appear. This works around the issue by
returning an "empty" response that vscode can ignore.

5 years agoAdd support for hovering over the name of an item
Ville Penttinen [Wed, 27 Feb 2019 07:49:22 +0000 (09:49 +0200)]
Add support for hovering over the name of an item

5 years agoReplace visit_fn with crate::completion::function_label
Ville Penttinen [Tue, 26 Feb 2019 19:30:46 +0000 (21:30 +0200)]
Replace visit_fn with crate::completion::function_label

5 years agoMerge #902
bors[bot] [Tue, 26 Feb 2019 18:04:24 +0000 (18:04 +0000)]
Merge #902

902: Fix a typo r=matklad a=dwijnand

Co-authored-by: Dale Wijnand <dale.wijnand@gmail.com>
5 years agoFix a typo
Dale Wijnand [Tue, 26 Feb 2019 17:59:32 +0000 (17:59 +0000)]
Fix a typo

5 years agoAdd new type HoverResult to contain the results of hovering
Ville Penttinen [Tue, 26 Feb 2019 16:56:04 +0000 (18:56 +0200)]
Add new type HoverResult to contain the results of hovering

This makes testing hovers easier as well as allows us to do more things with the
results if needed.

5 years agoAdd support for showing fn signature when hovering
Ville Penttinen [Tue, 26 Feb 2019 16:55:08 +0000 (18:55 +0200)]
Add support for showing fn signature when hovering

5 years agoUse TypeAscriptionOwner
Ville Penttinen [Tue, 26 Feb 2019 09:47:13 +0000 (11:47 +0200)]
Use TypeAscriptionOwner

This replaces places where we would use node + node.type_ref() with things that
have an ascribed type, with using the TypeAscriptionOwner as the trait bound so
we can simply pass the node.

5 years agoAdd new trait TypeAscriptionOwner
Ville Penttinen [Tue, 26 Feb 2019 09:35:57 +0000 (11:35 +0200)]
Add new trait TypeAscriptionOwner

This trait should be implemented for nodes which have an ascribed type,
e.g. thing : Type. Such as let, const, static, param, named struct fields.

5 years agoMerge #899
bors[bot] [Tue, 26 Feb 2019 08:49:17 +0000 (08:49 +0000)]
Merge #899

899: Change default value of highlightingOn to false r=matklad a=vipentti

This changes the default value for the vscode setting `rust-analyzer.highlightingOn` to `false`. Since currently the highlighting only supports Zenburn, which people may not be using, I think it makes sense to have this feature disabled by default.

This was discussed in #896

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
5 years agoChange default value of highlightingOn to false
Ville Penttinen [Tue, 26 Feb 2019 06:56:11 +0000 (08:56 +0200)]
Change default value of highlightingOn to false

5 years agoMerge #897
bors[bot] [Mon, 25 Feb 2019 12:03:57 +0000 (12:03 +0000)]
Merge #897

897: Add basic const/static type inference r=flodiebold a=vipentti

This adds basic const/static type inference discussed in #887.

Currently the inference does not work for const/static declared inside a block. In addition the inference does not work inside the bodies of const/static.

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
5 years agokill accidently commited file
Aleksey Kladov [Mon, 25 Feb 2019 12:02:12 +0000 (15:02 +0300)]
kill accidently commited file

5 years agoMerge #898
bors[bot] [Mon, 25 Feb 2019 10:51:37 +0000 (10:51 +0000)]
Merge #898

898: rename type to type_alias in the AST as well r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
5 years agorename type to type_alias in the AST as well
Aleksey Kladov [Mon, 25 Feb 2019 10:38:52 +0000 (13:38 +0300)]
rename type to type_alias in the AST as well

5 years agoMove ConstSignature creation to a single method
Ville Penttinen [Mon, 25 Feb 2019 08:29:56 +0000 (10:29 +0200)]
Move ConstSignature creation to a single method

5 years agoAdd static type inference
Ville Penttinen [Mon, 25 Feb 2019 08:21:01 +0000 (10:21 +0200)]
Add static type inference

5 years agoAdd const type inference
Ville Penttinen [Mon, 25 Feb 2019 07:27:47 +0000 (09:27 +0200)]
Add const type inference

5 years agoMerge #895
bors[bot] [Sun, 24 Feb 2019 20:52:04 +0000 (20:52 +0000)]
Merge #895

895: complete patterns r=matklad a=matklad

bors r+

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
5 years agocomplete patterns
Aleksey Kladov [Sun, 24 Feb 2019 20:49:47 +0000 (23:49 +0300)]
complete patterns

5 years agoMerge #894
bors[bot] [Sun, 24 Feb 2019 20:39:27 +0000 (20:39 +0000)]
Merge #894

894: Rename Type => TypeAlias r=matklad a=flodiebold

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
5 years agoRename Type => TypeAlias
Florian Diebold [Sun, 24 Feb 2019 20:36:49 +0000 (21:36 +0100)]
Rename Type => TypeAlias

5 years agoMerge #892
bors[bot] [Sun, 24 Feb 2019 20:08:10 +0000 (20:08 +0000)]
Merge #892

892: Type aliases r=matklad a=flodiebold

This implements type aliases (i.e. `type` definitions).

There's just one snag: handling recursion. E.g. `type Foo = Foo` makes type inference panic with a query cycle. I think the best way to handle this would be if Salsa provided the ability to catch cycle errors? It seems that there's some work underway to support this [here](https://github.com/salsa-rs/salsa/issues/6) and [here](https://github.com/salsa-rs/salsa/pull/147). Should we wait for this? I don't see a good way to handle this without help from Salsa.

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
5 years agoAdd test for recursive type aliases
Florian Diebold [Sun, 24 Feb 2019 16:29:07 +0000 (17:29 +0100)]
Add test for recursive type aliases

5 years agoImplement support for type aliases
Florian Diebold [Sun, 24 Feb 2019 16:25:41 +0000 (17:25 +0100)]
Implement support for type aliases

5 years agoMerge #893
bors[bot] [Sun, 24 Feb 2019 18:56:49 +0000 (18:56 +0000)]
Merge #893

893: Completion presentation r=matklad a=matklad

Just moves completion code around a bit, to keep logic for producing completions and logic for rendering them into completion items separate.

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
5 years agomove testing functions
Aleksey Kladov [Sun, 24 Feb 2019 18:54:13 +0000 (21:54 +0300)]
move testing functions

5 years agomove the rest of presentation to presentation
Aleksey Kladov [Sun, 24 Feb 2019 18:46:04 +0000 (21:46 +0300)]
move the rest of presentation to presentation

5 years agomove more code to presentation
Aleksey Kladov [Sun, 24 Feb 2019 18:34:38 +0000 (21:34 +0300)]
move more code to presentation

5 years agomove res completion to presentation
Aleksey Kladov [Sun, 24 Feb 2019 18:21:31 +0000 (21:21 +0300)]
move res completion to presentation

5 years agosimplify
Aleksey Kladov [Sun, 24 Feb 2019 17:59:12 +0000 (20:59 +0300)]
simplify

5 years agomove enum-variants to presentation
Aleksey Kladov [Sun, 24 Feb 2019 17:56:19 +0000 (20:56 +0300)]
move enum-variants to presentation

5 years agosimplify
Aleksey Kladov [Sun, 24 Feb 2019 17:49:55 +0000 (20:49 +0300)]
simplify

5 years agomove presentaion completion to presentation
Aleksey Kladov [Sun, 24 Feb 2019 16:37:22 +0000 (19:37 +0300)]
move presentaion completion to presentation

5 years agomove function rendering to presentation
Aleksey Kladov [Sun, 24 Feb 2019 16:34:27 +0000 (19:34 +0300)]
move function rendering to presentation

5 years agointroduce completion presentation
Aleksey Kladov [Sun, 24 Feb 2019 15:51:38 +0000 (18:51 +0300)]
introduce completion presentation

This module should remove completion rendering boilerplate from the
"brains" of completion engine.

5 years agoMerge #891
bors[bot] [Sun, 24 Feb 2019 14:39:38 +0000 (14:39 +0000)]
Merge #891

891: Field completion r=matklad a=matklad

bors r+

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
5 years agocomplete fields in struct literals
Aleksey Kladov [Sun, 24 Feb 2019 14:23:54 +0000 (17:23 +0300)]
complete fields in struct literals

5 years agoMerge #890
bors[bot] [Sun, 24 Feb 2019 14:19:54 +0000 (14:19 +0000)]
Merge #890

890: Clean up imports a bit r=flodiebold a=flodiebold

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
5 years agoClean up imports a bit
Florian Diebold [Sun, 24 Feb 2019 14:12:10 +0000 (15:12 +0100)]
Clean up imports a bit

5 years agocomplete struct literals
Aleksey Kladov [Sun, 24 Feb 2019 14:01:56 +0000 (17:01 +0300)]
complete struct literals

5 years agosupport upcastig in AST enum
Aleksey Kladov [Sun, 24 Feb 2019 13:57:05 +0000 (16:57 +0300)]
support upcastig in AST enum

5 years agoMerge #889
bors[bot] [Sun, 24 Feb 2019 12:52:44 +0000 (12:52 +0000)]
Merge #889

889: Refactor assits r=matklad a=matklad

* assign unique IDs to assists so that clients could do custom stuff
* specify kinds for assists,
* make introduce_variable a `refactoring.extract` and make it available only when expression is selected
* introduce marks to assists

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
5 years agoadd marks to assists
Aleksey Kladov [Sun, 24 Feb 2019 11:22:25 +0000 (14:22 +0300)]
add marks to assists

5 years agodont show introduce variable everywhere
Aleksey Kladov [Sun, 24 Feb 2019 11:18:10 +0000 (14:18 +0300)]
dont show introduce variable everywhere

5 years agoAssign IDs to assists
Aleksey Kladov [Sun, 24 Feb 2019 10:53:35 +0000 (13:53 +0300)]
Assign IDs to assists

5 years agoMerge #885
bors[bot] [Sun, 24 Feb 2019 10:15:43 +0000 (10:15 +0000)]
Merge #885

885: Parse token trees directy r=matklad a=matklad

This takes advantage of the recent macro refactoring to directly parse token stream into a syntax tree.

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
5 years agorename
Aleksey Kladov [Sun, 24 Feb 2019 10:14:14 +0000 (13:14 +0300)]
rename

5 years agoMerge #886
bors[bot] [Sun, 24 Feb 2019 06:45:08 +0000 (06:45 +0000)]
Merge #886

886: Associated method generics r=matklad a=flodiebold

Refactor associated method resolution a bit and make it work with generics.

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
5 years agoRefactor associated method resolution a bit and make it work with generics
Florian Diebold [Sat, 23 Feb 2019 21:59:01 +0000 (22:59 +0100)]
Refactor associated method resolution a bit and make it work with generics

5 years agoAdd a test for macro parsing
Aleksey Kladov [Sat, 23 Feb 2019 14:51:23 +0000 (17:51 +0300)]
Add a test for macro parsing

5 years agoMerge #884
bors[bot] [Sat, 23 Feb 2019 14:48:54 +0000 (14:48 +0000)]
Merge #884

884: Split ty.rs into several modules r=matklad a=flodiebold

It was just getting too big. We now have:

 - ty: the `Ty` enum and helpers
 - ty::infer: actual type inference
 - ty::lower: lowering from HIR to `Ty`
 - ty::op: helpers for binary operations, currently

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
5 years agoSplit ty.rs into several modules
Florian Diebold [Sat, 23 Feb 2019 14:24:07 +0000 (15:24 +0100)]
Split ty.rs into several modules

It was just getting too big. We now have:

 - ty: the `Ty` enum and helpers
 - ty::infer: actual type inference
 - ty::lower: lowering from HIR to `Ty`
 - ty::op: helpers for binary operations, currently

5 years agoimplement tt -> ast
Aleksey Kladov [Sat, 23 Feb 2019 14:21:56 +0000 (17:21 +0300)]
implement tt -> ast

5 years agokeep-text
Aleksey Kladov [Sat, 23 Feb 2019 12:43:45 +0000 (15:43 +0300)]
keep-text

5 years agoflatten tt
Aleksey Kladov [Sat, 23 Feb 2019 12:29:06 +0000 (15:29 +0300)]
flatten tt

5 years agotoken source scaffold
Aleksey Kladov [Sat, 23 Feb 2019 11:18:32 +0000 (14:18 +0300)]
token source scaffold

5 years agoadd dependency on the parser
Aleksey Kladov [Sat, 23 Feb 2019 11:07:29 +0000 (14:07 +0300)]
add dependency on the parser

5 years agoadd interface
Aleksey Kladov [Sat, 23 Feb 2019 11:06:10 +0000 (14:06 +0300)]
add interface

5 years agointroduce tree builder
Aleksey Kladov [Sat, 23 Feb 2019 13:55:01 +0000 (16:55 +0300)]
introduce tree builder

5 years agoMerge #883
bors[bot] [Sat, 23 Feb 2019 13:16:41 +0000 (13:16 +0000)]
Merge #883

883: Fix fill_match_arms not working with references r=matklad a=vipentti

This fixes #881

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
5 years agoSimplify test_fill_match_arm_refs test cases
Ville Penttinen [Sat, 23 Feb 2019 13:13:17 +0000 (15:13 +0200)]
Simplify test_fill_match_arm_refs test cases

5 years agorename
Aleksey Kladov [Sat, 23 Feb 2019 13:07:29 +0000 (16:07 +0300)]
rename

5 years agoFix fill_match_arms not working with references
Ville Penttinen [Sat, 23 Feb 2019 12:59:41 +0000 (14:59 +0200)]
Fix fill_match_arms not working with references

5 years agoMerge #882
bors[bot] [Sat, 23 Feb 2019 12:54:36 +0000 (12:54 +0000)]
Merge #882

882: emacs-lsp: Add runnables support r=matklad a=flodiebold

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
5 years agoemacs-lsp: Add runnables support
Florian Diebold [Sat, 16 Feb 2019 19:29:45 +0000 (20:29 +0100)]
emacs-lsp: Add runnables support

5 years agoMerge #879
bors[bot] [Sat, 23 Feb 2019 12:17:53 +0000 (12:17 +0000)]
Merge #879

879: Fixes to goto definition r=vipentti a=vipentti

Previously goto definition would fail when the cursor was over the name of the definition. Now we should properly resolve to a `NavigationTarget` when on top of the name of a definition.

In addition this adds `name_range` field to `FileSymbol`, this further fixes goto_definition and symbol based navigation by allowing the `NavigationTarget` to actually have a `focus_range`, meaning instead of focusing on the start of the `full_range`, we can have the cursor focus on the name.

e.g. goto definition
```rust
fn bar() {
    fn foo() { }

   foo<|>();
}
```

Previously this would put the cursor at the start of the FN_DEF:
```rust
fn bar() {
   <|>fn foo() { }

   foo();
}
```
Now when using the symbol based resolving, we'll have a proper focus range and instead put the cursor at the start of the name.

```rust
fn bar() {
   fn <|>foo() { }

   foo();
}
```

This fixes #877 but doesn't contain the refactoring of the return type for `goto_definition`

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
5 years agoRemove unnecessary to_nav_target
Ville Penttinen [Sat, 23 Feb 2019 12:08:57 +0000 (14:08 +0200)]
Remove unnecessary to_nav_target

5 years agoMerge #880
bors[bot] [Sat, 23 Feb 2019 12:02:06 +0000 (12:02 +0000)]
Merge #880

880: Fix resolution of associated method calls across crates r=matklad a=flodiebold

I think it'll be better to make the path resolution the number of unresolved
segments, not the first unresolved index; then this error could simply not have
happened. But I'll do that separately.

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
5 years agoFix resolution of associated method calls across crates
Florian Diebold [Sat, 23 Feb 2019 11:32:25 +0000 (12:32 +0100)]
Fix resolution of associated method calls across crates

I think it'll be better to make the path resolution the number of unresolved
segments, not the first unresolved index; then this error could simply not have
happened. But I'll do that separately.

5 years agoAdd name_range field to FileSymbol
Ville Penttinen [Sat, 23 Feb 2019 11:05:45 +0000 (13:05 +0200)]
Add name_range field to FileSymbol

This contains the syntax range of the name itself, allowing NavigationTarget to
properly set the focus_range. This should make it so that when using symbol
based navigation, we should always focus on the name, instead of the full range.

5 years agoFix NavigationTarget debug_render container_name output
Ville Penttinen [Sat, 23 Feb 2019 10:53:53 +0000 (12:53 +0200)]
Fix NavigationTarget debug_render container_name output

5 years agoFix goto def not working when cursor was over the name of a def
Ville Penttinen [Sat, 23 Feb 2019 09:02:42 +0000 (11:02 +0200)]
Fix goto def not working when cursor was over the name of a def

We now allow goto_definition to return the named NavigationTarget if the cursor
is on the name of a definition.

5 years agoMerge #866
bors[bot] [Fri, 22 Feb 2019 19:58:22 +0000 (19:58 +0000)]
Merge #866

866: Implement basic support for Associated Methods r=flodiebold a=vipentti

This is my attempt at learning to understand how the type inference works by adding basic support for associated methods. Currently it does not resolve associated types or constants.

The basic idea is that `Resolver::resolve_path` returns a new `PathResult` type, which has two variants, `FullyResolved` and `PartiallyResolved`, fully resolved matches the previous behavior, where as `PartiallyResolved` contains the `PerNs<Resolution` in addition to a `segment_index` which contains the index of the segment which we failed to resolve. This index can then be used to continue inference in `infer_path_expr` using the `Type` we managed to resolve.

This changes some of the previous apis, so looking for feedback and suggestions.

This should enable fixing #832

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
5 years agoChange resolve_path to return the fully resolved path or PerNs::none
Ville Penttinen [Fri, 22 Feb 2019 08:15:23 +0000 (10:15 +0200)]
Change resolve_path to return the fully resolved path or PerNs::none

This also adds new pub(crate) resolve_path_segments which returns the
PathResult, which may or may not be fully resolved. PathResult is also now
pub(crate) since it is an implementation detail.

5 years agoIgnore failing test for now
Ville Penttinen [Thu, 21 Feb 2019 22:27:22 +0000 (00:27 +0200)]
Ignore failing test for now

5 years agoMake nameres::ResolvePathResult private and refactor
Ville Penttinen [Thu, 21 Feb 2019 22:11:21 +0000 (00:11 +0200)]
Make nameres::ResolvePathResult private and refactor

5 years agoRemove Const inference for now, refactor PathResult
Ville Penttinen [Thu, 21 Feb 2019 21:57:07 +0000 (23:57 +0200)]
Remove Const inference for now, refactor PathResult

5 years agoMerge #864
bors[bot] [Thu, 21 Feb 2019 20:47:50 +0000 (20:47 +0000)]
Merge #864

864: Fix handling of generics in tuple variants and refactor a bit r=matklad a=flodiebold

(The problem was that we created separate substitutions for the return value, so we lost the connection between the type arguments in the constructor call and the type arguments of the result.)

Also make them display a tiny bit nicer.

Fixes #860.

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
Co-authored-by: Florian Diebold <florian.diebold@freiheit.com>
5 years agoAdd an assert (and fix the other)
Florian Diebold [Thu, 21 Feb 2019 20:25:27 +0000 (21:25 +0100)]
Add an assert (and fix the other)

5 years agoMerge #876
bors[bot] [Thu, 21 Feb 2019 16:55:26 +0000 (16:55 +0000)]
Merge #876

876: Fix join_lines not adding a comma after join_single_expr_block with match arm r=matklad a=vipentti

Fixes #868

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
5 years agoMove `non_trivia_sibling` to `ra_syntax::algo`
Ville Penttinen [Thu, 21 Feb 2019 16:49:03 +0000 (18:49 +0200)]
Move `non_trivia_sibling` to `ra_syntax::algo`

5 years agoSimplify adding a comma after match arm
Ville Penttinen [Thu, 21 Feb 2019 16:26:27 +0000 (18:26 +0200)]
Simplify adding a comma after match arm