From ed713d67d69dc24a63ac6095221f2aa377965cf9 Mon Sep 17 00:00:00 2001 From: Luis de Bethencourt Date: Thu, 11 May 2017 10:41:44 +0100 Subject: [PATCH] clean tests/ui/cmp_owned.rs Cleaning the empty lines for clarity. --- tests/ui/cmp_owned.rs | 2 -- tests/ui/cmp_owned.stderr | 12 ++++++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/tests/ui/cmp_owned.rs b/tests/ui/cmp_owned.rs index 30cd502a1057..12dcc8262c28 100644 --- a/tests/ui/cmp_owned.rs +++ b/tests/ui/cmp_owned.rs @@ -7,9 +7,7 @@ fn main() { fn with_to_string(x : &str) { x != "foo".to_string(); - "foo".to_string() != x; - } let x = "oh"; diff --git a/tests/ui/cmp_owned.stderr b/tests/ui/cmp_owned.stderr index 231e2752c813..a476110be618 100644 --- a/tests/ui/cmp_owned.stderr +++ b/tests/ui/cmp_owned.stderr @@ -11,21 +11,21 @@ note: lint level defined here | ^^^^^^^^^ error: this creates an owned instance just for comparison. Consider using `"foo" != x` to compare without allocation - --> $DIR/cmp_owned.rs:11:9 + --> $DIR/cmp_owned.rs:10:9 | -11 | "foo".to_string() != x; +10 | "foo".to_string() != x; | ^^^^^^^^^^^^^^^^^ error: this creates an owned instance just for comparison. Consider using `x != "foo"` to compare without allocation - --> $DIR/cmp_owned.rs:19:10 + --> $DIR/cmp_owned.rs:17:10 | -19 | x != "foo".to_owned(); +17 | x != "foo".to_owned(); | ^^^^^^^^^^^^^^^^ error: this creates an owned instance just for comparison. Consider using `x != "foo"` to compare without allocation - --> $DIR/cmp_owned.rs:24:10 + --> $DIR/cmp_owned.rs:22:10 | -24 | x != String::from("foo"); +22 | x != String::from("foo"); | ^^^^^^^^^^^^^^^^^^^ error: aborting due to 4 previous errors