rust/tests/ui/default_trait_access.stderr

57 lines
2.4 KiB
Plaintext
Raw Normal View History

error: calling `String::default()` is more clear than this expression
--> $DIR/default_trait_access.rs:14:22
|
2018-12-27 09:57:55 -06:00
LL | let s1: String = Default::default();
| ^^^^^^^^^^^^^^^^^^ help: try: `String::default()`
|
note: the lint level is defined here
--> $DIR/default_trait_access.rs:3:9
|
LL | #![deny(clippy::default_trait_access)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2018-06-14 02:57:27 -05:00
error: calling `String::default()` is more clear than this expression
--> $DIR/default_trait_access.rs:18:22
2018-06-14 02:57:27 -05:00
|
2018-12-27 09:57:55 -06:00
LL | let s3: String = D2::default();
| ^^^^^^^^^^^^^ help: try: `String::default()`
2018-06-14 02:57:27 -05:00
error: calling `String::default()` is more clear than this expression
--> $DIR/default_trait_access.rs:20: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();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `String::default()`
2018-06-14 02:57:27 -05:00
error: calling `String::default()` is more clear than this expression
--> $DIR/default_trait_access.rs:24:22
2018-06-14 02:57:27 -05:00
|
2018-12-27 09:57:55 -06:00
LL | let s6: String = default::Default::default();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `String::default()`
2018-06-14 02:57:27 -05:00
error: calling `GenericDerivedDefault::default()` is more clear than this expression
--> $DIR/default_trait_access.rs:34:46
2018-06-14 02:57:27 -05:00
|
2018-12-27 09:57:55 -06:00
LL | let s11: GenericDerivedDefault<String> = Default::default();
| ^^^^^^^^^^^^^^^^^^ help: try: `GenericDerivedDefault::default()`
2018-06-14 02:57:27 -05:00
error: calling `TupleDerivedDefault::default()` is more clear than this expression
--> $DIR/default_trait_access.rs:40: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()`
error: calling `ArrayDerivedDefault::default()` is more clear than this expression
--> $DIR/default_trait_access.rs:42: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()`
error: calling `TupleStructDerivedDefault::default()` is more clear than this expression
--> $DIR/default_trait_access.rs:46: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