]>
git.lizzy.rs Git - rust.git/log
Jonas Schievink [Mon, 16 May 2022 13:23:25 +0000 (15:23 +0200)]
Add closing brace hints for macros
Jonas Schievink [Fri, 13 May 2022 17:42:59 +0000 (19:42 +0200)]
Show inlay hints after a `}` to indicate the closed item
bors [Mon, 16 May 2022 11:44:00 +0000 (11:44 +0000)]
Auto merge of #12256 - matklad:m, r=matklad
minor: rename
Aleksey Kladov [Sat, 14 May 2022 21:08:16 +0000 (22:08 +0100)]
minor: rename
bors [Mon, 16 May 2022 11:16:22 +0000 (11:16 +0000)]
Auto merge of #12253 - Veykril:bm, r=Veykril
feat: Add binding mode inlay hints
![image](https://user-images.githubusercontent.com/
3757771 /
168427387 -
2f299438 -a0cc-496b-a9a5-
d689ef6a2b55 .png)
bors [Sun, 15 May 2022 18:11:32 +0000 (18:11 +0000)]
Auto merge of #12242 - flodiebold:extension-description, r=flodiebold
Improve extension description and README
bors [Sun, 15 May 2022 12:47:38 +0000 (12:47 +0000)]
Auto merge of #12262 - jhgg:fix-whitespace-between-mut-self-in-macro-expansion, r=lnicola
ide: insert whitespace between 'mut' and 'self' in macro expansion
fixes #12260
bors [Sun, 15 May 2022 09:48:51 +0000 (09:48 +0000)]
Auto merge of #12190 - harpsword:fix_diagostics_map_incorrectly, r=harpsword
fix cargo check diagnostics are mapped incorrectly with non-BMP codepoints
fix #11945
Jake Heinz [Sun, 15 May 2022 07:55:13 +0000 (07:55 +0000)]
ide: insert whitespace between 'mut' and 'self' in macro expansion
bors [Sat, 14 May 2022 20:20:01 +0000 (20:20 +0000)]
Auto merge of #12251 - matklad:lsp-server, r=matklad
internal: vendor lsp-server
Aleksey Kladov [Sat, 14 May 2022 10:33:48 +0000 (11:33 +0100)]
internal: vendor lsp-server
Lukas Wirth [Sat, 14 May 2022 13:18:18 +0000 (15:18 +0200)]
Update package.json
Lukas Wirth [Sat, 14 May 2022 13:00:14 +0000 (15:00 +0200)]
Enable reborrow hints in attribute calls
Lukas Wirth [Sat, 14 May 2022 12:26:08 +0000 (14:26 +0200)]
feat: Add binding mode inlay hints
bors [Sat, 14 May 2022 11:56:11 +0000 (11:56 +0000)]
Auto merge of #12252 - Veykril:config, r=Veykril
internal: Make VSCode config more GUI edit friendly
Lukas Wirth [Sat, 14 May 2022 11:53:41 +0000 (13:53 +0200)]
internal: Make VSCode config more GUI edit friendly
harpsword [Sun, 8 May 2022 03:06:52 +0000 (11:06 +0800)]
fix diagnostics location map incorrectly from rustc span to lsp position for non-BMP char
Florian Diebold [Fri, 13 May 2022 20:13:23 +0000 (22:13 +0200)]
Change description
bors [Fri, 13 May 2022 19:36:32 +0000 (19:36 +0000)]
Auto merge of #12246 - Veykril:config, r=Veykril
fix: Fix incorrect hover actions config keys
Lukas Wirth [Fri, 13 May 2022 19:20:37 +0000 (21:20 +0200)]
Don't make r-a fail to initialize if updating the config fails
Lukas Wirth [Fri, 13 May 2022 19:17:03 +0000 (21:17 +0200)]
fix: Fix incorrect hover actions config keys
bors [Fri, 13 May 2022 17:53:23 +0000 (17:53 +0000)]
Auto merge of #12245 - Veykril:compl-snip, r=Veykril
fix: Fix fill-arguments completions not working
Fixes https://github.com/rust-lang/rust-analyzer/issues/12243
Lukas Wirth [Fri, 13 May 2022 17:52:44 +0000 (19:52 +0200)]
fix: Fix fill-arguments completions not working
Florian Diebold [Fri, 13 May 2022 16:12:54 +0000 (18:12 +0200)]
Improve extension description and README
bors [Fri, 13 May 2022 15:02:00 +0000 (15:02 +0000)]
Auto merge of #12241 - jonas-schievink:does-not-float-my-boat, r=jonas-schievink
fix: revert float parsing "fix" to avoid macro-related panics
Reverts https://github.com/rust-lang/rust-analyzer/pull/12149 and the follow-up fixes, while keeping their tests.
https://github.com/rust-lang/rust-analyzer/pull/12149 has caused many unexpected panics related to macros, and the fixes for those are not straightforward and further complicate the MBE token conversion logic, which was already fairly hard to follow before these fixes.
Jonas Schievink [Fri, 13 May 2022 13:27:17 +0000 (15:27 +0200)]
Fix tests
Jonas Schievink [Fri, 13 May 2022 13:08:14 +0000 (15:08 +0200)]
Revert "Auto merge of #12149 - jonas-schievink:literally-just-a-literal, r=jonas-schievink"
This reverts commit
cc9ae2b89e01a30e441371b9fd3376c3d03a475f , reversing
changes made to
7dfd1cb572d8d4fd951237361e43ecddd9c9a852 .
Jonas Schievink [Fri, 13 May 2022 13:06:16 +0000 (15:06 +0200)]
Revert "Skip only the `tt::Literal` when consuming float tokens"
This reverts commit
7db55313a17a488a8e437fbd184290995f04a32d .
Jonas Schievink [Fri, 13 May 2022 13:05:17 +0000 (15:05 +0200)]
Revert "Fix conversion of float literals in `TtTreeSink`"
This reverts commit
43a066c5a87972b5e42ad41bab56861661c49b18 .
Jonas Schievink [Fri, 13 May 2022 13:05:03 +0000 (15:05 +0200)]
Revert "fix: Remap float parts as integers when parsed as indices"
This reverts commit
dbb066b99e2e644437ddecb20127bcfdba975614 .
Jonas Schievink [Fri, 13 May 2022 13:04:15 +0000 (15:04 +0200)]
Revert "Don't remap float tokens to `INT_NUMBER`"
This reverts commit
cb5e8da88a06be415bd804884284c11c0a709bcf .
bors [Fri, 13 May 2022 12:38:08 +0000 (12:38 +0000)]
Auto merge of #12239 - Veykril:publisher, r=Veykril
minor: Fix typo in publisher field
Lukas Wirth [Fri, 13 May 2022 12:11:09 +0000 (14:11 +0200)]
Update package description
Lukas Wirth [Fri, 13 May 2022 12:10:37 +0000 (14:10 +0200)]
fix: Fix typo in publisher field
bors [Fri, 13 May 2022 11:26:43 +0000 (11:26 +0000)]
Auto merge of #12238 - Veykril:publisher, r=Veykril
feat: Change VSCode extension publisher to `rust-lang`
Lukas Wirth [Fri, 13 May 2022 11:21:52 +0000 (13:21 +0200)]
feat: Change VSCode extension publisher to `rust-lang`
bors [Thu, 12 May 2022 17:03:22 +0000 (17:03 +0000)]
Auto merge of #12231 - jonas-schievink:fix-float-macro-panic, r=jonas-schievink
fix: fix "X is not a valid punct" panic with floats in macros
Should fix https://github.com/rust-lang/rust-analyzer/issues/12211
Jonas Schievink [Thu, 12 May 2022 17:01:09 +0000 (19:01 +0200)]
Don't remap float tokens to `INT_NUMBER`
bors [Thu, 12 May 2022 16:16:20 +0000 (16:16 +0000)]
Auto merge of #12229 - Veykril:configfix, r=Veykril
fix: Fix vscode config descriptions not recognizing all valid values
Lukas Wirth [Thu, 12 May 2022 16:15:48 +0000 (18:15 +0200)]
fix: Fix vscode config descriptions not recognizing all valid values
bors [Thu, 12 May 2022 15:55:50 +0000 (15:55 +0000)]
Auto merge of #12228 - Veykril:configfix, r=Veykril
fix: Fix old config patching overwriting callable snippet config unconditionally
Lukas Wirth [Thu, 12 May 2022 15:55:25 +0000 (17:55 +0200)]
fix: Fix old config patching overwriting callable snippet config unconditionally
bors [Thu, 12 May 2022 12:21:06 +0000 (12:21 +0000)]
Auto merge of #12226 - Veykril:reborrow-inlay-hints, r=Veykril
feat: Allow reborrow inlay hints to be restricted to mutable reborrows only
Lukas Wirth [Thu, 12 May 2022 11:39:32 +0000 (13:39 +0200)]
feat: Allow reborrow inlay hints to be restricted to mutable reborrows only
bors [Thu, 12 May 2022 11:31:11 +0000 (11:31 +0000)]
Auto merge of #12224 - Veykril:anno-redundant, r=Veykril
internal: Remove redundant offset data in annotations
cc https://github.com/rust-lang/rust-analyzer/issues/12221
bors [Thu, 12 May 2022 11:18:36 +0000 (11:18 +0000)]
Auto merge of #12225 - Veykril:tmapfloats, r=Veykril
internal: Add token mapping test for float literals
cc https://github.com/rust-lang/rust-analyzer/issues/12216
Lukas Wirth [Thu, 12 May 2022 11:17:53 +0000 (13:17 +0200)]
internal: Add token mapping test for float literals
Lukas Wirth [Thu, 12 May 2022 10:55:25 +0000 (12:55 +0200)]
internal: Remove redundant offset data in annotations
bors [Thu, 12 May 2022 11:05:21 +0000 (11:05 +0000)]
Auto merge of #12215 - listochkin:Support-variable-substitution-in-vscode-settings, r=Veykril
feat: Support variable substitution in VSCode settings
Currently support a subset of [variables provided by VSCode](https://code.visualstudio.com/docs/editor/variables-reference) in `server.extraEnv` section of Rust-Analyzer settings:
* `workspaceFolder`
* `workspaceFolderBasename`
* `cwd`
* `execPath`
* `pathSeparator`
Also, this PR adds support for general environment variables resolution. You can declare environment variables and reference them from other variables like this:
```JSON
"rust-analyzer.server.extraEnv": {
"RUSTFLAGS": "-L${env:OPEN_XR_SDK_PATH}",
"OPEN_XR_SDK_PATH": "${workspaceFolder}\\..\\OpenXR-SDK\\build\\src\\loader\\Release"
},
```
The order of variable declaration doesn't matter, you can reference variables before defining them. If the variable is not present in `extraEnv` section, VSCode will search for them in your environment. Missing variables will be replaced with empty string. Circular references won't be resolved and will be passed to rust-analyzer server process as is.
Closes #9626, but doesn't address use cases where people want to use values provided by `rustc` or `cargo`, such as `${targetTriple}` proposal #11649
bors [Thu, 12 May 2022 10:30:37 +0000 (10:30 +0000)]
Auto merge of #12223 - Veykril:config-stuff, r=Veykril
internal: Rename primeCaches config keys
Lukas Wirth [Thu, 12 May 2022 10:29:40 +0000 (12:29 +0200)]
internal: Rename primeCaches config keys
bors [Thu, 12 May 2022 08:16:46 +0000 (08:16 +0000)]
Auto merge of #12220 - arzg:fix-character-semantic-token, r=arzg
Fix `character` semantic token type definition
The semantic token type for character literals is called `character`:
https://github.com/rust-lang/rust-analyzer/blob/
94fa8a6534cf93276ad7e205026402f24d41a0b2 /crates/rust-analyzer/src/semantic_tokens.rs#L51
and yet the definition in `package.json` uses `char`. In practice this means trying to highlight `char` doesn’t have any effect, while `character` doesn’t have any hover documentation and doesn’t appear in autocomplete. The definition also defines the fallback semantic token type as `type`; luckily since it currently references the non-existent `char` this doesn’t have any effect, since it doesn’t really make sense to highlight character literals as types.
This PR fixes the definition in `package.json` to correctly reference `character`, and also defines the fallback type as `number`. I’d say character literals are closer to a shorthand for writing a number than a string, though this is debatable and I’d be happy to change it to `string`, or anything else.
Luna Razzaghipour [Thu, 12 May 2022 07:19:41 +0000 (17:19 +1000)]
Fix `character` semantic token type definition
Andrei Listochkin [Wed, 11 May 2022 12:37:40 +0000 (13:37 +0100)]
Enable variable substitutions before passing them over to R-A server
Andrei Listochkin [Wed, 11 May 2022 12:34:43 +0000 (13:34 +0100)]
VSCode variables support for substitutions
Tests now open Rust-Analyzer extension code in order to populate
VSCode variables.
Andrei Listochkin [Wed, 11 May 2022 12:28:08 +0000 (13:28 +0100)]
handle references to external environment variables
use cross-env to enable env variables on Windows
Andrei Listochkin [Wed, 11 May 2022 12:22:58 +0000 (13:22 +0100)]
iterative dependency solver
First, we go through every environment variable key and record all cases
where there are reference to other variables / dependencies.
We track two sets of variables - resolved and yet-to-be-resolved.
We pass over a list of variables over and over again and when all
variable's dependencies were resolved during previous passes we perform
a replacement for that variable, too.
Over time the size of `toResolve` set should go down to zero, however
circular dependencies may prevent that. We track the size of `toResolve`
between iterations to avoid infinite looping.
At the end we produce an object of the same size and shape as
the original, but with the values replace with resolved versions.
Andrei Listochkin [Wed, 11 May 2022 11:01:34 +0000 (12:01 +0100)]
search for test files instead of explicitly name them
bors [Wed, 11 May 2022 10:38:56 +0000 (10:38 +0000)]
Auto merge of #12213 - Veykril:config-fix, r=Veykril
fix: Fix incorrect config patching for runBuildScripts
Lukas Wirth [Wed, 11 May 2022 10:33:56 +0000 (12:33 +0200)]
fix: Fix incorrect config patching for runBuildScripts
bors [Wed, 11 May 2022 07:26:28 +0000 (07:26 +0000)]
Auto merge of #12212 - Elliot-Roberts:hint_typo, r=lnicola
Fix a typo in the `inlayHints.renderColons` option description
The description said the same thing twice: "trailing colons for parameter hints, and trailing colons for parameter hints".
I'm assuming one of those is supposed to be about the leading colon for type hints.
Also, I wasn't sure how to regenerate the generated file(s?) so I just manually updated them. Hopefully that isn't a problem. If how to do that is in the documentation somewhere I'd love to know.
Elliot Roberts [Wed, 11 May 2022 02:15:07 +0000 (19:15 -0700)]
fix typo in `inlayHints.renderColons` option description
bors [Tue, 10 May 2022 19:15:06 +0000 (19:15 +0000)]
Auto merge of #12209 - Veykril:config-fix, r=Veykril
fix: Fix config patching failing when appending suffixes
Lukas Wirth [Tue, 10 May 2022 19:14:22 +0000 (21:14 +0200)]
fix: Fix config patching failing when appending suffixes
bors [Tue, 10 May 2022 14:55:59 +0000 (14:55 +0000)]
Auto merge of #12208 - jonas-schievink:assoc-ty-signature-info, r=jonas-schievink
feat: include associated types in trait signature help
Fixes https://github.com/rust-lang/rust-analyzer/issues/12141
![screenshot-2022-05-10-16:55:19](https://user-images.githubusercontent.com/
1786438 /
167658642 -
8df42fba -523a-46fe-a0f6-
e0e041b3659d .png)
Jonas Schievink [Tue, 10 May 2022 14:54:31 +0000 (16:54 +0200)]
Include assoc. types in trait signature help
Jonas Schievink [Tue, 10 May 2022 14:54:13 +0000 (16:54 +0200)]
Fix inverted signature help setting
bors [Tue, 10 May 2022 13:08:27 +0000 (13:08 +0000)]
Auto merge of #12204 - Veykril:completions, r=Veykril
internal: Move keyword expressions to expr completions module
Lukas Wirth [Tue, 10 May 2022 13:00:58 +0000 (15:00 +0200)]
Move keyword expressions to expr completions module
bors [Tue, 10 May 2022 12:36:46 +0000 (12:36 +0000)]
Auto merge of #12203 - Veykril:completions, r=Veykril
internal: Simplify
Lukas Wirth [Tue, 10 May 2022 12:31:43 +0000 (14:31 +0200)]
Don't parse files in module completion
Lukas Wirth [Tue, 10 May 2022 12:31:28 +0000 (14:31 +0200)]
Simplify
bors [Tue, 10 May 2022 12:28:34 +0000 (12:28 +0000)]
Auto merge of #12202 - iDawer:ide.sig_help-fix, r=lnicola
fix: don't panic at fully qualified call syntax in signature help
Closes #12200
Regressed from #12082
iDawer [Tue, 10 May 2022 12:18:42 +0000 (17:18 +0500)]
`signature_help`: detect fully qualified call syntax for parameter fallback
bors [Tue, 10 May 2022 12:07:24 +0000 (12:07 +0000)]
Auto merge of #12010 - Veykril:r-a-config, r=Veykril
Config revamp
Fixes https://github.com/rust-lang/rust-analyzer/issues/11790
Fixes https://github.com/rust-lang/rust-analyzer/issues/12115
This PR changes a lot of config names, and a few ones are being merged or split apart. The reason for this is that our configuration names currently are rather inconsistent and some where poorly chosen in regards to extensability. This PR plans to fix that.
We still allow the old config names by patching them to the new ones before deserializing to keep backwards compatability with other clients (the VSCode client will auto update the config) but ideally we will get rid of that layer in the future.
Here is a list of the changes:
These are simple renames `old_name | alias1 | alias2 ... -> new_name` (the vscode client will fix these up automagically):
```
assist_allowMergingIntoGlobImports -> imports_merge_glob
assist_exprFillDefault -> assist_expressionFillDefault
assist_importEnforceGranularity -> imports_granularity_enforce
assist_importGranularity | assist_importMergeBehavior | assist_importMergeBehaviour -> imports_granularity_group
assist_importGroup -> imports_group_enable
assist_importPrefix -> imports_prefix
cache_warmup -> primeCaches_enable
cargo_loadOutDirsFromCheck -> cargo_buildScripts_enable
cargo_runBuildScripts | cargo_runBuildScriptsCommand -> cargo_runBuildScripts_overrideCommand
cargo_useRustcWrapperForBuildScripts -> cargo_runBuildScripts_useRustcWrapper
completion_snippets -> completion_snippets_custom
diagnostics_enableExperimental -> diagnostics_experimental_enable
experimental_procAttrMacros -> procMacro_attributes_enable
highlighting_strings -> semanticHighlighting_strings_enable
highlightRelated_breakPoints -> semanticHighlighting_breakPoints_enable
highlightRelated_exitPoints -> semanticHighlighting_exitPoints_enable
highlightRelated_yieldPoints -> semanticHighlighting_yieldPoints_enable
highlightRelated_references -> semanticHighlighting_references_enable
hover_documentation -> hover_documentation_enable
hover_linksInHover | hoverActions_linksInHover -> hover_links_enable
hoverActions_debug -> hoverActions_debug_enable
hoverActions_enable -> hoverActions_enable_enable
hoverActions_gotoTypeDef -> hoverActions_gotoTypeDef_enable
hoverActions_implementations -> hoverActions_implementations_enable
hoverActions_references -> hoverActions_references_enable
hoverActions_run -> hoverActions_run_enable
inlayHints_chainingHints -> inlayHints_chainingHints_enable
inlayHints_closureReturnTypeHints -> inlayHints_closureReturnTypeHints_enable
inlayHints_hideNamedConstructorHints -> inlayHints_typeHints_hideNamedConstructorHints
inlayHints_parameterHints -> inlayHints_parameterHints_enable
inlayHints_reborrowHints -> inlayHints_reborrowHints_enable
inlayHints_typeHints -> inlayHints_typeHints_enable
lruCapacity -> lru_capacity
runnables_cargoExtraArgs -> runnables_extraArgs
runnables_overrideCargo -> runnables_command
rustcSource -> rustc_source
rustfmt_enableRangeFormatting -> rustfmt_rangeFormatting_enable
```
These are configs that have been merged or split apart, which have to be manually updated by the user:
```
callInfo_full -> signatureInfo_detail, signatureInfo_documentation_enable
cargo_allFeatures, cargo_features -> cargo_features
checkOnSave_allFeatures, checkOnSave_features -> checkOnSave_features
completion_addCallArgumentSnippets completion_addCallParenthesis -> completion_callable_snippets
```
bors [Tue, 10 May 2022 11:44:06 +0000 (11:44 +0000)]
Auto merge of #12201 - Veykril:inlay-hide, r=Veykril
fix: Add cast expressions to param name inlay hint heuristics
Lukas Wirth [Tue, 10 May 2022 11:43:43 +0000 (13:43 +0200)]
fix: Add cast expressions to param name inlay hint heuristics
bors [Mon, 9 May 2022 16:12:47 +0000 (16:12 +0000)]
Auto merge of #12199 - jonas-schievink:no-invalid-assoc-ty-completions, r=jonas-schievink
fix: Don't show assoc. type binding completions when invalid
Fixes https://github.com/rust-lang/rust-analyzer/issues/12165
Jonas Schievink [Mon, 9 May 2022 16:12:12 +0000 (18:12 +0200)]
Don't show assoc. type binding completions when invalid
bors [Mon, 9 May 2022 15:40:45 +0000 (15:40 +0000)]
Auto merge of #12198 - jonas-schievink:ide-resolve-supertrait-assoc-types, r=jonas-schievink
fix: Resolve assoc. types of supertraits in the IDE layer
Fixes https://github.com/rust-lang/rust-analyzer/issues/12166
Jonas Schievink [Mon, 9 May 2022 15:39:13 +0000 (17:39 +0200)]
Make completion work too
Jonas Schievink [Mon, 9 May 2022 15:30:49 +0000 (17:30 +0200)]
Resolve assoc. types of supertraits in the IDE layer
bors [Mon, 9 May 2022 10:13:08 +0000 (10:13 +0000)]
Auto merge of #12197 - Veykril:insert-use-fix, r=Veykril
fix: Fix import insertion inserting after last comment in a file
Lukas Wirth [Mon, 9 May 2022 09:52:49 +0000 (11:52 +0200)]
fix: Fix import insertion inserting after last comment in a file
bors [Mon, 9 May 2022 08:33:18 +0000 (08:33 +0000)]
Auto merge of #11983 - jhpratt:remove-rustc_deprecated, r=lnicola
Remove handling of `#[rustc_deprecated]`
This should be merged along with rust-lang/rust#95960.
Because the attribute still exists in rustc, I've left the definition here. With that said, any use of it is an error, so I've removed any handling of `#[rustc_deprecated]`.
bors [Sat, 7 May 2022 14:25:12 +0000 (14:25 +0000)]
Auto merge of #12187 - Veykril:completion-rev, r=Veykril
internal: More completion context refactoring
bors [Sat, 7 May 2022 14:16:00 +0000 (14:16 +0000)]
Auto merge of #12188 - Veykril:auto-import, r=Veykril
fix: Allow auto importing starting segments of use items
Lukas Wirth [Sat, 7 May 2022 13:23:25 +0000 (15:23 +0200)]
fix: Allow auto importing starting segments of use items
Lukas Wirth [Sat, 7 May 2022 13:08:33 +0000 (15:08 +0200)]
fix unreachable pub
Lukas Wirth [Sat, 7 May 2022 13:05:43 +0000 (15:05 +0200)]
Merge the different identifier contexts into one enum
Lukas Wirth [Sat, 7 May 2022 12:16:03 +0000 (14:16 +0200)]
Split namelike into the corresponding completion contexts
Lukas Wirth [Sat, 7 May 2022 11:46:43 +0000 (13:46 +0200)]
Introduce NameRefContext
bors [Sat, 7 May 2022 11:00:29 +0000 (11:00 +0000)]
Auto merge of #12186 - Veykril:completion-rev, r=Veykril
minor: Move inferred type completions
Lukas Wirth [Sat, 7 May 2022 10:59:26 +0000 (12:59 +0200)]
minor: Move inferred type completions
bors [Sat, 7 May 2022 10:53:37 +0000 (10:53 +0000)]
Auto merge of #12185 - Veykril:parse-fix, r=Veykril
fix: Remap float parts as integers when parsed as indices
cc https://github.com/rust-lang/rust-analyzer/pull/12149
Lukas Wirth [Sat, 7 May 2022 10:52:15 +0000 (12:52 +0200)]
fix: Remap float parts as integers when parsed as indices
bors [Fri, 6 May 2022 16:39:43 +0000 (16:39 +0000)]
Auto merge of #12178 - jonas-schievink:fix-tt-conv-panic, r=jonas-schievink
fix: Fix panic when a macro passes a float token to another macro
Fixes https://github.com/rust-lang/rust-analyzer/issues/12170 (num-traits no longer causes a panic)
Jonas Schievink [Fri, 6 May 2022 16:29:43 +0000 (18:29 +0200)]
Fix conversion of float literals in `TtTreeSink`
bors [Fri, 6 May 2022 14:12:29 +0000 (14:12 +0000)]
Auto merge of #12177 - jonas-schievink:mbe-output-float-literals, r=jonas-schievink
fix: fix macro expansion with float tokens
Fixes https://github.com/rust-lang/rust-analyzer/issues/12170
The parser tells us to consume up to 3 tokens, but on the MBE side all float literals are a single `tt::Literal`, so make sure to only consume a single MBE leaf.
Jonas Schievink [Fri, 6 May 2022 14:10:54 +0000 (16:10 +0200)]
Skip only the `tt::Literal` when consuming float tokens