From 99af6332bfc73414dbe11f73841c10bcac947a24 Mon Sep 17 00:00:00 2001 From: Samuel Moelius Date: Sat, 21 Oct 2023 07:12:26 -0400 Subject: [PATCH] Reorder `general.rs` to match `WATCHED_INHERENTS` --- .../ui/general.fixed | 2 +- .../unnecessary_conversion_for_trait/ui/general.rs | 2 +- .../ui/general.stderr | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/supplementary/unnecessary_conversion_for_trait/ui/general.fixed b/examples/supplementary/unnecessary_conversion_for_trait/ui/general.fixed index 7604c0cac..659e507e4 100644 --- a/examples/supplementary/unnecessary_conversion_for_trait/ui/general.fixed +++ b/examples/supplementary/unnecessary_conversion_for_trait/ui/general.fixed @@ -76,8 +76,8 @@ fn main() { let _ = is_empty_os(osstring.clone()); let _ = os_string_or_bytes(osstring.clone()); - let _ = std::fs::write(path, ""); let _ = std::fs::write(PathBuf::from("x"), ""); + let _ = std::fs::write(path, ""); let _ = std::fs::write(PathBuf::from("x"), ""); let _ = Command::new("ls").args(path); let _ = std::fs::write("x", ""); diff --git a/examples/supplementary/unnecessary_conversion_for_trait/ui/general.rs b/examples/supplementary/unnecessary_conversion_for_trait/ui/general.rs index 701c1d5c2..b7aa1f7cf 100644 --- a/examples/supplementary/unnecessary_conversion_for_trait/ui/general.rs +++ b/examples/supplementary/unnecessary_conversion_for_trait/ui/general.rs @@ -76,8 +76,8 @@ fn main() { let _ = is_empty_os(osstring.clone().into_boxed_os_str()); let _ = os_string_or_bytes(osstring.clone().into_encoded_bytes()); - let _ = std::fs::write(path.as_os_str(), ""); let _ = std::fs::write(PathBuf::from("x").as_mut_os_str(), ""); + let _ = std::fs::write(path.as_os_str(), ""); let _ = std::fs::write(PathBuf::from("x").into_boxed_path().into_path_buf(), ""); let _ = Command::new("ls").args(path.iter()); let _ = std::fs::write(Path::new("x"), ""); diff --git a/examples/supplementary/unnecessary_conversion_for_trait/ui/general.stderr b/examples/supplementary/unnecessary_conversion_for_trait/ui/general.stderr index 76970e100..a73092240 100644 --- a/examples/supplementary/unnecessary_conversion_for_trait/ui/general.stderr +++ b/examples/supplementary/unnecessary_conversion_for_trait/ui/general.stderr @@ -194,16 +194,16 @@ LL | let _ = os_string_or_bytes(osstring.clone().into_encoded_bytes()); | ^^^^^^^^^^^^^^^^^^^^^ help: remove this error: the receiver implements the required traits - --> $DIR/general.rs:79:32 + --> $DIR/general.rs:79:46 | -LL | let _ = std::fs::write(path.as_os_str(), ""); - | ^^^^^^^^^^^^ help: remove this +LL | let _ = std::fs::write(PathBuf::from("x").as_mut_os_str(), ""); + | ^^^^^^^^^^^^^^^^ help: remove this error: the receiver implements the required traits - --> $DIR/general.rs:80:46 + --> $DIR/general.rs:80:32 | -LL | let _ = std::fs::write(PathBuf::from("x").as_mut_os_str(), ""); - | ^^^^^^^^^^^^^^^^ help: remove this +LL | let _ = std::fs::write(path.as_os_str(), ""); + | ^^^^^^^^^^^^ help: remove this error: the receiver implements the required traits --> $DIR/general.rs:81:46