diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b3f20aa..11ff0bc4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Changed + +- Rustc: Do not need a main function, and make it can use 2024 edition by unstable-options. + ## [4.6.0] - 2024-02-07 ### Added diff --git a/lua/rustaceanvim/commands/rustc_unpretty.lua b/lua/rustaceanvim/commands/rustc_unpretty.lua index 9c797dea..f81d516c 100644 --- a/lua/rustaceanvim/commands/rustc_unpretty.lua +++ b/lua/rustaceanvim/commands/rustc_unpretty.lua @@ -129,22 +129,18 @@ function M.rustc_unpretty(level) end text = table.concat(b, '\n') - compat.system( - { - rustc, - '--crate-type', - 'lib', - '--edition', - config.tools.rustc.edition, - '-Z', - 'unstable-options', - '-Z', - 'unpretty=' .. level, - '-', - }, - { stdin = text }, - vim.schedule_wrap(handler) - ) + compat.system({ + rustc, + '--crate-type', + 'lib', + '--edition', + config.tools.rustc.edition, + '-Z', + 'unstable-options', + '-Z', + 'unpretty=' .. level, + '-', + }, { stdin = text }, vim.schedule_wrap(handler)) end return M