Skip to content

Commit 2b8d8fb

Browse files
committed
more fixes
1 parent 0b3af48 commit 2b8d8fb

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

rustfmt.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
newline_style = "Unix"
2-
edition = "2018"
2+
edition = "2024"

xtask/codegen/src/generate_configuration.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,12 +173,12 @@ fn generate_for_groups(
173173
let use_rule_configuration = if kind == RuleCategory::Action {
174174
quote! {
175175
use crate::analyser::{RuleAssistConfiguration, RuleAssistPlainConfiguration};
176-
use pglt_analyse::{options::RuleOptions, RuleFilter};
176+
use pglt_analyse::{RuleFilter, options::RuleOptions};
177177
}
178178
} else {
179179
quote! {
180180
use crate::analyser::{RuleConfiguration, RulePlainConfiguration};
181-
use pglt_analyse::{options::RuleOptions, RuleFilter};
181+
use pglt_analyse::{RuleFilter, options::RuleOptions};
182182
}
183183
};
184184

xtask/src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pub fn project_root() -> PathBuf {
3030

3131
pub fn run_rustfmt(mode: Mode) -> Result<()> {
3232
let _dir = pushd(project_root());
33-
let _e = pushenv("RUSTUP_TOOLCHAIN", "stable");
33+
let _e = pushenv("RUSTUP_TOOLCHAIN", "nightly");
3434
ensure_rustfmt()?;
3535
match mode {
3636
Mode::Overwrite => run!("cargo fmt"),
@@ -55,7 +55,7 @@ pub fn prepend_generated_preamble(content: impl Display) -> String {
5555
}
5656

5757
pub fn reformat_without_preamble(text: impl Display) -> Result<String> {
58-
let _e = pushenv("RUSTUP_TOOLCHAIN", "stable");
58+
let _e = pushenv("RUSTUP_TOOLCHAIN", "nightly");
5959
ensure_rustfmt()?;
6060
let output = run!(
6161
"rustfmt --config newline_style=Unix";
@@ -67,10 +67,10 @@ pub fn reformat_without_preamble(text: impl Display) -> Result<String> {
6767

6868
pub fn ensure_rustfmt() -> Result<()> {
6969
let out = run!("rustfmt --version")?;
70-
if !out.contains("stable") {
70+
if !out.contains("nightly") {
7171
bail!(
72-
"Failed to run rustfmt from toolchain 'stable'. \
73-
Please run `rustup component add rustfmt --toolchain stable` to install it.",
72+
"Failed to run rustfmt from toolchain 'nightly'. \
73+
Please run `rustup component add rustfmt --toolchain nightly` to install it.",
7474
)
7575
}
7676
Ok(())

0 commit comments

Comments
 (0)