about summary refs log tree commit diff
path: root/tests/ui/new_without_default.fixed
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/new_without_default.fixed')
-rw-r--r--tests/ui/new_without_default.fixed8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/ui/new_without_default.fixed b/tests/ui/new_without_default.fixed
index 56359a4cbc3..1c7ba1a48c9 100644
--- a/tests/ui/new_without_default.fixed
+++ b/tests/ui/new_without_default.fixed
@@ -16,6 +16,8 @@ impl Default for Foo {
 
 impl Foo {
     pub fn new() -> Foo {
+        //~^ ERROR: you should consider adding a `Default` implementation for `Foo`
+        //~| NOTE: `-D clippy::new-without-default` implied by `-D warnings`
         Foo
     }
 }
@@ -30,6 +32,7 @@ impl Default for Bar {
 
 impl Bar {
     pub fn new() -> Self {
+        //~^ ERROR: you should consider adding a `Default` implementation for `Bar`
         Bar
     }
 }
@@ -100,6 +103,7 @@ impl<'c> Default for LtKo<'c> {
 
 impl<'c> LtKo<'c> {
     pub fn new() -> LtKo<'c> {
+        //~^ ERROR: you should consider adding a `Default` implementation for `LtKo<'c>`
         unimplemented!()
     }
 }
@@ -198,6 +202,7 @@ impl Default for NewNotEqualToDerive {
 impl NewNotEqualToDerive {
     // This `new` implementation is not equal to a derived `Default`, so do not suggest deriving.
     pub fn new() -> Self {
+        //~^ ERROR: you should consider adding a `Default` implementation for `NewNotEqualToDe
         NewNotEqualToDerive { foo: 1 }
     }
 }
@@ -212,6 +217,7 @@ impl<T> Default for FooGenerics<T> {
 
 impl<T> FooGenerics<T> {
     pub fn new() -> Self {
+        //~^ ERROR: you should consider adding a `Default` implementation for `FooGenerics<T>`
         Self(Default::default())
     }
 }
@@ -225,6 +231,7 @@ impl<T: Copy> Default for BarGenerics<T> {
 
 impl<T: Copy> BarGenerics<T> {
     pub fn new() -> Self {
+        //~^ ERROR: you should consider adding a `Default` implementation for `BarGenerics<T>`
         Self(Default::default())
     }
 }
@@ -242,6 +249,7 @@ pub mod issue7220 {
 
     impl<T> Foo<T> {
         pub fn new() -> Self {
+            //~^ ERROR: you should consider adding a `Default` implementation for `Foo<T>`
             todo!()
         }
     }