2020-07-23 19:39:35 +02:00
|
|
|
error: calling `std::string::String::default()` is more clear than this expression
|
2020-09-01 00:31:53 +09:00
|
|
|
--> $DIR/default_trait_access.rs:11:22
|
2018-08-01 16:30:44 +02:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | let s1: String = Default::default();
|
2018-08-01 16:30:44 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^ help: try: `std::string::String::default()`
|
|
|
|
|
|
2020-09-01 00:31:53 +09:00
|
|
|
note: the lint level is defined here
|
|
|
|
--> $DIR/default_trait_access.rs:4:9
|
|
|
|
|
|
|
|
|
LL | #![deny(clippy::default_trait_access)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2018-06-14 08:57:27 +01:00
|
|
|
|
2020-07-23 19:39:35 +02:00
|
|
|
error: calling `std::string::String::default()` is more clear than this expression
|
2020-09-01 00:31:53 +09:00
|
|
|
--> $DIR/default_trait_access.rs:15:22
|
2018-06-14 08:57:27 +01:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | let s3: String = D2::default();
|
2018-06-14 08:57:27 +01:00
|
|
|
| ^^^^^^^^^^^^^ help: try: `std::string::String::default()`
|
|
|
|
|
2020-07-23 19:39:35 +02:00
|
|
|
error: calling `std::string::String::default()` is more clear than this expression
|
2020-09-01 00:31:53 +09:00
|
|
|
--> $DIR/default_trait_access.rs:17:22
|
2018-06-14 08:57:27 +01:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | let s4: String = std::default::Default::default();
|
2018-06-14 08:57:27 +01:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::string::String::default()`
|
|
|
|
|
2020-07-23 19:39:35 +02:00
|
|
|
error: calling `std::string::String::default()` is more clear than this expression
|
2020-09-01 00:31:53 +09:00
|
|
|
--> $DIR/default_trait_access.rs:21:22
|
2018-06-14 08:57:27 +01:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | let s6: String = default::Default::default();
|
2018-06-14 08:57:27 +01:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::string::String::default()`
|
|
|
|
|
2020-09-01 00:31:53 +09:00
|
|
|
error: calling `GenericDerivedDefault::default()` is more clear than this expression
|
|
|
|
--> $DIR/default_trait_access.rs:31:46
|
2018-06-14 08:57:27 +01:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | let s11: GenericDerivedDefault<String> = Default::default();
|
2020-09-01 00:31:53 +09:00
|
|
|
| ^^^^^^^^^^^^^^^^^^ help: try: `GenericDerivedDefault::default()`
|
2018-06-14 08:57:27 +01:00
|
|
|
|
2020-07-23 19:39:35 +02:00
|
|
|
error: calling `TupleDerivedDefault::default()` is more clear than this expression
|
2020-09-01 00:31:53 +09:00
|
|
|
--> $DIR/default_trait_access.rs:37:36
|
2018-06-17 22:58:08 +01:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | let s14: TupleDerivedDefault = Default::default();
|
2018-06-17 22:58:08 +01:00
|
|
|
| ^^^^^^^^^^^^^^^^^^ help: try: `TupleDerivedDefault::default()`
|
|
|
|
|
2020-07-23 19:39:35 +02:00
|
|
|
error: calling `ArrayDerivedDefault::default()` is more clear than this expression
|
2020-09-01 00:31:53 +09:00
|
|
|
--> $DIR/default_trait_access.rs:39:36
|
2018-06-17 22:58:08 +01:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | let s15: ArrayDerivedDefault = Default::default();
|
2018-06-17 22:58:08 +01:00
|
|
|
| ^^^^^^^^^^^^^^^^^^ help: try: `ArrayDerivedDefault::default()`
|
|
|
|
|
2020-07-23 19:39:35 +02:00
|
|
|
error: calling `TupleStructDerivedDefault::default()` is more clear than this expression
|
2020-09-01 00:31:53 +09:00
|
|
|
--> $DIR/default_trait_access.rs:43:42
|
2018-06-17 22:58:08 +01:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | let s17: TupleStructDerivedDefault = Default::default();
|
2018-06-17 22:58:08 +01:00
|
|
|
| ^^^^^^^^^^^^^^^^^^ help: try: `TupleStructDerivedDefault::default()`
|
|
|
|
|
|
|
|
error: aborting due to 8 previous errors
|
2018-06-14 08:57:27 +01:00
|
|
|
|