Consistent way to ensure rustfmt uses 2018 edition
还没有人认领这个 Issue。
评估
- 难度
- 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)
- Create a new rust project, 2018 edition.
- Use an async fn (or other 2018-specific syntax).
- Run
:RustFmt - Add a
rustfmt.tomlfile which does not specifyedition - 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,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
rust-lang/rust.vim 的其他 Issue
-
难度 1/5 1-3 小时 新手友好度 76/100
-
It's Dead, Jim!未关闭
难度 5/5 一周以上 新手友好度 15/100
-
Remove hard coded edition fallback可能已有人在做 @alerque 于 230 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 35/100
-
难度 1/5 1 小时以内 新手友好度 55/100
-
难度 3/5 1-2 天 新手友好度 45/100
查看 rust-lang/rust.vim 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 84/100
mglaman/phpstan-drupal#1078 ·
维护者通常 1 天内回复
-
[Bug]: Python mod.Box[T] annotation gets a false generic_arg edge that replaces the parameter_type one ('is' on tree-sitter nodes)可能已有人在做 @rohit-jsfreaky 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 88/100
Graphify-Labs/graphify#5110 · 1 条评论 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
documentation good first issue
难度 2/5 1-3 小时 新手友好度 76/100
voyageurworks/launch-guard-pack#29 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 67/100
bigbio/sdrf-pipelines#372 · 1 条评论 ·
维护者通常 1 天内回复