rustfmt 的未知配置选项 `group_imports`

Unknown configuration option `group_imports` for rustfmt

我有一个 rustfmt.toml 文件,其中包含 group_imports = "StdExternalCrate" 行,根据 the documentation 这应该是一个有效选项。但是,我收到以下警告:

Warning: Unknown configuration option `group_imports`

测试文件上的

运行 rustfmt 似乎也没有按照指定的方式对导入进行分组。我今天用 rustup update 更新了所有内容,目前的版本是 "rustfmt 1.4.27-nightly"seems to be the latest stable minor version.

我还确保根据文档使用 unstable_features = true 启用不稳定的功能。为什么我不能使用这个选项?是因为我每晚都在使用吗?在这种情况下,我将如何启用此选项?

完整 rustfmt.toml 文件供参考:

edition = "2018"
unstable_features = true

format_code_in_doc_comments = true

brace_style = "AlwaysNextLine"
control_brace_style = "AlwaysNextLine"

fn_single_line = true
where_single_line = true

blank_lines_upper_bound = 2
inline_attribute_width = 32

reorder_impl_items = true
group_imports = "StdExternalCrate"

enum_discrim_align_threshold = 16
struct_field_align_threshold = 16

该选项在从板条箱中提取的版本中根本不可用。该文档指向后来(当时)未发布的代码。根据文档,该选项在版本 2.0.0 中可用。