Consistent way to ensure rustfmt uses 2018 edition

オープン
#439 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
rust, vim

調査の方向性

Start by reading the :RustFmt implementation and how it builds rustfmt arguments from g:rustfmt_options and rustfmt.toml. Reproduce both reported cases with a Rust 2018 async function: one duplicates --edition, while the other defaults to 2015. Done means formatting succeeds in both cases without requiring users to coordinate the two edition settings.

索引モデルが issue の本文から書いたものです。

説明

rust.vim version

vim-plug, current rust.vim commit 87c745d8d506fc1eecc1d81df15d5bde1658a2fc

Steps to reproduce:

Option (A): Specify --edition 2018 in g:rustfmt_options in .vimrc (or equivalent)
Option (B): Do not specify --edition 2018 in g:rustfmt_options in .vimrc (or equivalent)

  1. Create a new rust project, 2018 edition.
  2. Use an async fn (or other 2018-specific syntax).
  3. Run :RustFmt
  4. Add a rustfmt.toml file which does not specify edition
  5. Run :RustFmt

Expected behavior:

At least one of option (A) or (B) works (correctly formats the file at steps 3 and 5)

Actual behavior

Option (A) fails at step 3, with "Option 'edition' given more than once"
Option (B) fails at step 5, with "async fn is not permitted in the 2015 edition"

主要言語
Vim Script
スター
4.2k
フォーク
323
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

rust-lang/rust.vim のほかの issue

rust-lang/rust.vim の issue をすべて見る

似ている issue

DevTools の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。