rust/tests/ui/default_trait_access.stderr

53 lines
2.4 KiB
Plaintext
Raw Normal View History

2018-06-14 09:57:27 +02:00
error: Calling std::string::String::default() is more clear than this expression
--> $DIR/default_trait_access.rs:8:22
|
8 | let s1: String = Default::default();
| ^^^^^^^^^^^^^^^^^^ help: try: `std::string::String::default()`
|
= note: `-D default-trait-access` implied by `-D warnings`
error: Calling std::string::String::default() is more clear than this expression
--> $DIR/default_trait_access.rs:12:22
|
12 | 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:14:22
|
14 | 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:18:22
|
18 | let s6: String = default::Default::default();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::string::String::default()`
2018-06-17 23:58:08 +02:00
error: Calling GenericDerivedDefault<std::string::String>::default() is more clear than this expression
--> $DIR/default_trait_access.rs:28:46
2018-06-14 09:57:27 +02:00
|
2018-06-17 23:58:08 +02:00
28 | let s11: GenericDerivedDefault<String> = Default::default();
| ^^^^^^^^^^^^^^^^^^ help: try: `GenericDerivedDefault<std::string::String>::default()`
2018-06-14 09:57:27 +02:00
2018-06-17 23:58:08 +02:00
error: Calling TupleDerivedDefault::default() is more clear than this expression
--> $DIR/default_trait_access.rs:34:36
|
34 | let s14: TupleDerivedDefault = Default::default();
| ^^^^^^^^^^^^^^^^^^ help: try: `TupleDerivedDefault::default()`
error: Calling ArrayDerivedDefault::default() is more clear than this expression
--> $DIR/default_trait_access.rs:36:36
|
36 | let s15: ArrayDerivedDefault = Default::default();
| ^^^^^^^^^^^^^^^^^^ help: try: `ArrayDerivedDefault::default()`
error: Calling TupleStructDerivedDefault::default() is more clear than this expression
--> $DIR/default_trait_access.rs:40:42
|
40 | let s17: TupleStructDerivedDefault = Default::default();
| ^^^^^^^^^^^^^^^^^^ help: try: `TupleStructDerivedDefault::default()`
error: aborting due to 8 previous errors
2018-06-14 09:57:27 +02:00