2023-01-12 12:48:13 -06:00
|
|
|
error: calling `String::default()` is more clear than this expression
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/default_trait_access.rs:13:22
|
2018-08-01 09:30:44 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | let s1: String = Default::default();
|
2023-01-12 12:48:13 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^ help: try: `String::default()`
|
2018-08-01 09:30:44 -05:00
|
|
|
|
|
2020-09-10 10:47:07 -05:00
|
|
|
note: the lint level is defined here
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/default_trait_access.rs:2:9
|
2020-09-10 10:47:07 -05:00
|
|
|
|
|
|
|
|
LL | #![deny(clippy::default_trait_access)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2018-06-14 02:57:27 -05:00
|
|
|
|
2023-01-12 12:48:13 -06:00
|
|
|
error: calling `String::default()` is more clear than this expression
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/default_trait_access.rs:17:22
|
2018-06-14 02:57:27 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | let s3: String = D2::default();
|
2023-01-12 12:48:13 -06:00
|
|
|
| ^^^^^^^^^^^^^ help: try: `String::default()`
|
2018-06-14 02:57:27 -05:00
|
|
|
|
2023-01-12 12:48:13 -06:00
|
|
|
error: calling `String::default()` is more clear than this expression
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/default_trait_access.rs:19:22
|
2018-06-14 02:57:27 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | let s4: String = std::default::Default::default();
|
2023-01-12 12:48:13 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `String::default()`
|
2018-06-14 02:57:27 -05:00
|
|
|
|
2023-01-12 12:48:13 -06:00
|
|
|
error: calling `String::default()` is more clear than this expression
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/default_trait_access.rs:23:22
|
2018-06-14 02:57:27 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | let s6: String = default::Default::default();
|
2023-01-12 12:48:13 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `String::default()`
|
2018-06-14 02:57:27 -05:00
|
|
|
|
2020-09-10 10:47:07 -05:00
|
|
|
error: calling `GenericDerivedDefault::default()` is more clear than this expression
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/default_trait_access.rs:33:46
|
2018-06-14 02:57:27 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | let s11: GenericDerivedDefault<String> = Default::default();
|
2020-09-10 10:47:07 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^ help: try: `GenericDerivedDefault::default()`
|
2018-06-14 02:57:27 -05:00
|
|
|
|
2020-08-11 08:43:21 -05:00
|
|
|
error: calling `TupleDerivedDefault::default()` is more clear than this expression
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/default_trait_access.rs:39:36
|
2018-06-17 16:58:08 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | let s14: TupleDerivedDefault = Default::default();
|
2018-06-17 16:58:08 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^ help: try: `TupleDerivedDefault::default()`
|
|
|
|
|
2020-08-11 08:43:21 -05:00
|
|
|
error: calling `ArrayDerivedDefault::default()` is more clear than this expression
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/default_trait_access.rs:41:36
|
2018-06-17 16:58:08 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | let s15: ArrayDerivedDefault = Default::default();
|
2018-06-17 16:58:08 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^ help: try: `ArrayDerivedDefault::default()`
|
|
|
|
|
2020-08-11 08:43:21 -05:00
|
|
|
error: calling `TupleStructDerivedDefault::default()` is more clear than this expression
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/default_trait_access.rs:45:42
|
2018-06-17 16:58:08 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | let s17: TupleStructDerivedDefault = Default::default();
|
2018-06-17 16:58:08 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^ help: try: `TupleStructDerivedDefault::default()`
|
|
|
|
|
|
|
|
error: aborting due to 8 previous errors
|
2018-06-14 02:57:27 -05:00
|
|
|
|