]> git.lizzy.rs Git - rust.git/log
rust.git
2 years agofix: Complete functions and methods from block level impls
Lukas Wirth [Tue, 1 Feb 2022 22:29:40 +0000 (23:29 +0100)]
fix: Complete functions and methods from block level impls

2 years agominor: Add some debug traces for cfg fetching
Lukas Wirth [Tue, 1 Feb 2022 12:32:09 +0000 (13:32 +0100)]
minor: Add some debug traces for cfg fetching

2 years agoDeprioritize ops function completions for non-method calls
Lukas Wirth [Tue, 1 Feb 2022 11:33:55 +0000 (12:33 +0100)]
Deprioritize ops function completions for non-method calls

2 years agoMerge #11388
bors[bot] [Mon, 31 Jan 2022 16:03:23 +0000 (16:03 +0000)]
Merge #11388

11388: fix: Fix proc-macro server not using the supplied span in Ident::new r=Veykril a=Veykril

This makes the hack introduced by https://github.com/rust-analyzer/rust-analyzer/pull/10899 obsolete.

For async-trait specifically, (unfortunately, but technically correct) due to how async-trait works, the self local now renders white, as it now resolves to the `__self` local introduced by the attribute.

![Code_0Ezw6PJAbh](https://user-images.githubusercontent.com/3757771/151827812-c03b8fc7-7ecf-4959-804a-2680d8e61e8b.png)
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agofix: Fix proc-macro server not using the supplied span in Ident::new
Lukas Wirth [Mon, 31 Jan 2022 15:56:33 +0000 (16:56 +0100)]
fix: Fix proc-macro server not using the supplied span in Ident::new

2 years agoMerge #11291
bors[bot] [Mon, 31 Jan 2022 15:22:42 +0000 (15:22 +0000)]
Merge #11291

11291: internal: Make more precise range macro upmapping r=Veykril a=Veykril

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoMake more precise range macro upmapping
Lukas Wirth [Mon, 31 Jan 2022 12:56:14 +0000 (13:56 +0100)]
Make more precise range macro upmapping

2 years agoFix token ascension single token check being inverted
Lukas Wirth [Mon, 31 Jan 2022 12:10:53 +0000 (13:10 +0100)]
Fix token ascension single token check being inverted

2 years agoMerge #11182
bors[bot] [Mon, 31 Jan 2022 11:16:22 +0000 (11:16 +0000)]
Merge #11182

11182: fix: don't panic on seeing an unexpected offset r=Veykril a=dimbleby

Intended as a fix, or at least a sticking plaster, for #11081.

I have arranged that [offset()](https://github.com/rust-analyzer/rust-analyzer/blob/1ba9a924d7b161c52e605e157ee16d582e4a8684/crates/ide_db/src/line_index.rs#L105-L107) returns `Option<TextSize>` instead of going out of bounds; other changes are the result of following the compiler after doing this.

Perhaps there's still an issue here - I suppose the server and client have gotten out of sync and that probably shouldn't happen in the first place?  I see that https://github.com/rust-analyzer/rust-analyzer/issues/10138#issuecomment-913727554 suggests what sounds like a more substantial fix which I think might be aimed in this direction.  So perhaps that one should be left open to cover such things?

Meanwhile, I hope that not-crashing is a good improvement: and I can confirm that it works out just fine in the repro I have at #11081.

Co-authored-by: David Hotham <david.hotham@metaswitch.com>
2 years agoMerge #11384
bors[bot] [Mon, 31 Jan 2022 11:05:40 +0000 (11:05 +0000)]
Merge #11384

11384: feat: Complete local fn and closure params from surrounding locals scope r=Veykril a=Veykril

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoComplete local fn and closure params from surrounding locals scope
Lukas Wirth [Mon, 31 Jan 2022 10:56:42 +0000 (11:56 +0100)]
Complete local fn and closure params from surrounding locals scope

2 years agoMerge #11382
bors[bot] [Sun, 30 Jan 2022 22:08:25 +0000 (22:08 +0000)]
Merge #11382

11382: fix: Fix `cfg_attr` invalidating derive identifier IDE functionalities r=Veykril a=Veykril

Proper fix for https://github.com/rust-analyzer/rust-analyzer/issues/11298
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoFix cfg_attr invalidating derive identifier IDE functionality
Lukas Wirth [Sun, 30 Jan 2022 21:46:05 +0000 (22:46 +0100)]
Fix cfg_attr invalidating derive identifier IDE functionality

2 years agoReduce allocations in attribute collection
Lukas Wirth [Sun, 30 Jan 2022 21:18:32 +0000 (22:18 +0100)]
Reduce allocations in attribute collection

2 years agoMerge #11377
bors[bot] [Sun, 30 Jan 2022 13:23:47 +0000 (13:23 +0000)]
Merge #11377

11377: Update README.md r=flodiebold a=flodiebold

I'm not currently sponsored anymore.

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2 years agoUpdate README.md
Florian Diebold [Sun, 30 Jan 2022 13:21:52 +0000 (14:21 +0100)]
Update README.md

I'm not currently sponsored anymore.

2 years agoMerge #11356
bors[bot] [Sun, 30 Jan 2022 08:05:55 +0000 (08:05 +0000)]
Merge #11356

11356: Rollback env vars changed by a proc macro r=vlad20012 a=vlad20012

Fixes #11355

Co-authored-by: vlad20012 <beskvlad@gmail.com>
2 years agoMerge #11367
bors[bot] [Fri, 28 Jan 2022 15:31:52 +0000 (15:31 +0000)]
Merge #11367

11367: minor: Use `compare_exchange_weak` in `limit::Limit::check` r=lnicola a=WaffleLapkin

Not a big deal, but generally loops should use `_weak` version of `compare_exchange`.

Co-authored-by: Maybe Waffle <waffle.lapkin@gmail.com>
2 years agoUse `compare_exchange_weak` in `limit::Limit::check`
Maybe Waffle [Fri, 28 Jan 2022 15:19:35 +0000 (18:19 +0300)]
Use `compare_exchange_weak` in `limit::Limit::check`

2 years agoMerge #11365
bors[bot] [Fri, 28 Jan 2022 13:21:24 +0000 (13:21 +0000)]
Merge #11365

11365: Add a way to disable dll copying for users of proc_macro_srv library r=lnicola a=vlad20012

We use `ra_ap_proc_macro_srv` library in IntelliJ Rust in order to expand proc macros. We need a way to disable [DLL copying to a temp dir on Windows](https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/proc_macro_srv/src/dylib.rs#L166) behavior because it causes issues like https://github.com/intellij-rust/intellij-rust/issues/7709. Unlike RA, file locking is not an issue for IntelliJ Rust because we copy DLLs to a temp dir before calling the expander.

Co-authored-by: vlad20012 <beskvlad@gmail.com>
2 years agoAdd a way to disable dll copying for users of proc_macro_srv library
vlad20012 [Fri, 28 Jan 2022 13:18:25 +0000 (16:18 +0300)]
Add a way to disable dll copying for users of proc_macro_srv library

2 years agoMerge #11360
bors[bot] [Fri, 28 Jan 2022 10:58:21 +0000 (10:58 +0000)]
Merge #11360

11360: feat: Support `#![recursion_limit]` attribute r=Veykril a=WaffleLapkin

![Peek 2022-01-28 02-33](https://user-images.githubusercontent.com/38225716/151508617-ac802b53-f088-4cac-b260-2cd077f3d32c.gif)

Resolves #8640

`@matklad` thanks, for the instructions, they were very helpful :)

Co-authored-by: Maybe Waffle <waffle.lapkin@gmail.com>
2 years agoRollback env vars changed by a proc macro
vlad20012 [Thu, 27 Jan 2022 18:34:18 +0000 (21:34 +0300)]
Rollback env vars changed by a proc macro

2 years agofeat: Honor recursion limit configuration
Maybe Waffle [Thu, 27 Jan 2022 22:23:09 +0000 (01:23 +0300)]
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

2 years agoUse `crate_limits` query in macro expansion
Maybe Waffle [Thu, 27 Jan 2022 20:53:49 +0000 (23:53 +0300)]
Use `crate_limits` query in macro expansion

2 years agoAdd `crate_limits` query to `SourceDatabase`
Maybe Waffle [Thu, 27 Jan 2022 20:34:33 +0000 (23:34 +0300)]
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.

2 years agoMerge #11288
bors[bot] [Thu, 27 Jan 2022 22:26:34 +0000 (22:26 +0000)]
Merge #11288

11288: Support <code> blocks from Rust docs in vscode hover r=oandrew a=oandrew

Set `"supportHtml": true` to support rendering `<code>` blocks in hovers.

e.g.  https://github.com/rust-lang/rust/blob/1bd4fdc943513e1004f498bbf289279c9784fc6f/library/std/src/fs.rs#L109

Co-authored-by: Andrew Onyshchuk <andryk.rv@gmail.com>
2 years agoSupport <code> blocks from Rust docs
Andrew Onyshchuk [Fri, 14 Jan 2022 23:20:35 +0000 (15:20 -0800)]
Support <code> blocks from Rust docs

2 years agoMerge #11353
bors[bot] [Thu, 27 Jan 2022 18:09:08 +0000 (18:09 +0000)]
Merge #11353

11353: Set current working directory for procedural macros r=vlad20012 a=vlad20012

Fixes #11079

Co-authored-by: vlad20012 <beskvlad@gmail.com>
2 years agoMerge #11354
bors[bot] [Thu, 27 Jan 2022 15:59:18 +0000 (15:59 +0000)]
Merge #11354

11354: fix: More correct `$crate` handling in eager macros r=jonas-schievink a=jonas-schievink

Fixes a few of the additional bugs in https://github.com/rust-analyzer/rust-analyzer/issues/10300, but not yet that issue itself.

bors r+

Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
2 years agoMore correct `$crate` handling in eager macros
Jonas Schievink [Thu, 27 Jan 2022 15:57:53 +0000 (16:57 +0100)]
More correct `$crate` handling in eager macros

2 years agoSet current working directory for procedural macros
vlad20012 [Thu, 27 Jan 2022 12:54:06 +0000 (15:54 +0300)]
Set current working directory for procedural macros

2 years agoMerge #11348
bors[bot] [Wed, 26 Jan 2022 18:11:47 +0000 (18:11 +0000)]
Merge #11348

11348: fix: Fix merge commit check for git 2.35 r=jonas-schievink a=jonas-schievink

git 2.35 introduces a [change in behavior](https://github.com/git/git/blob/89bece5c8c96f0b962cfc89e63f82d603fd60bed/Documentation/RelNotes/2.35.0.txt#L330-L333) that breaks this check.

bors r+

Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
2 years agoFix merge commit check for git 2.35
Jonas Schievink [Wed, 26 Jan 2022 18:10:39 +0000 (19:10 +0100)]
Fix merge commit check for git 2.35

2 years agoMerge #11347
bors[bot] [Wed, 26 Jan 2022 17:35:51 +0000 (17:35 +0000)]
Merge #11347

11347: fix: Fix resolution of eager macro contents r=jonas-schievink a=jonas-schievink

Eager macros resolve and expand any contained macro invocations before they are expanded. The logic for this was previously pretty broken: any nameres failure would be reported as a generic macro expansion error, so this didn't work correctly with the fixed-point resolution loop. This manifested as spurious errors whenever a non-legacy macro was used in an eager macro (that means *any* path with more than one segment).

After an intense staring contest with the abyss, this PR fixes the basic logic, but some bugs still remain (particularly around `$crate`). As a side-effect, this PR moves `ModPath` into `hir_expand`.

bors r+

Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
2 years agoFix resolution of eager macro contents
Jonas Schievink [Wed, 26 Jan 2022 17:31:07 +0000 (18:31 +0100)]
Fix resolution of eager macro contents

2 years agoMerge #11345
bors[bot] [Wed, 26 Jan 2022 14:14:36 +0000 (14:14 +0000)]
Merge #11345

11345: minor: fix a typo in the style guide r=Veykril a=WaffleLapkin

An example of preferring `<`/`<=` over `>`/`>=` was using `>`.

Co-authored-by: Waffle Maybe <waffle.lapkin@gmail.com>
2 years agominor: fix a typo in the style guide
Waffle Maybe [Wed, 26 Jan 2022 14:07:17 +0000 (17:07 +0300)]
minor: fix a typo in the style guide

2 years agoMerge #11281
bors[bot] [Tue, 25 Jan 2022 16:03:35 +0000 (16:03 +0000)]
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>
2 years agoMerge #11340
bors[bot] [Mon, 24 Jan 2022 16:28:53 +0000 (16:28 +0000)]
Merge #11340

11340: internal: Make syntax bridge fully infallible r=jonas-schievink a=jonas-schievink

bors r+

Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
2 years agoMake syntax bridge fully infallible
Jonas Schievink [Mon, 24 Jan 2022 16:27:39 +0000 (17:27 +0100)]
Make syntax bridge fully infallible

2 years agoMerge #11334
bors[bot] [Sun, 23 Jan 2022 16:43:22 +0000 (16:43 +0000)]
Merge #11334

11334: fix: don't panic in semantics due to `cfg_attr` disrupting offsets r=Veykril a=Veykril

Reduces the panic in https://github.com/rust-analyzer/rust-analyzer/issues/11298 to an early return, that means we won't resolve these cases again for now, but this is better than constantly panicking in highlighting and hovering.
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agofix: don't panic in semantics due to `cfg_attr` disrupting offsets
Lukas Wirth [Sun, 23 Jan 2022 16:29:31 +0000 (17:29 +0100)]
fix: don't panic in semantics due to `cfg_attr` disrupting offsets

2 years agoMerge #11330
bors[bot] [Sat, 22 Jan 2022 10:02:26 +0000 (10:02 +0000)]
Merge #11330

11330: minor: Bump npm deps r=lnicola a=lnicola

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2 years agoBump npm deps
Laurențiu Nicola [Sat, 22 Jan 2022 09:59:45 +0000 (11:59 +0200)]
Bump npm deps

2 years agoMerge #11329
bors[bot] [Fri, 21 Jan 2022 17:52:08 +0000 (17:52 +0000)]
Merge #11329

11329: minor: Bump deps r=lnicola a=lnicola

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2 years agoBump chalk
Laurențiu Nicola [Fri, 21 Jan 2022 17:51:21 +0000 (19:51 +0200)]
Bump chalk

2 years agoBump pulldown-cmark and pulldown-cmark-to-cmark
Laurențiu Nicola [Fri, 21 Jan 2022 17:49:57 +0000 (19:49 +0200)]
Bump pulldown-cmark and pulldown-cmark-to-cmark

2 years agoBump hashbrown
Laurențiu Nicola [Fri, 21 Jan 2022 17:44:03 +0000 (19:44 +0200)]
Bump hashbrown

2 years agoBump dashmap
Laurențiu Nicola [Fri, 21 Jan 2022 17:42:04 +0000 (19:42 +0200)]
Bump dashmap

2 years agoMerge #11327
bors[bot] [Fri, 21 Jan 2022 11:59:10 +0000 (11:59 +0000)]
Merge #11327

11327: internal: Remove redundant `Option` from eager macro fns r=jonas-schievink a=jonas-schievink

This isn't needed since `tt::Subtree` already implements `Default`, and an empty expansion is the appropriate default here.

bors r+

Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
2 years agoRemove redundant `Option` from eager macro fns
Jonas Schievink [Fri, 21 Jan 2022 11:58:06 +0000 (12:58 +0100)]
Remove redundant `Option` from eager macro fns

2 years agoMerge #11321
bors[bot] [Wed, 19 Jan 2022 20:01:41 +0000 (20:01 +0000)]
Merge #11321

11321: Remove spurious format r=lnicola a=schuyler-cohen-zipline

Co-authored-by: Schuyler Cohen <schuyler.cohen@flyzipline.com>
2 years agoRemove spurious format
Schuyler Cohen [Wed, 19 Jan 2022 19:37:25 +0000 (13:37 -0600)]
Remove spurious format

2 years agoMerge #11314
bors[bot] [Wed, 19 Jan 2022 10:31:27 +0000 (10:31 +0000)]
Merge #11314

11314: fix: Don't load auxiliary crates outside the workspace r=jonas-schievink a=jonas-schievink

I'm a bit unsure about this change since this might have unanticipated consequences, but this does fix https://github.com/rust-analyzer/rust-analyzer/issues/11300.

Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
2 years agoUpdate tests
Jonas Schievink [Tue, 18 Jan 2022 17:27:29 +0000 (18:27 +0100)]
Update tests

We're now omitting the libc crate's build script and const_fn test

2 years agoDon't load auxiliary crates outside the workspace
Jonas Schievink [Tue, 18 Jan 2022 17:17:43 +0000 (18:17 +0100)]
Don't load auxiliary crates outside the workspace

2 years agoMerge #11310
bors[bot] [Tue, 18 Jan 2022 07:55:56 +0000 (07:55 +0000)]
Merge #11310

11310: fix: remove pipe from surroundingPairs r=lnicola a=chrisprice

Closes https://github.com/rust-analyzer/rust-analyzer/issues/11192

Co-authored-by: Chris Price <price.c@gmail.com>
2 years agoMerge #11311
bors[bot] [Mon, 17 Jan 2022 23:57:30 +0000 (23:57 +0000)]
Merge #11311

11311: fix: insert auto-imports after header comments r=repnop a=repnop

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.

Co-authored-by: Wesley Norris <repnop@outlook.com>
2 years agoAdd test for comments not directly next to items
Wesley Norris [Mon, 17 Jan 2022 23:44:43 +0000 (18:44 -0500)]
Add test for comments not directly next to items

2 years agoAdd a test for multi-single-line comments as well
Wesley Norris [Mon, 17 Jan 2022 22:12:32 +0000 (17:12 -0500)]
Add a test for multi-single-line comments as well

2 years agofix: insert auto-imports after header comments
Wesley Norris [Mon, 17 Jan 2022 22:06:10 +0000 (17:06 -0500)]
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.

2 years agofix: remove pipe from surroundingPairs
Chris Price [Mon, 17 Jan 2022 20:08:39 +0000 (20:08 +0000)]
fix: remove pipe from surroundingPairs

Closes https://github.com/rust-analyzer/rust-analyzer/issues/11192

2 years agoMerge #11308
bors[bot] [Mon, 17 Jan 2022 17:12:14 +0000 (17:12 +0000)]
Merge #11308

11308: fix: status: output all crates a file belongs to r=jonas-schievink a=jonas-schievink

While investigating https://github.com/rust-analyzer/rust-analyzer/issues/11300 I noticed that we only output the first crate, which masks the reason for that issue – the file in question is the root of multiple crates, and one is missing dependencies.

This PR makes "Rust Analyzer: Status" include *every* crate a file is part of.

bors r+

Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
2 years agostatus: output all crates a file belongs to
Jonas Schievink [Mon, 17 Jan 2022 17:10:01 +0000 (18:10 +0100)]
status: output all crates a file belongs to

2 years agoMerge #11307
bors[bot] [Mon, 17 Jan 2022 15:53:43 +0000 (15:53 +0000)]
Merge #11307

11307: fix: Allow macros to expand to or-patterns r=jonas-schievink a=jonas-schievink

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/11097

Also simplifies the diagnostic slightly.

bors r+

Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
2 years agoAllow macros to expand to or-patterns
Jonas Schievink [Mon, 17 Jan 2022 15:52:53 +0000 (16:52 +0100)]
Allow macros to expand to or-patterns

2 years agoMerge #11304
bors[bot] [Mon, 17 Jan 2022 07:31:19 +0000 (07:31 +0000)]
Merge #11304

11304: fix: Temporarily disable format string completions r=lnicola a=lnicola

CC #11303

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2 years agoTemporarily disable format string completions
Laurențiu Nicola [Mon, 17 Jan 2022 07:18:40 +0000 (09:18 +0200)]
Temporarily disable format string completions

2 years agoMerge #11287
bors[bot] [Sun, 16 Jan 2022 15:13:52 +0000 (15:13 +0000)]
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>
2 years agoMerge #11294
bors[bot] [Sat, 15 Jan 2022 12:18:46 +0000 (12:18 +0000)]
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>
2 years agoMove format specifier lexing from syntax to ide_db
Lukas Wirth [Sat, 15 Jan 2022 12:14:59 +0000 (13:14 +0100)]
Move format specifier lexing from syntax to ide_db

2 years agoMerge #11293
bors[bot] [Sat, 15 Jan 2022 11:24:21 +0000 (11:24 +0000)]
Merge #11293

11293: feat: Add very simplistic ident completion for format_args! macro input r=Veykril a=Veykril

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agofeat: Add very simplistic ident completion for format_args! macro input
Lukas Wirth [Sat, 15 Jan 2022 11:12:02 +0000 (12:12 +0100)]
feat: Add very simplistic ident completion for format_args! macro input

2 years agoMerge #11292
bors[bot] [Sat, 15 Jan 2022 10:17:01 +0000 (10:17 +0000)]
Merge #11292

11292: internal: Decrease PartialOrd and PartialEq trait methods completion relevance r=Veykril a=Veykril

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/10245
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agointernal: Decrease PartialOrd and PartialEq trait methods completion relevance
Lukas Wirth [Sat, 15 Jan 2022 09:54:09 +0000 (10:54 +0100)]
internal: Decrease PartialOrd and PartialEq trait methods completion relevance

2 years agomake it a config
Jake Heinz [Sat, 15 Jan 2022 02:47:47 +0000 (02:47 +0000)]
make it a config

2 years agoformat
Milo [Fri, 14 Jan 2022 22:13:45 +0000 (22:13 +0000)]
format

2 years agofix overly
Milo [Fri, 14 Jan 2022 22:06:30 +0000 (22:06 +0000)]
fix overly

2 years agoMerge #11248
bors[bot] [Fri, 14 Jan 2022 19:03:55 +0000 (19:03 +0000)]
Merge #11248

11248: Merge match assist: take arm types into consideration  r=Vannevelj a=Vannevelj

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/9337

Co-authored-by: Jeroen Vannevel <jer_vannevel@outlook.com>
2 years agostyling fixes
Jeroen Vannevel [Fri, 14 Jan 2022 18:53:28 +0000 (18:53 +0000)]
styling fixes

2 years agoMerge #11286
bors[bot] [Fri, 14 Jan 2022 17:50:05 +0000 (17:50 +0000)]
Merge #11286

11286: internal: Clean up assoc item collection a bit r=jonas-schievink a=jonas-schievink

Introduce an `AssocItemCollector` instead of passing a lot of parameters around.

bors r+

Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
2 years agoClean up assoc item collection a bit
Jonas Schievink [Fri, 14 Jan 2022 17:45:23 +0000 (18:45 +0100)]
Clean up assoc item collection a bit

2 years agoMerge #11284
bors[bot] [Fri, 14 Jan 2022 16:53:26 +0000 (16:53 +0000)]
Merge #11284

11284: internal: Remove redundant recursion limit r=jonas-schievink a=jonas-schievink

`Expander` already does this, so we don't have to track the depth when collecting associated items.

bors r+

Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
2 years agoRemove redundant recursion limit
Jonas Schievink [Fri, 14 Jan 2022 16:45:57 +0000 (17:45 +0100)]
Remove redundant recursion limit

2 years agoMerge #11283
bors[bot] [Fri, 14 Jan 2022 11:16:18 +0000 (11:16 +0000)]
Merge #11283

11283: fix: Adjust `.` typing auto indentation r=Veykril a=Veykril

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/629
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agofix: Adjust `.` typing auto indentation
Lukas Wirth [Fri, 14 Jan 2022 11:15:43 +0000 (12:15 +0100)]
fix: Adjust `.` typing auto indentation

2 years agohacky fix for cancelling
Jake Heinz [Fri, 14 Jan 2022 10:30:51 +0000 (10:30 +0000)]
hacky fix for cancelling

2 years agoone last bit of cleanup
Jake Heinz [Fri, 14 Jan 2022 10:10:47 +0000 (10:10 +0000)]
one last bit of cleanup

2 years agoMerge #11282
bors[bot] [Fri, 14 Jan 2022 10:08:27 +0000 (10:08 +0000)]
Merge #11282

11282: fix: Properly cache files in Semantics when ascending macros r=Veykril a=Veykril

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/11280
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agofix: Properly cache files in Semantics when ascending macros
Lukas Wirth [Fri, 14 Jan 2022 10:07:53 +0000 (11:07 +0100)]
fix: Properly cache files in Semantics when ascending macros

2 years agoremoved scoped threads, cleanup
Jake Heinz [Fri, 14 Jan 2022 10:06:28 +0000 (10:06 +0000)]
removed scoped threads, cleanup

2 years agoReplace HasSource usages with Semantics equivalent
Lukas Wirth [Fri, 14 Jan 2022 09:59:27 +0000 (10:59 +0100)]
Replace HasSource usages with Semantics equivalent

2 years agocleanup + detect num cpus
Jake Heinz [Fri, 14 Jan 2022 09:48:59 +0000 (09:48 +0000)]
cleanup + detect num cpus

2 years agocleanup
Jake Heinz [Fri, 14 Jan 2022 09:36:03 +0000 (09:36 +0000)]
cleanup

2 years agouse index map
Jake Heinz [Fri, 14 Jan 2022 09:35:41 +0000 (09:35 +0000)]
use index map

2 years agomake progress callback dyn
Jake Heinz [Fri, 14 Jan 2022 09:33:40 +0000 (09:33 +0000)]
make progress callback dyn

2 years agofix warnings
Jake Heinz [Fri, 14 Jan 2022 09:25:45 +0000 (09:25 +0000)]
fix warnings

2 years agosimplify
Jake Heinz [Fri, 14 Jan 2022 09:21:25 +0000 (09:21 +0000)]
simplify

2 years agoide: parallel prime caches
Jake Heinz [Fri, 14 Jan 2022 09:11:47 +0000 (09:11 +0000)]
ide: parallel prime caches