path-buf-push-overwrite: make lint adhere to lint message convention
This commit is contained in:
parent
81f77a411e
commit
9178363574
@ -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,
|
||||
|
@ -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");
|
||||
|
Loading…
x
Reference in New Issue
Block a user