path-buf-push-overwrite: make lint adhere to lint message convention

This commit is contained in:
Matthias Krüger 2020-07-24 00:16:28 +02:00
parent 81f77a411e
commit 9178363574
2 changed files with 2 additions and 2 deletions

View file

@ -60,7 +60,7 @@ impl<'tcx> LateLintPass<'tcx> for PathBufPushOverwrite {
cx,
PATH_BUF_PUSH_OVERWRITE,
lit.span,
"Calling `push` with '/' or '\\' (file system root) will overwrite the previous path definition",
"calling `push` with '/' or '\\' (file system root) will overwrite the previous path definition",
"try",
format!("\"{}\"", pushed_path_lit.trim_start_matches(|c| c == '/' || c == '\\')),
Applicability::MachineApplicable,

View file

@ -1,4 +1,4 @@
error: Calling `push` with '/' or '/' (file system root) will overwrite the previous path definition
error: calling `push` with '/' or '/' (file system root) will overwrite the previous path definition
--> $DIR/path_buf_push_overwrite.rs:7:12
|
LL | x.push("/bar");