Skip to content

Commit 6b52ae1

Browse files
committed
ci/style.rs: Catch derives of Copy and Clone
Let's prevent this from happening again.
1 parent b1144cc commit 6b52ae1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ci/style.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,9 @@ fn check_style(file: &str, path: &Path, err: &mut Errors) {
134134
instead of #[cfg]");
135135
}
136136
}
137+
if line.contains("#[derive(") && (line.contains("Copy") || line.contains("Clone")) {
138+
err.error(path, i, "impl ::Copy and ::Clone manually");
139+
}
137140

138141
let line = line.trim_start();
139142
let is_pub = line.starts_with("pub ");

0 commit comments

Comments
 (0)