Commit graph

13617 commits

Author SHA1 Message Date
Jonas Schievink
3e6ffa5124 Fix proc macro token mapping 2020-12-03 18:38:05 +01:00
bors[bot]
d46fce88f5
Merge #6700
6700: More macro diagnostics improvements r=jonas-schievink a=jonas-schievink

This threads macro expansion errors through `eager.rs` and the `AsMacroCall` trait, improving macro diagnostics emitted during body lowering.

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2020-12-03 16:55:15 +00:00
Jonas Schievink
bca1e5fcb8 Rename error_sink to diagnostic_sink 2020-12-03 17:54:43 +01:00
bors[bot]
74de29b223
Merge #6711
6711: cargo update: bump libloading to fix a double-free r=kjeremy a=kjeremy



Co-authored-by: kjeremy <kjeremy@gmail.com>
2020-12-03 15:31:36 +00:00
kjeremy
1da8726b85 cargo update: bump libloading to fix a double-free 2020-12-03 10:30:28 -05:00
bors[bot]
1d1da5ea8c
Merge #6710
6710: Extract tests module to file in ide_db crate r=matklad a=sasurau4

Helps with #6522 

- pass `cargo test`

Co-authored-by: Daiki Ihara <sasurau4@gmail.com>
2020-12-03 15:13:55 +00:00
Aleksey Kladov
3e00bfce2b Document statelessness invariant 2020-12-03 18:08:27 +03:00
Daiki Ihara
f486640682 Extract tests module to file in ide_db crate 2020-12-04 00:05:39 +09:00
Jonas Schievink
883c8d177d Make compile_error! lazy and emit a diagnostic 2020-12-03 15:48:29 +01:00
Jonas Schievink
4634bfb332 Give better diagnostic if OUT_DIR is unset 2020-12-03 15:48:29 +01:00
Jonas Schievink
17542d08b4 Update/Fix tests 2020-12-03 15:48:29 +01:00
Jonas Schievink
a634243634 Propagate eager expansion errors 2020-12-03 15:48:29 +01:00
bors[bot]
5a1306a436
Merge #6702
6702: Bump mio for safety goodness r=kjeremy a=kjeremy



Co-authored-by: kjeremy <kjeremy@gmail.com>
2020-12-02 21:07:28 +00:00
kjeremy
75bd5a5e20 Bump mio for safety goodness 2020-12-02 16:06:36 -05:00
bors[bot]
de9a984cbe
Merge #6701
6701: Don't prime caches when just opening a file r=jonas-schievink a=jonas-schievink

Fixes occasional "progress handler already registered" errors.

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2020-12-02 19:19:19 +00:00
Jonas Schievink
6da651f5da Don't prime caches when just opening a file 2020-12-02 20:18:28 +01:00
bors[bot]
a3043cf53f
Merge #6699
6699: Test macro diagnostics in body lowering r=jonas-schievink a=jonas-schievink

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2020-12-02 14:03:57 +00:00
Jonas Schievink
f4866bb05c Test macro diagnostics in body lowering 2020-12-02 15:03:21 +01:00
bors[bot]
3e1fb112af
Merge #6698
6698: Attach macro expansion errors to the right file r=jonas-schievink a=jonas-schievink

Previously it attached them to the result of the macro expansion (or, if no result was produced, to the file containing the invocation). Always use the file containing the invocation.

This doesn't seem to have any observable difference, but seems better in theory.

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2020-12-02 13:25:54 +00:00
Jonas Schievink
319fcd01ac Attach macro expansion errors to the right file 2020-12-02 14:23:51 +01:00
bors[bot]
dc09d97fb2
Merge #6649
6649: Accept more than just the standard rust literal suffixes in *Number::suffix r=matklad a=Veykril

I am not entirely sure whether to keep or remove the `SUFFIXES` but I figured we can always bring them back once they are needed.

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2020-12-02 13:13:01 +00:00
bors[bot]
1db60512b6
Merge #6673
6673: Show type of Self on hover r=matklad a=Veykril



Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2020-12-02 13:06:34 +00:00
bors[bot]
a8f04712d6
Merge #6679
6679: Extract tests module to file in vfs crate r=matklad a=sasurau4

Helps with #6522 

- [x] passed `cargo test`

Co-authored-by: Daiki Ihara <sasurau4@gmail.com>
2020-12-02 12:34:19 +00:00
bors[bot]
14086e3118
Merge #6697
6697: Don't discard PathKind::Abs information in lower_use::convert_path r=matklad a=Veykril

