]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/default_trait_access.stderr
Fix `#[expect]` for `clippy::ptr_arg`
[rust.git] / tests / ui / default_trait_access.stderr
index e3c263e773291328c94085284913c9880d64a05a..df8a5b94ddcf3c81468744a3263fdd0b316964c5 100644 (file)
@@ -1,51 +1,55 @@
-error: Calling std::string::String::default() is more clear than this expression
-  --> $DIR/default_trait_access.rs:10:22
+error: calling `std::string::String::default()` is more clear than this expression
+  --> $DIR/default_trait_access.rs:11:22
    |
-10 |     let s1: String = Default::default();
+LL |     let s1: String = Default::default();
    |                      ^^^^^^^^^^^^^^^^^^ help: try: `std::string::String::default()`
    |
-   = note: `-D clippy::default-trait-access` implied by `-D warnings`
+note: the lint level is defined here
+  --> $DIR/default_trait_access.rs:4:9
+   |
+LL | #![deny(clippy::default_trait_access)]
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: Calling std::string::String::default() is more clear than this expression
-  --> $DIR/default_trait_access.rs:14:22
+error: calling `std::string::String::default()` is more clear than this expression
+  --> $DIR/default_trait_access.rs:15:22
    |
-14 |     let s3: String = D2::default();
+LL |     let s3: String = D2::default();
    |                      ^^^^^^^^^^^^^ help: try: `std::string::String::default()`
 
-error: Calling std::string::String::default() is more clear than this expression
-  --> $DIR/default_trait_access.rs:16:22
+error: calling `std::string::String::default()` is more clear than this expression
+  --> $DIR/default_trait_access.rs:17:22
    |
-16 |     let s4: String = std::default::Default::default();
+LL |     let s4: String = std::default::Default::default();
    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::string::String::default()`
 
-error: Calling std::string::String::default() is more clear than this expression
-  --> $DIR/default_trait_access.rs:20:22
+error: calling `std::string::String::default()` is more clear than this expression
+  --> $DIR/default_trait_access.rs:21:22
    |
-20 |     let s6: String = default::Default::default();
+LL |     let s6: String = default::Default::default();
    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::string::String::default()`
 
-error: Calling GenericDerivedDefault<std::string::String>::default() is more clear than this expression
-  --> $DIR/default_trait_access.rs:30:46
+error: calling `GenericDerivedDefault::default()` is more clear than this expression
+  --> $DIR/default_trait_access.rs:31:46
    |
-30 |     let s11: GenericDerivedDefault<String> = Default::default();
-   |                                              ^^^^^^^^^^^^^^^^^^ help: try: `GenericDerivedDefault<std::string::String>::default()`
+LL |     let s11: GenericDerivedDefault<String> = Default::default();
+   |                                              ^^^^^^^^^^^^^^^^^^ help: try: `GenericDerivedDefault::default()`
 
-error: Calling TupleDerivedDefault::default() is more clear than this expression
-  --> $DIR/default_trait_access.rs:36:36
+error: calling `TupleDerivedDefault::default()` is more clear than this expression
+  --> $DIR/default_trait_access.rs:37:36
    |
-36 |     let s14: TupleDerivedDefault = Default::default();
+LL |     let s14: TupleDerivedDefault = Default::default();
    |                                    ^^^^^^^^^^^^^^^^^^ help: try: `TupleDerivedDefault::default()`
 
-error: Calling ArrayDerivedDefault::default() is more clear than this expression
-  --> $DIR/default_trait_access.rs:38:36
+error: calling `ArrayDerivedDefault::default()` is more clear than this expression
+  --> $DIR/default_trait_access.rs:39:36
    |
-38 |     let s15: ArrayDerivedDefault = Default::default();
+LL |     let s15: ArrayDerivedDefault = Default::default();
    |                                    ^^^^^^^^^^^^^^^^^^ help: try: `ArrayDerivedDefault::default()`
 
-error: Calling TupleStructDerivedDefault::default() is more clear than this expression
-  --> $DIR/default_trait_access.rs:42:42
+error: calling `TupleStructDerivedDefault::default()` is more clear than this expression
+  --> $DIR/default_trait_access.rs:43:42
    |
-42 |     let s17: TupleStructDerivedDefault = Default::default();
+LL |     let s17: TupleStructDerivedDefault = Default::default();
    |                                          ^^^^^^^^^^^^^^^^^^ help: try: `TupleStructDerivedDefault::default()`
 
 error: aborting due to 8 previous errors