You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/lib.rs
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -874,6 +874,14 @@ fn run_rustfix(
874
874
if suggestions.is_empty(){
875
875
None
876
876
}else{
877
+
let path_str = path.display().to_string();
878
+
for sugg in&suggestions {
879
+
for snip in&sugg.snippets{
880
+
if snip.file_name != path_str {
881
+
returnSome(Err(anyhow::anyhow!("cannot apply suggestions for `{}` since main file is `{path_str}`. Please use `//@no-rustfix` to disable rustfix", snip.file_name)));
0 commit comments