Lukas Wirth
6194092086
Complete local fn and closure params from surrounding locals scope
2022-01-31 11:56:42 +01:00
Lukas Wirth
ddf7b70a0f
Fix cfg_attr invalidating derive identifier IDE functionality
2022-01-30 22:47:16 +01:00
Lukas Wirth
cc04cfc982
Reduce allocations in attribute collection
2022-01-30 22:18:32 +01:00
bors[bot]
6010431a0b
Merge #11356
...
11356: Rollback env vars changed by a proc macro r=vlad20012 a=vlad20012
Fixes #11355
Co-authored-by: vlad20012 <beskvlad@gmail.com>
2022-01-30 08:05:55 +00:00
Daniel Conley
261abbf45e
Add Keyword Return Type Highlighting
2022-01-28 14:44:17 -05:00
Maybe Waffle
78a3cefc45
Use compare_exchange_weak
in limit::Limit::check
2022-01-28 18:19:35 +03:00
vlad20012
e277d5d64e
Add a way to disable dll copying for users of proc_macro_srv library
2022-01-28 16:18:25 +03:00
vlad20012
e93386f6ce
Rollback env vars changed by a proc macro
2022-01-28 13:43:29 +03:00
Maybe Waffle
6d18c5b69d
feat: Honor recursion limit configuration
...
This patch makes RA understand `#![recursion_limit = "N"]` annotations.
- `crate_limits` query is moved to `DefDatabase`
- `DefMap` now has `recursion_limit: Option<u32>` field
2022-01-28 11:31:59 +03:00
Maybe Waffle
81211f538c
Use crate_limits
query in macro expansion
2022-01-28 11:31:59 +03:00
Maybe Waffle
c932ca5f1c
Add crate_limits
query to SourceDatabase
...
This allows fetching crate limits like `recursion_limit`. The
implementation is currently dummy and just returns the defaults.
Future work: Use this query instead of the hardcoded constant.
Future work: Actually implement this query by parsing
`#![recursion_limit = N]` attribute.
2022-01-28 11:31:59 +03:00
bors[bot]
b55a1c561a
Merge #11353
...
11353: Set current working directory for procedural macros r=vlad20012 a=vlad20012
Fixes #11079
Co-authored-by: vlad20012 <beskvlad@gmail.com>
2022-01-27 18:09:08 +00:00
Jonas Schievink
6c0fcb5b5d
More correct $crate
handling in eager macros
2022-01-27 16:57:53 +01:00
vlad20012
6051318744
Set current working directory for procedural macros
2022-01-27 16:18:12 +03:00
Jonas Schievink
3c51aaf065
Fix merge commit check for git 2.35
2022-01-26 19:10:39 +01:00
Jonas Schievink
35e5c3b3f9
Fix resolution of eager macro contents
2022-01-26 18:31:07 +01:00
bors[bot]
2cb85c14b6
Merge #11281
...
11281: ide: parallel prime caches r=jonas-schievink a=jhgg
cache priming goes brrrr... the successor to #10149
---
this PR implements a parallel cache priming strategy that uses a topological work queue to feed a pool of worker threads the crates to index in parallel.
## todo
- [x] should we keep the old prime caches?
- [x] we should use num_cpus to detect how many cpus to use to prime caches. should we also expose a config for # of worker CPU threads to use?
- [x] something is wonky with cancellation, need to figure it out before this can merge.
Co-authored-by: Jake Heinz <jh@discordapp.com>
2022-01-25 16:03:35 +00:00
Jonas Schievink
5088926ec3
Make syntax bridge fully infallible
2022-01-24 17:27:39 +01:00
Lukas Wirth
ebd723995a
fix: don't panic in semantics due to cfg_attr
disrupting offsets
2022-01-23 17:42:38 +01:00
Jeroen Vannevel
8f09e13c06
fixed whitespace
2022-01-22 13:28:23 +00:00
Jeroen Vannevel
8e8e1951e2
whitespace
2022-01-22 12:25:33 +00:00
Jeroen Vannevel
9725eaa21c
generated docs
2022-01-22 12:17:24 +00:00
Jeroen Vannevel
61ab31f709
clarify doc
2022-01-22 12:10:48 +00:00
Jeroen Vannevel
4972cb759e
Support standalone comments
2022-01-22 12:08:32 +00:00
Jeroen Vannevel
8d61216957
redundant type specified
2022-01-22 12:08:32 +00:00
Jeroen Vannevel
a1c246b1c4
shorter arms
2022-01-22 12:08:32 +00:00
Jeroen Vannevel
4ab7c4d99b
removed prints
2022-01-22 12:08:32 +00:00
Jeroen Vannevel
96ab4c6e6c
hacky_block_expr_with_comments
2022-01-22 12:08:32 +00:00
Jeroen Vannevel
5d35e5882c
removed unwrapping from indent
2022-01-22 12:08:32 +00:00
Jeroen Vannevel
ee862cec10
simplified tail_expr
2022-01-22 12:08:32 +00:00
Jeroen Vannevel
4896ffb65c
removing unwraps
2022-01-22 12:08:32 +00:00
Jeroen Vannevel
50c913c733
don't remove the comment token if it's last
2022-01-22 12:08:32 +00:00
Jeroen Vannevel
4f3dd5bc08
very rough but comments get extracted
2022-01-22 12:08:32 +00:00
Jeroen Vannevel
f662d8bf38
repro
2022-01-22 12:08:32 +00:00
Laurențiu Nicola
bdfdb525bb
Bump chalk
2022-01-21 19:51:21 +02:00
Laurențiu Nicola
e3e6133ff4
Bump pulldown-cmark and pulldown-cmark-to-cmark
2022-01-21 19:49:57 +02:00
Laurențiu Nicola
09fb755432
Bump hashbrown
2022-01-21 19:44:03 +02:00
Laurențiu Nicola
485f318b70
Bump dashmap
2022-01-21 19:42:04 +02:00
Jonas Schievink
e5ed43b1dc
Remove redundant Option
from eager macro fns
2022-01-21 12:58:06 +01:00
Schuyler Cohen
11cb203daf
Remove spurious format
2022-01-19 13:37:25 -06:00
Jonas Schievink
c714c139a4
Update tests
...
We're now omitting the libc crate's build script and const_fn test
2022-01-18 18:27:29 +01:00
Jonas Schievink
22ea5595a8
Don't load auxiliary crates outside the workspace
2022-01-18 18:17:43 +01:00
Wesley Norris
ba82cc7722
Add test for comments not directly next to items
2022-01-17 18:44:43 -05:00
Wesley Norris
7d10752299
Add a test for multi-single-line comments as well
2022-01-17 17:12:32 -05:00
Wesley Norris
1c866573cb
fix: insert auto-imports after header comments
...
Fixes #8607 .
This commit changes the auto-import functionality and causes it to add
imports after any leading comments, which are commonly license headers.
This does not affect comments on items as they're considered part of the
item itself and not separate.
2022-01-17 17:06:10 -05:00
Jonas Schievink
a3d06f824b
status: output all crates a file belongs to
2022-01-17 18:10:01 +01:00
Jonas Schievink
8a7f0d920e
Allow macros to expand to or-patterns
2022-01-17 16:52:53 +01:00
Laurențiu Nicola
c504518775
Temporarily disable format string completions
2022-01-17 09:30:35 +02:00
bors[bot]
e6e72809e3
Merge #11287
...
11287: fix: rust-analyzer spamming overly error message when workspace not being loaded r=lnicola a=Milo123459
Fixes #10120
Co-authored-by: Milo <50248166+Milo123459@users.noreply.github.com>
2022-01-16 15:13:52 +00:00
bors[bot]
7a52f83700
Merge #11294
...
11294: internal: Move format specifier lexing from syntax to ide_db r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2022-01-15 12:18:46 +00:00