We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
}
#[tokio::main]
rust-analyzer version: 2024-09-02
rustc version: rustc 1.80.1 (3f5fd8dd4 2024-08-06)
editor or extension: Neovim + nvim-lspconfig. Here's my full (minimal) config:
local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim' if not vim.loop.fs_stat(lazypath) then vim.fn.system({ 'git', 'clone', '--filter=blob:none', 'https://github.com/folke/lazy.nvim.git', '--branch=stable', -- latest stable release lazypath, }) end vim.opt.rtp:prepend(lazypath) -- install plugins require('lazy').setup({ "folke/tokyonight.nvim", { 'neovim/nvim-lspconfig', dependencies = { { 'williamboman/mason.nvim', config = true }, 'williamboman/mason-lspconfig.nvim', 'WhoIsSethDaniel/mason-tool-installer.nvim', }, config = function() require('mason').setup() local servers = {} require('mason-tool-installer').setup { ensure_installed = { 'rust-analyzer' }, } require('mason-lspconfig').setup { handlers = { function(server_name) local server = servers[server_name] or {} require('lspconfig')[server_name].setup(server) end, }, } end, }, })
relevant settings: I need to have tokio installed for the bug to appear
repository link (if public, optional): ?
code snippet to reproduce:
#[tokio::main] fn main() { match true {} }
After executing the code action "Fill match arms" on match true:
match true
#[tokio::main] async fn main() { match true { true => todo!(), false => todo!(), }} // <-- notice the extra `}` }
If I remove #[tokio::main] I no longer have this issue.
Here's my Cargo.toml:
Cargo.toml
[package] name = "rust-test" version = "0.1.0" edition = "2021" [dependencies] tokio = { version = "1.39.3", features = ["full"] }
The text was updated successfully, but these errors were encountered:
Fix bug of "fill match arm" action in tokio::main macro
9451d64
rust-lang#18027
6fa3b3f
rust-lang/rust-analyzer#18027
Successfully merging a pull request may close this issue.
rust-analyzer version: 2024-09-02
rustc version: rustc 1.80.1 (3f5fd8dd4 2024-08-06)
editor or extension: Neovim + nvim-lspconfig. Here's my full (minimal) config:
Click to expand
relevant settings: I need to have tokio installed for the bug to appear
repository link (if public, optional): ?
code snippet to reproduce:
After executing the code action "Fill match arms" on
match true
:If I remove
#[tokio::main]
I no longer have this issue.Here's my
Cargo.toml
:The text was updated successfully, but these errors were encountered: