Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICE with task::try { fail!("failed") } #6854

Closed
lilyball opened this issue May 31, 2013 · 2 comments
Closed

ICE with task::try { fail!("failed") } #6854

lilyball opened this issue May 31, 2013 · 2 comments

Comments

@lilyball
Copy link
Contributor

Compiling the following program:

fn main() {
    do std::task::try {
        fail!("failed");
    };
    println("try worked");
}

results in an ICE:

> env RUST_LOG=rustc1=,::rt::backtrace rustc foo.rs
rust: task failed at 'ty_fn_sig() called on non-fn type: &ty_err', /Users/kevin/Dev/rust/rust/src/librustc/middle/ty.rs:2803
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug
note: try running with RUST_LOG=rustc=1,::rt::backtrace to get further details and report the results to github.com/mozilla/rust/issues
rust: task failed at 'explicit failure', /Users/kevin/Dev/rust/rust/src/librustc/rustc.rc:400
rust: domain main @0x7f9983808410 root task failed

This is with current tip of incoming on OS X:

rustc 0.6 (237dce1 2013-05-30 17:22:49 -0700)
host: x86_64-apple-darwin
@jdm
Copy link
Contributor

jdm commented May 31, 2013

Paging @catamorphism for ty_err reference.

@lilyball
Copy link
Contributor Author

This ICE has apparently been fixed. The problem was it didn't know the final type of the do expression.

flip1995 pushed a commit to flip1995/rust that referenced this issue Mar 11, 2021
…t_lint, r=phansch

useless_format: fix examples in the description

fixes rust-lang#6844
changelog: useless_format: fix examples in the description
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants