File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -97,6 +97,8 @@ options = {
9797options = {
9898 -- The default edition of Rust to use when no Cargo.toml file is found
9999 default_edition = " 2021" ,
100+ -- Set to true to use the nightly version of rustfmt
101+ nightly = false ,
100102}
101103```
102104
Original file line number Diff line number Diff line change @@ -10,12 +10,18 @@ return {
1010 options = {
1111 -- The default edition of Rust to use when no Cargo.toml file is found
1212 default_edition = " 2021" ,
13+ -- Set to true to use the nightly version of rustfmt
14+ nightly = false ,
1315 },
1416 args = function (self , ctx )
1517 local args = { " --emit=stdout" }
1618 local edition = util .parse_rust_edition (ctx .dirname ) or self .options .default_edition
1719 table.insert (args , " --edition=" .. edition )
1820
21+ if self .options .nightly then
22+ -- "+nightly" must be the first argument
23+ table.insert (args , 1 , " +nightly" )
24+ end
1925 return args
2026 end ,
2127 cwd = util .root_file ({
You can’t perform that action at this time.
0 commit comments