Florian Diebold
577f70cc9c
Reduce visibility
2022-02-09 17:43:37 +01:00
Florian Diebold
dfd2cef0d0
Add back an assertion
2022-02-09 16:36:45 +01:00
Florian Diebold
63fd643d72
Various fixes
2022-02-09 16:30:10 +01:00
Florian Diebold
bdb7ae5dd0
Rename syntax_node_to_token_tree_censored
2022-02-09 13:45:31 +01:00
Florian Diebold
ecf3cff4a6
Replace expressions with errors in them
2022-02-09 11:58:52 +01:00
Florian Diebold
30287e6051
Fix test
2022-02-08 20:44:46 +01:00
Florian Diebold
1a5aa84e9f
Track synthetic tokens, to be able to remove them again later
2022-02-08 18:13:18 +01:00
Florian Diebold
1b5cd03a37
Actually check in fixup.rs
2022-02-07 20:30:28 +01:00
Florian Diebold
c3601e9860
Reverse fixups
2022-02-07 19:53:39 +01:00
Florian Diebold
79ebf618ec
Simplify
2022-02-07 18:21:31 +01:00
Florian Diebold
86b968ba94
Add a check
2022-02-07 18:19:00 +01:00
Florian Diebold
b9c5d23f69
Simplify a bit
2022-02-07 18:17:28 +01:00
Florian Diebold
cff209f152
WIP: Actually fix up syntax errors in attribute macro input
2022-02-07 18:12:51 +01:00
Florian Diebold
212e82fd41
Add test for giving attribute proc macros valid syntax
2022-02-07 12:54:08 +01:00
Moritz Vetter
482533ea9a
add missing snake case attribute, update hash
2022-02-07 04:57:20 +01:00
Moritz Vetter
ba2ef69c79
Bump pulldown-cmark-to-cmark, adjust usages and fix test
2022-02-06 09:04:06 +01:00
Laurențiu Nicola
39674cd350
Revert "Bump dashmap"
...
This reverts commit 485f318b70bdc40bd71fa46748cc7053a5b8fd8a.
2022-02-05 16:15:56 +02:00
The0x539
1536fc040a
Fix trait impl completion ranges
2022-02-04 19:55:55 -06:00
Lukas Wirth
ec677e35d0
Simplify
2022-02-04 02:50:33 +01:00
Lukas Wirth
2ad71f1350
Shrink mbe::ExpandError
and mbe::ParseError
2022-02-03 17:25:24 +01:00
Lukas Wirth
2310908df7
fix: Fix vis restriction path completions always using the parent module
2022-02-03 17:02:12 +01:00
Lukas Wirth
c83081879f
Add abi string completions
2022-02-03 16:33:42 +01:00
Lukas Wirth
d3f3b6a87f
Sort completion calls lexicographically
2022-02-03 16:05:21 +01:00
Lukas Wirth
7619c2afea
Simplify
2022-02-03 16:00:49 +01:00
Lukas Wirth
9f5ee155c1
Move path completions for patterns into pattern module
2022-02-03 15:52:03 +01:00
Lukas Wirth
33fd2d7aef
Cleanup PathCompletionContext qualifier handling
2022-02-03 15:52:03 +01:00
Lukas Wirth
a3ad99649f
Add missing test for use completions
2022-02-03 15:52:03 +01:00
Lukas Wirth
136dadac9a
Add completion module tailored towards visibility modifiers
2022-02-03 15:52:03 +01:00
Lukas Wirth
661d721e20
Add completion module tailored towards use trees
2022-02-03 15:51:57 +01:00
Lukas Wirth
6940cca760
Move attribute path completions into attribute completion module
2022-02-03 15:50:14 +01:00
Florian Diebold
4ed5fe1554
Fix assoc type shorthand from method bounds
...
In code like this:
```rust
impl<T> Option<T> {
fn as_deref(&self) -> T::Target where T: Deref {}
}
```
when trying to resolve the associated type `T::Target`, we were only
looking at the bounds on the impl (where the type parameter is defined),
but the method can add additional bounds that can also be used to refer
to associated types. Hence, when resolving such an associated type, it's
not enough to just know the type parameter T, we also need to know
exactly where we are currently.
This fixes #11364 (beta apparently switched some bounds around).
2022-02-03 13:15:02 +01:00
bors[bot]
9cb6e3a190
Merge #11394
...
11394: feat: Deprioritize completions of private but editable definitions r=Veykril a=Veykril
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2022-02-02 11:42:40 +00:00
Lukas Wirth
2d77eb1e12
Fix test fixture
2022-02-02 12:42:13 +01:00
bors[bot]
d20ff92747
Merge #11395
...
11395: fix: Fix and re-enable format string completions r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2022-02-02 11:20:38 +00:00
Lukas Wirth
6f974cf477
fix: Fix and re-enable format string completions
2022-02-02 12:20:10 +01:00
Lukas Wirth
7267749f6b
Cleanup Completions
api a bit
2022-02-02 12:19:43 +01:00
Lukas Wirth
70650897d8
Fix generate_function assist trying to use name-ref like keywords for names
2022-02-02 11:37:24 +01:00
Lukas Wirth
5c41f5d165
feat: Deprioritize completions of private but editable definitions
2022-02-02 02:05:49 +01:00
bors[bot]
34138379b5
Merge #11322
...
11322: Extract function also extracts comments r=Vannevelj a=Vannevelj
Fixes #9011
The difficulty I came across is that the original assist works from the concept of a `ast::StmtList`, a node, but that does not allow me to (easily) represent comments, which are tokens. To combat this, I do a whole bunch of roundtrips: from the `ast::StmtList` I retrieve the `NodeOrToken`s it encompasses.
I then cast all `Node` ones back to a `Stmt` so I can apply indentation to it, after which it is again parsed as a `NodeOrToken`.
Lastly, I add a new `make::` api that accepts `NodeOrToken` rather than `StmtList` so we can write the comment tokens.
Co-authored-by: Jeroen Vannevel <jer_vannevel@outlook.com>
2022-02-01 23:05:28 +00:00
Jeroen Vannevel
493642ab3a
rollup match
2022-02-01 22:38:37 +00:00
Lukas Wirth
d7a544e69a
fix: Complete functions and methods from block level impls
2022-02-01 23:29:40 +01:00
Lukas Wirth
dbd5a70ea3
minor: Add some debug traces for cfg fetching
2022-02-01 13:35:34 +01:00
Lukas Wirth
fcdced115e
Deprioritize ops function completions for non-method calls
2022-02-01 12:33:55 +01:00
Jeroen Vannevel
1811f6330b
better comparison
2022-02-01 09:00:30 +00:00
Jeroen Vannevel
b290285dd8
removed redundant test
2022-02-01 00:38:33 +00:00
Jeroen Vannevel
269153388a
added FIXME
2022-02-01 00:37:48 +00:00
Jeroen Vannevel
51c50dd5ac
don't tear body
2022-02-01 00:36:50 +00:00
Jeroen Vannevel
e72ed9230a
no longer support comments on their own
2022-02-01 00:21:35 +00:00
Lukas Wirth
f6def3ccdf
fix: Fix proc-macro server not using the supplied span in Ident::new
2022-01-31 17:02:57 +01:00
Lukas Wirth
45ff51ba22
Make more precise range macro upmapping
2022-01-31 15:53:44 +01:00