Skip to content

Commit 45abd7d

Browse files
authored
Merge pull request #2107 from alibektas/ratoml_for_rustlings
Add rust-analyzer.toml file
2 parents 2b7caf6 + 88e10a9 commit 45abd7d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/init.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ pub fn init() -> Result<()> {
130130
fs::write("Cargo.toml", updated_cargo_toml)
131131
.context("Failed to create the file `rustlings/Cargo.toml`")?;
132132

133+
fs::write("rust-analyzer.toml", RATOML)
134+
.context("Failed to create the file `rustlings/rust-analyzer.toml`")?;
135+
133136
fs::write(".gitignore", GITIGNORE)
134137
.context("Failed to create the file `rustlings/.gitignore`")?;
135138

@@ -169,6 +172,11 @@ const INIT_SOLUTION_FILE: &[u8] = b"fn main() {
169172
}
170173
";
171174

175+
const RATOML: &[u8] = br#"# rust-analyzer configuration file
176+
# DO NOT edit what is already defined.
177+
# You may add new configurations as needed.
178+
check.extraArgs = ["--profile", "test"]"#;
179+
172180
const GITIGNORE: &[u8] = b"Cargo.lock
173181
target/
174182
.vscode/

0 commit comments

Comments
 (0)