]>
git.lizzy.rs Git - rust.git/log
bors [Thu, 5 May 2022 15:35:10 +0000 (15:35 +0000)]
Auto merge of #12149 - jonas-schievink:literally-just-a-literal, r=jonas-schievink
fix: split float literal tokens at `.` to fix parsing of tuple field accesses
This introduces an `ast::FloatLiteral` node, changes the `FLOAT_LITERAL` token to `FLOAT_LITERAL_PART`, and splits any float literal at the `.` character, into a `FLOAT_LITERAL_PART`, and optional `DOT` and trailing `FLOAT_LITERAL_PART` token. The tokens are reassembled when passing them to a macro as a `tt::Literal`.
~~A slight regression is introduced in how float literals are highlighted: the `.` is now highlighted as an operator. I've tried to fix this but couldn't figure out how to highlight the whole `ast::FloatLiteral` node as a unit.~~ This is fixed
Fixes https://github.com/rust-lang/rust-analyzer/issues/1109
Fixes https://github.com/rust-lang/rust-analyzer/issues/10492
Fixes https://github.com/rust-lang/rust-analyzer/issues/12107
Fixes https://github.com/rust-lang/rust-analyzer/issues/10560
Fixes https://github.com/rust-lang/rust-analyzer/issues/11487
Jonas Schievink [Thu, 5 May 2022 14:35:07 +0000 (16:35 +0200)]
Fix rebase fallout
Jonas Schievink [Thu, 5 May 2022 14:26:16 +0000 (16:26 +0200)]
Maybe everything else *should* have to deal with it
Jonas Schievink [Thu, 5 May 2022 14:06:44 +0000 (16:06 +0200)]
Indicate the number of float tokens in the first token
Jonas Schievink [Wed, 4 May 2022 17:25:32 +0000 (19:25 +0200)]
Wrap floats in token trees in `FLOAT_LITERAL` node
Jonas Schievink [Wed, 4 May 2022 15:10:53 +0000 (17:10 +0200)]
Add completion test
Jonas Schievink [Wed, 4 May 2022 14:58:02 +0000 (16:58 +0200)]
Add tests
Jonas Schievink [Wed, 4 May 2022 14:51:05 +0000 (16:51 +0200)]
Split float literal tokens at the `.`
Jonas Schievink [Tue, 3 May 2022 17:56:10 +0000 (19:56 +0200)]
Wrap float literals in their own node
Jonas Schievink [Tue, 3 May 2022 14:47:33 +0000 (16:47 +0200)]
Remove `ast::Literal::token`
bors [Thu, 5 May 2022 13:51:22 +0000 (13:51 +0000)]
Auto merge of #12164 - Veykril:completion-rev, r=Veykril
internal: Remove `unqualified_path` completions module
cc https://github.com/rust-lang/rust-analyzer/issues/12144
Lukas Wirth [Thu, 5 May 2022 13:49:03 +0000 (15:49 +0200)]
internal: Remove unqualified_path completions module
bors [Thu, 5 May 2022 10:20:30 +0000 (10:20 +0000)]
Auto merge of #12161 - Veykril:completion-rev, r=Veykril
internal: Lift out item list path completions from (un)qualified_path
cc https://github.com/rust-lang/rust-analyzer/issues/12144
Lukas Wirth [Thu, 5 May 2022 10:08:40 +0000 (12:08 +0200)]
internal: Lift out item list path completions from (un)qualified_path
bors [Thu, 5 May 2022 09:03:23 +0000 (09:03 +0000)]
Auto merge of #12160 - Veykril:completions-rev, r=Veykril
minor: Sort ide-completions test outputs for less disruptive diffs
Lukas Wirth [Thu, 5 May 2022 08:49:43 +0000 (10:49 +0200)]
minor: Sort ide-completions test outputs for less disruptive diffs
bors [Thu, 5 May 2022 08:51:18 +0000 (08:51 +0000)]
Auto merge of #12159 - Veykril:completions-rev, r=Veykril
internal: Lift out macro bang property from completion PathKind enum
Lukas Wirth [Thu, 5 May 2022 08:34:57 +0000 (10:34 +0200)]
internal: Lift out macro bang property from PathKind enum
bors [Thu, 5 May 2022 07:35:41 +0000 (07:35 +0000)]
Auto merge of #12157 - lnicola:lower-char-byte-literals, r=Veykril
feat: Lower values of char and byte literals
Closes #12137
Laurențiu Nicola [Thu, 5 May 2022 05:10:07 +0000 (08:10 +0300)]
Lower values of char and byte literals
bors [Thu, 5 May 2022 04:54:12 +0000 (04:54 +0000)]
Auto merge of #12150 - rainy-me:feat/fix-doc-url-links, r=rainy-me
fix: doc url link type
fix: #12033
I did some debugging and found the cause looks like to be some doc links' `LinkType` are kept as `Shortcut` which don't make sense for url links.
This PR should resolve both problems in the origin issue, but aside this PR, more work are needed for doc_links.
about `LinkType`: https://github.com/raphlinus/pulldown-cmark/blob/
f29bd1e228913690e5092c9594e4e607423ff0aa /src/lib.rs#L191-L210
rainy-me [Thu, 5 May 2022 04:41:33 +0000 (13:41 +0900)]
fix: add docs and remove unnecessary check
rainy-me [Wed, 4 May 2022 15:41:29 +0000 (00:41 +0900)]
fix: doc url link type
bors [Wed, 4 May 2022 09:32:17 +0000 (09:32 +0000)]
Auto merge of #12143 - bnjjj:master, r=Veykril
improve the default constructor mode when filling fields
Instead of filling a boolean field with `bool::default()` it's not `false` and same for `Option` instead of using `Option::default()` it will be `None`
bors [Wed, 4 May 2022 09:08:22 +0000 (09:08 +0000)]
Auto merge of #12142 - WaffleLapkin:sort-items-by-trait-def, r=lnicola
feat: Sort items by trait definition assist
This PR replaces the "Sort **methods** by trait definition" assist with a "Sort **items** by trait definition" assist that sorts all items, not just methods.
![sort-items-by-trait-def-showcase](https://user-images.githubusercontent.com/
38225716 /
166491828 -
0bc10dbd -91be-408f-9fe0-
636ef5e99377 .gif)
Benjamin Coenen [Tue, 3 May 2022 16:27:25 +0000 (18:27 +0200)]
improve the default constructor mode when filling fields
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
Maybe Waffle [Tue, 3 May 2022 20:55:00 +0000 (00:55 +0400)]
Remove "Sort methods by trait definition" assist
It was replaced by the "Sort items by trait definition" assist.
Maybe Waffle [Tue, 3 May 2022 15:41:33 +0000 (19:41 +0400)]
Add "Sort items by trait definition"
Maybe Waffle [Tue, 3 May 2022 15:41:07 +0000 (19:41 +0400)]
Fix some typos in `ide-assists/src/lib.rs`
bors [Tue, 3 May 2022 11:50:31 +0000 (11:50 +0000)]
Auto merge of #12086 - iDawer:infer.rpit, r=flodiebold
infer from RPIT bounds of _this_ function
Collect obligations from RPITs (Return Position `impl Trait`) of a function which is being inferred.
This allows inferring {unknown}s from RPIT bounds.
Closes #8403
bors [Tue, 3 May 2022 11:01:26 +0000 (11:01 +0000)]
Auto merge of #12139 - matklad:depsdeps, r=matklad
:arrow_up: deps
iDawer [Tue, 26 Apr 2022 14:25:10 +0000 (19:25 +0500)]
'inference': collect RPIT obligations
Collect obligations from RPITs (Return Position `impl Trait`) of a function which is being inferred.
This allows inferring {unknown}s from RPIT bounds.
Aleksey Kladov [Tue, 3 May 2022 10:57:40 +0000 (11:57 +0100)]
:arrow_up: deps
bors [Mon, 2 May 2022 15:48:52 +0000 (15:48 +0000)]
Auto merge of #12136 - jonas-schievink:lexedstr-converter, r=jonas-schievink
internal: Add a `Converter` type for token conversion
Makes it easier to produce multiple tokens from a single rustc token, if that's how we want to approach https://github.com/rust-analyzer/rust-analyzer/issues/1109
Jonas Schievink [Mon, 2 May 2022 15:47:12 +0000 (17:47 +0200)]
Add a `Converter` type for token conversion
bors [Mon, 2 May 2022 12:29:49 +0000 (12:29 +0000)]
Auto merge of #12123 - rainy-me:feat/impl-self-completion, r=Veykril
feat: provide Self in record literal completion
close #12106
bors [Mon, 2 May 2022 12:21:42 +0000 (12:21 +0000)]
Auto merge of #12093 - nico-abram:uwu, r=Veykril
Reload project on .cargo/config[.toml] changes
Fixes #11024
Not adding tests as discussed in the issue
bors [Mon, 2 May 2022 12:13:16 +0000 (12:13 +0000)]
Auto merge of #12120 - iDawer:ide.sig_help, r=Veykril
fix: Don't show signature help after closing bracket
Stop showing signature help after closing angle/round brackets.
Fixes #11624
bors [Mon, 2 May 2022 10:52:29 +0000 (10:52 +0000)]
Auto merge of #12135 - Veykril:hirdisp, r=Veykril
minor: Add a test for display rendering record variants
Lukas Wirth [Mon, 2 May 2022 10:51:00 +0000 (12:51 +0200)]
minor: Add a test for display rendering record variants
bors [Mon, 2 May 2022 10:40:19 +0000 (10:40 +0000)]
Auto merge of #12134 - Veykril:hirdisp, r=Veykril
fix: Fix uncorrect use of double braces in HirDisplay implementations
Lukas Wirth [Mon, 2 May 2022 10:38:33 +0000 (12:38 +0200)]
fix: Fix uncorrect use of double braces in HirDisplay implementations
bors [Mon, 2 May 2022 08:42:28 +0000 (08:42 +0000)]
Auto merge of #12133 - lnicola:crate-dashes, r=lnicola
internal: Fix crate names for release
Laurențiu Nicola [Mon, 2 May 2022 08:41:06 +0000 (11:41 +0300)]
Fix crate names
rainy-me [Sat, 30 Apr 2022 15:46:12 +0000 (00:46 +0900)]
feat: provide self in record literal completion
bors [Sun, 1 May 2022 11:00:48 +0000 (11:00 +0000)]
Auto merge of #12118 - randomicon00:fix#12102, r=lnicola
style: rename crates to kebab-case
Ref: #12102
I updated all the folders names as well as the crates names in each `Cargo.toml` to use kebab-case.
This is my first ra PR. In case I missed something, I am ready/available to fix it until it is ready to merge.
Thank you.
Peh [Sun, 1 May 2022 09:06:23 +0000 (09:06 +0000)]
delete another swap file
Peh [Sat, 30 Apr 2022 21:46:10 +0000 (21:46 +0000)]
update crates names in slow-tests/tidy.rs
Peh [Sat, 30 Apr 2022 21:18:02 +0000 (21:18 +0000)]
update diagnostic-docs crate name
Peh [Sat, 30 Apr 2022 21:00:41 +0000 (21:00 +0000)]
updated ide-assist new dir name
Peh [Sat, 30 Apr 2022 20:14:26 +0000 (20:14 +0000)]
delete a generated swap file
Peh [Fri, 29 Apr 2022 14:29:24 +0000 (14:29 +0000)]
style: rename crates to kebab case
bors [Sun, 1 May 2022 08:49:58 +0000 (08:49 +0000)]
Auto merge of #12099 - bitgaoshu:master, r=flodiebold
fix #11986 Aliases break resolution of qualified variants in patterns
bors [Sun, 1 May 2022 05:46:30 +0000 (05:46 +0000)]
Auto merge of #12127 - dtolnay-contrib:checkoutv3, r=lnicola
Update GitHub Actions actions/checkout@v2 to v3
The v2 implementation uses Node 12, which is end-of-life on April 30, 2022. See https://nodejs.org/en/about/releases/. Update to v3, which is based on Node 16 whose support lasts until April 30, 2024.
They made this a major version change (v2 to v3) because old GitHub Enterprise versions aren't necessarily compatible with Node 16, but for github.com-supplied runners (SaaS) there is no practical difference.
David Tolnay [Sat, 30 Apr 2022 20:56:03 +0000 (13:56 -0700)]
Update GitHub Actions actions/checkout@v2 to v3
The v2 implementation uses Node 12, which is end-of-life on April 30, 2022.
See https://nodejs.org/en/about/releases/. Update to v3, which is based on
Node 16 whose support lasts until April 30, 2024.
bors [Sat, 30 Apr 2022 18:15:21 +0000 (18:15 +0000)]
Auto merge of #12126 - Smibu:patch-1, r=lnicola
Fix typo in VSCode readme
Mika Lehtinen [Sat, 30 Apr 2022 18:03:51 +0000 (21:03 +0300)]
Fix typo in VSCode readme
bors [Sat, 30 Apr 2022 16:03:02 +0000 (16:03 +0000)]
Auto merge of #12124 - lnicola:downgrade-kqueue, r=lnicola
minor: Downgrade kqueue to fix NetBSD
CC https://github.com/notify-rs/notify/issues/401#issuecomment-
1114010902
Laurențiu Nicola [Sat, 30 Apr 2022 16:02:24 +0000 (19:02 +0300)]
Downgrade kqueue to fix NetBSD
iDawer [Fri, 29 Apr 2022 18:26:54 +0000 (23:26 +0500)]
Don't show signature help after closing bracket
bors [Fri, 29 Apr 2022 12:07:52 +0000 (12:07 +0000)]
Auto merge of #12117 - Veykril:mexpand, r=Veykril
minor: Insert whitespace after const token when formatting macro expansions
Lukas Wirth [Fri, 29 Apr 2022 12:07:19 +0000 (14:07 +0200)]
minor: Insert whitespace after const token when formatting macro expansions
bors [Fri, 29 Apr 2022 06:06:42 +0000 (06:06 +0000)]
Auto merge of #12113 - jtracey:patch-1, r=lnicola
small typo in log message
Justin Tracey [Fri, 29 Apr 2022 05:59:32 +0000 (05:59 +0000)]
small typo in log message
bors [Thu, 28 Apr 2022 18:23:26 +0000 (18:23 +0000)]
Auto merge of #12111 - jonas-schievink:fix-outline-mod-completion, r=jonas-schievink
fix: fix outline mod completion with partial module name
Fixes https://github.com/rust-lang/rust-analyzer/issues/12104
![screenshot-2022-04-28-20:22:42](https://user-images.githubusercontent.com/
1786438 /
165821068 -
a673a154 -ce53-4489-af60-
56d09dc9061c .png)
Jonas Schievink [Thu, 28 Apr 2022 18:21:46 +0000 (20:21 +0200)]
Fix outline mod completion with partial module name
bors [Thu, 28 Apr 2022 17:24:22 +0000 (17:24 +0000)]
Auto merge of #12110 - jonas-schievink:inline-self-type, r=jonas-schievink
feat: Make "inline type alias" work for `Self`
Fixes https://github.com/rust-lang/rust-analyzer/issues/12109
Jonas Schievink [Thu, 28 Apr 2022 17:23:57 +0000 (19:23 +0200)]
Add test with trait
Jonas Schievink [Thu, 28 Apr 2022 17:20:23 +0000 (19:20 +0200)]
Make "inline type alias" work for `Self`
bors [Thu, 28 Apr 2022 13:18:35 +0000 (13:18 +0000)]
Auto merge of #12108 - Veykril:simplify, r=Veykril
minor: Record snippet config errors
Lukas Wirth [Thu, 28 Apr 2022 13:17:44 +0000 (15:17 +0200)]
minor: Record snippet config errors
bitgaoshu [Wed, 27 Apr 2022 15:34:08 +0000 (23:34 +0800)]
#11986 Aliases break resolution of qualified variants in patterns
bors [Wed, 27 Apr 2022 18:05:37 +0000 (18:05 +0000)]
Auto merge of #12103 - jonas-schievink:diagnose-unresolved-derives, r=jonas-schievink
feat: diagnose unresolved derive macros
![screenshot-2022-04-27-20:04:59](https://user-images.githubusercontent.com/
1786438 /
165591059 -
c759f035 -2400-4bb1-84b0-
9332e86c65d5 .png)
Jonas Schievink [Wed, 27 Apr 2022 18:03:57 +0000 (20:03 +0200)]
Diagnose unresolved derive macros
bors [Wed, 27 Apr 2022 17:54:26 +0000 (17:54 +0000)]
Auto merge of #12101 - Veykril:simplify, r=Veykril
Simplify
Lukas Wirth [Wed, 27 Apr 2022 17:53:56 +0000 (19:53 +0200)]
Simplify
bors [Wed, 27 Apr 2022 17:18:46 +0000 (17:18 +0000)]
Auto merge of #12090 - Veykril:recov, r=Veykril
fix: Use pattern recovery set when parsing ident patterns
Lukas Wirth [Wed, 27 Apr 2022 17:08:50 +0000 (19:08 +0200)]
fix: Use pattern recovery set when parsing ident patterns
unknown [Tue, 26 Apr 2022 22:02:45 +0000 (19:02 -0300)]
Reload project on .cargo/config[.toml] changes
Fixes #11024
bors [Wed, 27 Apr 2022 13:09:31 +0000 (13:09 +0000)]
Auto merge of #12057 - harpsword:fix_validata_visibility, r=jonas-schievink
fix visibility token validation in trait impl with proc-macro
fix #11828
bors [Wed, 27 Apr 2022 12:59:52 +0000 (12:59 +0000)]
Auto merge of #12089 - lowr:fix/move-raw-ident-module-to-file, r=jonas-schievink
fix: handle raw identifiers in move_module_to_file
Fixes #12045
Note that I special case'd mod named `r#mod` as commented in the code. Although it's very unlikely that one would use such name, I included it in this fix for the sake of completeness.
harpsword [Fri, 22 Apr 2022 14:16:41 +0000 (22:16 +0800)]
fix visibility token validation in trait impl with proc-macro
bors [Wed, 27 Apr 2022 12:41:29 +0000 (12:41 +0000)]
Auto merge of #12098 - jonas-schievink:macro-rules-snippet, r=jonas-schievink
fix: show `macro_rules` snippet in blocks
fixes https://github.com/rust-lang/rust-analyzer/issues/12092
Jonas Schievink [Wed, 27 Apr 2022 12:40:09 +0000 (14:40 +0200)]
Show `macro_rules` snippet in blocks
bors [Wed, 27 Apr 2022 12:32:35 +0000 (12:32 +0000)]
Auto merge of #12097 - lnicola:revert-11490, r=lnicola
Revert #11490
Closes #11725
#11490 was a little misguided. Quoting the test name should be a client concern, since it's the client that actually runs `cargo`.
Laurențiu Nicola [Wed, 27 Apr 2022 12:27:50 +0000 (15:27 +0300)]
Revert "Correctly fix formatting doc tests with generics"
This reverts commit
5f3327a6b8925791ecdd9dbecb1bf1537c3ef9fc .
Laurențiu Nicola [Wed, 27 Apr 2022 12:27:48 +0000 (15:27 +0300)]
Revert "Update crates/ide/src/runnables.rs"
This reverts commit
bf47acf1d3451eb281ea56a6ad8f5e1834ce6a8f .
bors [Wed, 27 Apr 2022 10:43:43 +0000 (10:43 +0000)]
Auto merge of #12085 - rainy-me:fix_fn_param, r=Veykril
fix: fn_param completion lookup
close #12073 caused by #12040
rainy-me [Wed, 27 Apr 2022 09:54:57 +0000 (18:54 +0900)]
fix: remove lookup and handle mut kw case
LowR [Tue, 26 Apr 2022 18:34:32 +0000 (03:34 +0900)]
fix: handle raw identifiers in move_module_to_file
bors [Tue, 26 Apr 2022 09:53:26 +0000 (09:53 +0000)]
Auto merge of #12083 - Veykril:inlays, r=Veykril
minor: Add test for parameter and reborrow hint order
Lukas Wirth [Tue, 26 Apr 2022 09:46:03 +0000 (11:46 +0200)]
minor: Add test for parameter and reborrow hint order
bors [Tue, 26 Apr 2022 07:34:00 +0000 (07:34 +0000)]
Auto merge of #12082 - iDawer:ide.signature_help, r=lnicola
fix: `signature_help`: use corresponding param list for methods
Close #12079
iDawer [Tue, 26 Apr 2022 06:50:28 +0000 (11:50 +0500)]
`signature_help`: use corresponding param list for methods
bors [Mon, 25 Apr 2022 17:01:44 +0000 (17:01 +0000)]
Auto merge of #12078 - Veykril:neither, r=Veykril
minor: Re-export `FxHashMap` and `FxHashSet` from `ide_db`
Lukas Wirth [Mon, 25 Apr 2022 16:51:59 +0000 (18:51 +0200)]
Re-export `FxHashMap` and `FxHashSet` from `ide_db`
bors [Mon, 25 Apr 2022 16:48:42 +0000 (16:48 +0000)]
Auto merge of #12077 - Veykril:neither, r=Veykril
minor: Remove `either` dependency from `ide_completion`
bors r+
Lukas Wirth [Mon, 25 Apr 2022 16:40:38 +0000 (18:40 +0200)]
minor: Remove either dependency from `ide_completion`
bors [Mon, 25 Apr 2022 13:22:41 +0000 (13:22 +0000)]
Auto merge of #12075 - jonas-schievink:less-aggressive-quickfixes, r=jonas-schievink
fix: Don't emit a quickfix for placeholder suggestions from rustc/clippy
Fixes https://github.com/rust-lang/rust-analyzer/issues/12069
Jonas Schievink [Mon, 25 Apr 2022 13:21:30 +0000 (15:21 +0200)]
Don't emit a quickfix for placeholder suggestions