-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Closed
Description
The program
extern mod extra;
use extra::url::Url;
fn main() {
let Url { host, port, _ } = FromStr::from_str("localhost:1234").unwrap();
}
fails to compile with the following error message:
test.rs:6:5: 6:26 error: the type of this value must be known in this context
test.rs:6 let Url { host, port, _ } = FromStr::from_str("localhost:1234").unwrap();
^~~~~~~~~~~~~~~~~~~~~
test.rs:6:29: 6:46 error: failed to find an implementation of trait std::from_str::FromStr for [type error]
test.rs:6 let Url { host, port, _ } = FromStr::from_str("localhost:1234").unwrap();
^~~~~~~~~~~~~~~~~
even though the compiler should be able to infer that it's looking for the FromStr
implementation for Url
.
Metadata
Metadata
Assignees
Labels
No labels