rust/tests/ui/default_trait_access.stderr
2018-12-10 08:22:07 +01:00

53 lines
2.4 KiB
Plaintext

error: Calling std::string::String::default() is more clear than this expression
--> $DIR/default_trait_access.rs:17:22
|
17 | let s1: String = Default::default();
| ^^^^^^^^^^^^^^^^^^ help: try: `std::string::String::default()`
|
= note: `-D clippy::default-trait-access` implied by `-D warnings`
error: Calling std::string::String::default() is more clear than this expression
--> $DIR/default_trait_access.rs:21:22
|
21 | 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:23:22
|
23 | 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:27:22
|
27 | 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:37:46
|
37 | let s11: GenericDerivedDefault<String> = Default::default();
| ^^^^^^^^^^^^^^^^^^ help: try: `GenericDerivedDefault<std::string::String>::default()`
error: Calling TupleDerivedDefault::default() is more clear than this expression
--> $DIR/default_trait_access.rs:43:36
|
43 | let s14: TupleDerivedDefault = Default::default();
| ^^^^^^^^^^^^^^^^^^ help: try: `TupleDerivedDefault::default()`
error: Calling ArrayDerivedDefault::default() is more clear than this expression
--> $DIR/default_trait_access.rs:45:36
|
45 | let s15: ArrayDerivedDefault = Default::default();
| ^^^^^^^^^^^^^^^^^^ help: try: `ArrayDerivedDefault::default()`
error: Calling TupleStructDerivedDefault::default() is more clear than this expression
--> $DIR/default_trait_access.rs:49:42
|
49 | let s17: TupleStructDerivedDefault = Default::default();
| ^^^^^^^^^^^^^^^^^^ help: try: `TupleStructDerivedDefault::default()`
error: aborting due to 8 previous errors