fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: useless conversion to the same type: `T` 2 --> $DIR/useless_conversion_try.rs:5:13 3 | 4LL | let _ = T::try_from(val).unwrap(); 5 | ^^^^^^^^^^^^^^^^ 6 | 7 = help: consider removing `T::try_from()` 8note: the lint level is defined here 9 --> $DIR/useless_conversion_try.rs:1:9 10 | 11LL | #![deny(clippy::useless_conversion)] 12 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ 13 14error: useless conversion to the same type: `T` 15 --> $DIR/useless_conversion_try.rs:7:5 16 | 17LL | val.try_into().unwrap() 18 | ^^^^^^^^^^^^^^ 19 | 20 = help: consider removing `.try_into()` 21 22error: useless conversion to the same type: `std::string::String` 23 --> $DIR/useless_conversion_try.rs:30:21 24 | 25LL | let _: String = "foo".to_string().try_into().unwrap(); 26 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 27 | 28 = help: consider removing `.try_into()` 29 30error: useless conversion to the same type: `std::string::String` 31 --> $DIR/useless_conversion_try.rs:32:21 32 | 33LL | let _: String = TryFrom::try_from("foo".to_string()).unwrap(); 34 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 35 | 36 = help: consider removing `TryFrom::try_from()` 37 38error: useless conversion to the same type: `std::string::String` 39 --> $DIR/useless_conversion_try.rs:34:13 40 | 41LL | let _ = String::try_from("foo".to_string()).unwrap(); 42 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 43 | 44 = help: consider removing `String::try_from()` 45 46error: useless conversion to the same type: `std::string::String` 47 --> $DIR/useless_conversion_try.rs:36:13 48 | 49LL | let _ = String::try_from(format!("A: {:04}", 123)).unwrap(); 50 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 51 | 52 = help: consider removing `String::try_from()` 53 54error: useless conversion to the same type: `std::string::String` 55 --> $DIR/useless_conversion_try.rs:38:21 56 | 57LL | let _: String = format!("Hello {}", "world").try_into().unwrap(); 58 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 59 | 60 = help: consider removing `.try_into()` 61 62error: useless conversion to the same type: `std::string::String` 63 --> $DIR/useless_conversion_try.rs:40:21 64 | 65LL | let _: String = String::new().try_into().unwrap(); 66 | ^^^^^^^^^^^^^^^^^^^^^^^^ 67 | 68 = help: consider removing `.try_into()` 69 70error: useless conversion to the same type: `std::string::String` 71 --> $DIR/useless_conversion_try.rs:42:27 72 | 73LL | let _: String = match String::from("_").try_into() { 74 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 75 | 76 = help: consider removing `.try_into()` 77 78error: aborting due to 9 previous errors 79