Skip to content

Mismatched type Result instead of Option causes internal compiler error #12499

@jmmk

Description

@jmmk

rustc 0.10-pre (22d3669 2014-02-22 15:01:58 -0800)
host: x86_64-apple-darwin

credit.rs:20:9: 20:21 error: mismatched types: expected `std::result::Result<~str,std::io::IoError>` but found `std::option::Option<<generic #68>>` (expected enum std::result::Result but found enum std::option::Option)
credit.rs:20         Some(number) => {
                     ^~~~~~~~~~~~
error: internal compiler error: unexpected failure
This message reflects a bug in the Rust compiler.
We would appreciate a bug report: http://static.rust-lang.org/doc/master/complement-bugreport.html
note: the compiler hit an unexpected failure path. this is a bug
Ok(task 'rustc' failed at 'index out of bounds: the len is 0 but the index is 0', /Library/Caches/Homebrew/rust--git/src/librustc/middle/typeck/check/method.rs:452
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions