Skip to content

Commit 94f3317

Browse files
committed
Fix nits
1 parent 6c0f231 commit 94f3317

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

clippy_lints/src/drop_bounds.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ declare_clippy_lint! {
2525
"Bounds of the form `T: Drop` are useless"
2626
}
2727

28-
const DROP_BOUNDS_SUMMARY: &str = "Bounds of the form `T: Drop` are usless. \
28+
const DROP_BOUNDS_SUMMARY: &str = "Bounds of the form `T: Drop` are useless. \
2929
Use `std::mem::needs_drop` to detect if a type has drop glue.";
3030

3131
pub struct Pass;
@@ -49,11 +49,11 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
4949
if match_def_path(cx.tcx, def_id, &paths::DROP_TRAIT);
5050
then {
5151
span_lint(
52-
cx,
53-
DROP_BOUNDS,
54-
t.span,
55-
&DROP_BOUNDS_SUMMARY.to_string()
56-
);
52+
cx,
53+
DROP_BOUNDS,
54+
t.span,
55+
&DROP_BOUNDS_SUMMARY.to_string()
56+
);
5757
}
5858
}
5959
}

tests/compile-test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,11 @@ fn run_ui_toml() {
116116

117117
let res = run_ui_toml_tests(&config, tests);
118118
match res {
119-
Ok(true) => {},
119+
Ok(true) => {}
120120
Ok(false) => panic!("Some tests failed"),
121121
Err(e) => {
122122
println!("I/O failure during tests: {:?}", e);
123-
},
123+
}
124124
}
125125
}
126126

tests/missing-test-files.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ fn explore_directory(dir: &Path) -> Vec<String> {
4646
if file_stem != current_file {
4747
missing_files.push(path.to_str().unwrap().to_string());
4848
}
49-
},
49+
}
5050
_ => continue,
5151
};
5252
}

tests/ui/drop_bounds.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: Bounds of the form `T: Drop` are usless. Use `std::mem::needs_drop` to detect if a type has drop glue.
1+
error: Bounds of the form `T: Drop` are useless. Use `std::mem::needs_drop` to detect if a type has drop glue.
22
--> $DIR/drop_bounds.rs:1:11
33
|
44
LL | fn foo<T: Drop>() {}

0 commit comments

Comments
 (0)