Skip to content

Commit baeed42

Browse files
committed
add rustfmt settings file
1 parent 55aebf6 commit baeed42

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

examples/rustc-driver-example.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use std::path::Path;
2020
use std::sync::Arc;
2121

2222
use rustc_ast_pretty::pprust::item_to_string;
23-
use rustc_driver::{run_compiler, Compilation};
23+
use rustc_driver::{Compilation, run_compiler};
2424
use rustc_interface::interface::{Compiler, Config};
2525
use rustc_middle::ty::TyCtxt;
2626

examples/rustc-driver-interacting-with-the-ast.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use std::path::Path;
2020
use std::sync::Arc;
2121

2222
use rustc_ast_pretty::pprust::item_to_string;
23-
use rustc_driver::{run_compiler, Compilation};
23+
use rustc_driver::{Compilation, run_compiler};
2424
use rustc_interface::interface::{Compiler, Config};
2525
use rustc_middle::ty::TyCtxt;
2626

rustfmt.toml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# matches that of rust-lang/rust
2+
style_edition = "2024"
3+
use_small_heuristics = "Max"
4+
merge_derives = false
5+
group_imports = "StdExternalCrate"
6+
imports_granularity = "Module"
7+
use_field_init_shorthand = true

0 commit comments

Comments
 (0)