Skip to content

Commit

Permalink
Use .cargo/config.toml instead of .cargo/config (#106)
Browse files Browse the repository at this point in the history
```
warning: `/macrotest/test-project/target/tests/test-project/macrotest000/.cargo/config` is deprecated in favor of `config.toml`
note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`
```
  • Loading branch information
taiki-e authored Mar 30, 2024
1 parent f41f71e commit 33a7ab6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/expand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ fn prepare(tests: &[ExpandedTest]) -> Result<Project> {
}

fs::create_dir_all(path!(project.dir / ".cargo"))?;
fs::write(path!(project.dir / ".cargo" / "config"), config_toml)?;
fs::write(path!(project.dir / ".cargo" / "config.toml"), config_toml)?;
fs::write(path!(project.dir / "Cargo.toml"), manifest_toml)?;
fs::write(path!(project.dir / "main.rs"), b"fn main() {}\n")?;

Expand Down
4 changes: 2 additions & 2 deletions src/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ fn test_path_macro() {
dir: PathBuf::from("../target/tests"),
};

let cargo_dir = path!(project.dir / ".cargo" / "config");
assert_eq!(cargo_dir, Path::new("../target/tests/.cargo/config"));
let cargo_dir = path!(project.dir / ".cargo" / "config.toml");
assert_eq!(cargo_dir, Path::new("../target/tests/.cargo/config.toml"));
}

0 comments on commit 33a7ab6

Please sign in to comment.