Fixes #6694

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2020-12-02 12:16:19 +00:00
Lukas Wirth
7b456552b8 Don't discard PathKind::Abs information in lower_use::convert_path 2020-12-02 09:54:03 +01:00
bors[bot]
bb697727a2
Merge #6690
6690: lsp-types 0.85: Fixes OptionalVersionedTextDocumentIdentifier specification r=kjeremy a=kjeremy

Fixes #6654

Co-authored-by: kjeremy <kjeremy@gmail.com>
2020-12-01 13:36:02 +00:00
kjeremy
e4ffd70c91 Fix OptionalVersionedTextDocumentIdentifier type
Fixes #6654
2020-12-01 08:33:21 -05:00
bors[bot]
a18392bd90
Merge #6689
6689: Trigger .let postfix snippet in the middle of the block r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-12-01 12:38:45 +00:00
Aleksey Kladov
21d962f0ac Trigger .let postfix snippet in the middle of the block 2020-12-01 15:38:06 +03:00
bors[bot]
eb7f969510
Merge #6683
6683: Emit macro diagnostics when lowering bodies r=matklad a=jonas-schievink

Changes `Expander::enter_expand` to return an `ExpandResult`, and adds any contained errors to the body diagnostic list.

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2020-12-01 12:27:52 +00:00
Jonas Schievink
ea7b81fef9 Emit unresolved proc macro errors 2020-12-01 12:40:03 +01:00
bors[bot]
75e037fcf7
Merge #6688
6688: Place cursor correctly when completing assoc fns with self r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-12-01 11:29:25 +00:00
Aleksey Kladov
9d94ffad44 Place cursor correctly when completing assoc fns with self 2020-12-01 14:28:50 +03:00
Aleksey Kladov
02955661a0 Fix typo 2020-12-01 13:56:46 +03:00
Aleksey Kladov
6f51f728a1 Type-safer API for dealing with parameter lists with optional self 2020-12-01 13:53:39 +03:00
Jonas Schievink
be50908a50 Emit macro diagnostics when lowering bodies 2020-11-30 20:26:35 +01:00
bors[bot]
455a0cfda2
Merge #6681
6681: builtin_macro: move to `mbe::ExpandResult` r=jonas-schievink a=jonas-schievink

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2020-11-30 18:22:05 +00:00
Jonas Schievink
92f52c5c9a builtin_macro: move to mbe::ExpandResult 2020-11-30 19:21:25 +01:00
bors[bot]
70eb170271
Merge #6680
6680: Fix use merging not using the first path segment r=Veykril a=Veykril

Finally figured out why nested imports don't properly merge in some cases

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2020-11-30 16:22:56 +00:00
Lukas Wirth
ec94657077 Fix use merging not using the first path segment 2020-11-30 17:21:07 +01:00
Daiki Ihara
59bd6e2eea Extract tests module to file in vfs crate 2020-12-01 00:10:12 +09:00
bors[bot]
9cbea21aa5
Merge #6678
6678: bump lexer r=kjeremy a=kjeremy



Co-authored-by: kjeremy <kjeremy@gmail.com>
2020-11-30 14:30:02 +00:00
kjeremy
0a95201243 bump lexer 2020-11-30 09:29:09 -05:00
bors[bot]
8fcc1d6a90
Merge #6677
6677: cargo update r=kjeremy a=kjeremy



Co-authored-by: kjeremy <kjeremy@gmail.com>
2020-11-30 13:55:28 +00:00
kjeremy
467a81529a cargo update 2020-11-30 08:44:03 -05:00
bors[bot]
13025ae2a1
Merge #6676
6676: Minor cleanup r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-11-30 10:48:05 +00:00
Aleksey Kladov
8c3472b6f9 Minor cleanup 2020-11-30 13:47:38 +03:00
Lukas Wirth
9349d9ee48 Show type of Self on hover 2020-11-29 22:49:12 +01:00
bors[bot]
ac30710ada
Merge #6665
6665: Support self in reference search r=matklad a=Veykril

The approach here is simply checking the descendants of the function body for `PathExpr` then checking whether it only contains a single `self` `PathSegment`, this is to prevent us from picking up `self` tokens from local `UseTree`s.

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2020-11-29 20:03:44 +00:00
Lukas Wirth
de4ada22d4 Support self in reference search 2020-11-29 20:54:17 +01:00