diff --git a/c2rust-transpile/tests/snapshots.rs b/c2rust-transpile/tests/snapshots.rs index 9f744f8173..45c58d7f7d 100644 --- a/c2rust-transpile/tests/snapshots.rs +++ b/c2rust-transpile/tests/snapshots.rs @@ -88,7 +88,12 @@ fn transpile(platform: Option<&str>, c_path: &Path) { } }; - let status = Command::new("rustfmt").arg(&rs_path).status(); + let edition = "2021"; + + let status = Command::new("rustfmt") + .args(["--edition", edition]) + .arg(&rs_path) + .status(); assert!(status.unwrap().success()); let rs = fs::read_to_string(&rs_path).unwrap(); @@ -119,7 +124,7 @@ fn transpile(platform: Option<&str>, c_path: &Path) { "--crate-type", "lib", "--edition", - "2021", + edition, "--crate-name", crate_name, "-o",