Closed
Description
Given the following code: playground link
use std::net::IpAddr;
fn main() {
let addr = Into::<IpAddr>.into([127,0,0,1]);
}
The current output is:
Compiling playground v0.0.1 (/playground)
error[[E0423]](https://doc.rust-lang.org/stable/error-index.html#E0423): expected value, found trait `Into`
--> src/main.rs:3:15
|
3 | let addr = Into::<IpAddr>.into([127,0,0,1]);
| ^^^^^^^^^^^^^^ not a value
For more information about this error, try `rustc --explain E0423`.
error: could not compile `playground` due to previous error
Ideally the output should look like:
Calling associated methods on a trait is done by using ::
Try:
--> src/main.rs:3:15
|
3 | let addr = Into::<IpAddr>::into([127,0,0,1]);
| ^^^^++^^^^^