Skip to content

matching on std::net::AddrParseError triggers "use of unmarked library feature" #27075

Closed
@crawford

Description

@crawford
match Ipv4Addr::from_str(blah) {
    Ok(ip) => Ok(ip),
    Err(AddrParseError(_)) => Err("cannot parse address")
}
src/main.rs:84:32: 84:33 error: use of unmarked library feature
src/main.rs:84             Err(AddrParseError(_)) => Err("cannot parse address")
                                              ^
src/main.rs:84:32: 84:33 note: this is either a bug in the library you are using or a bug in the compiler - please report it in both places
src/main.rs:84             Err(AddrParseError(_)) => Err("cannot parse address")
                                              ^
src/main.rs:84:32: 84:33 note: use #![feature(unmarked_api)] in the crate attributes to override this
src/main.rs:84             Err(AddrParseError(_)) => Err("cannot parse address")
                                              ^
error: aborting due to previous error
$ rustc --version --verbose
rustc 1.1.0 (35ceea399 2015-06-19)
binary: rustc
commit-hash: 35ceea3997c79a3b7562e89b462ab76af5b86b22
commit-date: 2015-06-19
host: x86_64-unknown-linux-gnu
release: 1.1.0

$ cargo --version
cargo 0.3.0 (built 2015-07-08)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions