Skip to content
Snippets Groups Projects
Commit 6b52ae15 authored by Josh Triplett's avatar Josh Triplett
Browse files

ci/style.rs: Catch derives of Copy and Clone

Let's prevent this from happening again.
parent b1144cc9
No related branches found
No related tags found
Loading
......@@ -134,6 +134,9 @@ fn check_style(file: &str, path: &Path, err: &mut Errors) {
instead of #[cfg]");
}
}
if line.contains("#[derive(") && (line.contains("Copy") || line.contains("Clone")) {
err.error(path, i, "impl ::Copy and ::Clone manually");
}
let line = line.trim_start();
let is_pub = line.starts_with("pub ");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment