]>
git.lizzy.rs Git - rust.git/log
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>
Jonas Schievink [Mon, 24 Jan 2022 16:27:39 +0000 (17:27 +0100)]
Make syntax bridge fully infallible
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>
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
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>
Laurențiu Nicola [Sat, 22 Jan 2022 09:59:45 +0000 (11:59 +0200)]
Bump npm deps
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>
Laurențiu Nicola [Fri, 21 Jan 2022 17:51:21 +0000 (19:51 +0200)]
Bump chalk
Laurențiu Nicola [Fri, 21 Jan 2022 17:49:57 +0000 (19:49 +0200)]
Bump pulldown-cmark and pulldown-cmark-to-cmark
Laurențiu Nicola [Fri, 21 Jan 2022 17:44:03 +0000 (19:44 +0200)]
Bump hashbrown
Laurențiu Nicola [Fri, 21 Jan 2022 17:42:04 +0000 (19:42 +0200)]
Bump dashmap
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>
Jonas Schievink [Fri, 21 Jan 2022 11:58:06 +0000 (12:58 +0100)]
Remove redundant `Option` from eager macro fns
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>
Schuyler Cohen [Wed, 19 Jan 2022 19:37:25 +0000 (13:37 -0600)]
Remove spurious format
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>
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
Jonas Schievink [Tue, 18 Jan 2022 17:17:43 +0000 (18:17 +0100)]
Don't load auxiliary crates outside the workspace
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>
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>
Wesley Norris [Mon, 17 Jan 2022 23:44:43 +0000 (18:44 -0500)]
Add test for comments not directly next to items
Wesley Norris [Mon, 17 Jan 2022 22:12:32 +0000 (17:12 -0500)]
Add a test for multi-single-line comments as well
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.
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
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>
Jonas Schievink [Mon, 17 Jan 2022 17:10:01 +0000 (18:10 +0100)]
status: output all crates a file belongs to
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>
Jonas Schievink [Mon, 17 Jan 2022 15:52:53 +0000 (16:52 +0100)]
Allow macros to expand to or-patterns
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>
Laurențiu Nicola [Mon, 17 Jan 2022 07:18:40 +0000 (09:18 +0200)]
Temporarily disable format string completions
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>
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>
Lukas Wirth [Sat, 15 Jan 2022 12:14:59 +0000 (13:14 +0100)]
Move format specifier lexing from syntax to ide_db
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>
Lukas Wirth [Sat, 15 Jan 2022 11:12:02 +0000 (12:12 +0100)]
feat: Add very simplistic ident completion for format_args! macro input
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>
Lukas Wirth [Sat, 15 Jan 2022 09:54:09 +0000 (10:54 +0100)]
internal: Decrease PartialOrd and PartialEq trait methods completion relevance
Milo [Fri, 14 Jan 2022 22:13:45 +0000 (22:13 +0000)]
format
Milo [Fri, 14 Jan 2022 22:06:30 +0000 (22:06 +0000)]
fix overly
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>
Jeroen Vannevel [Fri, 14 Jan 2022 18:53:28 +0000 (18:53 +0000)]
styling fixes
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>
Jonas Schievink [Fri, 14 Jan 2022 17:45:23 +0000 (18:45 +0100)]
Clean up assoc item collection a bit
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>
Jonas Schievink [Fri, 14 Jan 2022 16:45:57 +0000 (17:45 +0100)]
Remove redundant recursion limit
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>
Lukas Wirth [Fri, 14 Jan 2022 11:15:43 +0000 (12:15 +0100)]
fix: Adjust `.` typing auto indentation
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>
Lukas Wirth [Fri, 14 Jan 2022 10:07:53 +0000 (11:07 +0100)]
fix: Properly cache files in Semantics when ascending macros
Lukas Wirth [Fri, 14 Jan 2022 09:59:27 +0000 (10:59 +0100)]
Replace HasSource usages with Semantics equivalent
Jeroen Vannevel [Fri, 14 Jan 2022 01:26:17 +0000 (01:26 +0000)]
simple return
Jeroen Vannevel [Fri, 14 Jan 2022 01:22:48 +0000 (01:22 +0000)]
formatting
Jeroen Vannevel [Fri, 14 Jan 2022 01:22:19 +0000 (01:22 +0000)]
removed toy
Jeroen Vannevel [Fri, 14 Jan 2022 01:20:40 +0000 (01:20 +0000)]
happy slice
Jeroen Vannevel [Fri, 14 Jan 2022 01:18:03 +0000 (01:18 +0000)]
refpat & slicepat
Jeroen Vannevel [Fri, 14 Jan 2022 00:39:44 +0000 (00:39 +0000)]
ParenPat
Jeroen Vannevel [Fri, 14 Jan 2022 00:35:21 +0000 (00:35 +0000)]
support TuplePat
Jeroen Vannevel [Tue, 11 Jan 2022 21:53:39 +0000 (21:53 +0000)]
battle of the Some
Jeroen Vannevel [Tue, 11 Jan 2022 21:50:42 +0000 (21:50 +0000)]
cleaning up Some
Jeroen Vannevel [Tue, 11 Jan 2022 21:44:30 +0000 (21:44 +0000)]
removed unwrap
Jeroen Vannevel [Tue, 11 Jan 2022 21:40:57 +0000 (21:40 +0000)]
formatting
Jeroen Vannevel [Tue, 11 Jan 2022 21:40:22 +0000 (21:40 +0000)]
removed prints
Jeroen Vannevel [Tue, 11 Jan 2022 21:39:50 +0000 (21:39 +0000)]
all tests work
Jeroen Vannevel [Tue, 11 Jan 2022 20:17:47 +0000 (20:17 +0000)]
merge_match_arms_nested_with_conflicting_identifier
Jeroen Vannevel [Tue, 11 Jan 2022 20:05:56 +0000 (20:05 +0000)]
Added a few more test cases
Jeroen Vannevel [Mon, 10 Jan 2022 23:10:09 +0000 (23:10 +0000)]
fixed test case
Jeroen Vannevel [Mon, 10 Jan 2022 18:54:59 +0000 (18:54 +0000)]
test for different number of fields
Jeroen Vannevel [Mon, 10 Jan 2022 18:46:47 +0000 (18:46 +0000)]
test cases with more branches
Jeroen Vannevel [Mon, 10 Jan 2022 18:38:17 +0000 (18:38 +0000)]
simplified chain
Jeroen Vannevel [Mon, 10 Jan 2022 18:33:28 +0000 (18:33 +0000)]
don't need the as_ref()
Jeroen Vannevel [Mon, 10 Jan 2022 18:30:27 +0000 (18:30 +0000)]
extracted function
Jeroen Vannevel [Mon, 10 Jan 2022 18:24:36 +0000 (18:24 +0000)]
added tests for multiple fields
Jeroen Vannevel [Mon, 10 Jan 2022 18:19:37 +0000 (18:19 +0000)]
using classify()
Jeroen Vannevel [Mon, 10 Jan 2022 18:14:29 +0000 (18:14 +0000)]
removed some unused stuff
Jeroen Vannevel [Mon, 10 Jan 2022 12:44:45 +0000 (12:44 +0000)]
minicore
Jeroen Vannevel [Fri, 7 Jan 2022 23:44:14 +0000 (23:44 +0000)]
compiles, but doesn't work yet
bors[bot] [Thu, 13 Jan 2022 19:18:47 +0000 (19:18 +0000)]
Merge #11276
11276: internal: Slightly cleanup HasFormatSpecifier::lex_format_specifier r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
bors[bot] [Thu, 13 Jan 2022 19:08:38 +0000 (19:08 +0000)]
Merge #11277
11277: minor: reformat and fix warning r=lnicola a=lnicola
bors r+
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
Laurențiu Nicola [Thu, 13 Jan 2022 19:08:04 +0000 (21:08 +0200)]
Remove duplicate test attribute
Laurențiu Nicola [Thu, 13 Jan 2022 19:07:17 +0000 (21:07 +0200)]
Reformat code
Lukas Wirth [Thu, 13 Jan 2022 18:12:39 +0000 (19:12 +0100)]
Slightly cleanup HasFormatSpecifier::lex_format_specifier
bors[bot] [Thu, 13 Jan 2022 15:19:03 +0000 (15:19 +0000)]
Merge #11274
11274: internal: Unexport `MacroDefId` from `hir` r=jonas-schievink a=jonas-schievink
It's not used outside of it
bors r+
Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
Jonas Schievink [Thu, 13 Jan 2022 15:18:05 +0000 (16:18 +0100)]
Unexport `MacroDefId` from `hir`
bors[bot] [Wed, 12 Jan 2022 19:22:15 +0000 (19:22 +0000)]
Merge #11267
11267: internal: Remove `ModuleId` from `hir` reexports r=jonas-schievink a=jonas-schievink
followup to https://github.com/rust-analyzer/rust-analyzer/pull/11266
bors r+
Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
Jonas Schievink [Wed, 12 Jan 2022 19:19:10 +0000 (20:19 +0100)]
Remove `ModuleId` from `hir` reexports
bors[bot] [Wed, 12 Jan 2022 18:58:24 +0000 (18:58 +0000)]
Merge #11266
11266: internal: Mostly restore `hir` API boundary r=jonas-schievink a=jonas-schievink
The boundary was broken in https://github.com/rust-analyzer/rust-analyzer/pull/10872 by reexporting a bunch of `hir_def`-internal types.
This PR moves symbol collection to `hir` and removes those reexports again.
bors r+
Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
Jonas Schievink [Wed, 12 Jan 2022 18:56:47 +0000 (19:56 +0100)]
Mostly restore `hir` API boundary
bors[bot] [Wed, 12 Jan 2022 12:30:41 +0000 (12:30 +0000)]
Merge #11265
11265: fix: Fix postfix completion panic r=lnicola a=Veykril
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/11233
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Wed, 12 Jan 2022 12:07:16 +0000 (13:07 +0100)]
fix: Fix postfix completion panic
bors[bot] [Wed, 12 Jan 2022 11:37:18 +0000 (11:37 +0000)]
Merge #11263
11263: fix: Fix don't drop param completions when fully typing out a pattern r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Wed, 12 Jan 2022 11:36:46 +0000 (12:36 +0100)]
fix: Fix don't drop param completions when fully typing out a pattern
bors[bot] [Tue, 11 Jan 2022 18:04:09 +0000 (18:04 +0000)]
Merge #11261
11261: fix: Don't complete attributes with existing expressions r=Veykril a=Veykril
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/11254 due to the comment being lowered to an attribute
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Tue, 11 Jan 2022 18:03:21 +0000 (19:03 +0100)]
Don't complete attributes with existing expressions
bors[bot] [Tue, 11 Jan 2022 14:43:44 +0000 (14:43 +0000)]
Merge #11259
11259: fix: fix `use super::{super::...};` r=jonas-schievink a=jonas-schievink
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/11249
bors r+
Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
Jonas Schievink [Tue, 11 Jan 2022 14:30:39 +0000 (15:30 +0100)]
Fix concatenation of `super` mod paths
bors[bot] [Tue, 11 Jan 2022 14:17:18 +0000 (14:17 +0000)]
Merge #11258
11258: Kate uses rust-analyzer by default now r=jonas-schievink a=milliams
Since Kate 21.12 rust-analyzer is the default. See this Kate MR: https://invent.kde.org/utilities/kate/-/merge_requests/495
Co-authored-by: Matt Williams <matt@milliams.com>
bors[bot] [Tue, 11 Jan 2022 13:36:53 +0000 (13:36 +0000)]
Merge #11257
11257: feat: Report `DefDiagnostic`s from inside item bodies r=jonas-schievink a=jonas-schievink
Reports diagnostics from all block-level `DefMap`s, and adds some code to avoid adding duplicate diagnostics to the body's `SourceMap`.
bors r+
Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
Matt Williams [Tue, 11 Jan 2022 13:36:06 +0000 (13:36 +0000)]
Kate uses rust-analyzer by default
Jonas Schievink [Tue, 11 Jan 2022 13:34:25 +0000 (14:34 +0100)]
Report `DefDiagnostic`s from inside item bodies
bors[bot] [Tue, 11 Jan 2022 09:39:12 +0000 (09:39 +0000)]
Merge #11210
11210: feat: Deprioritize ops methods in completion r=Veykril a=Veykril
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/10593
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>