Closed
Description
This incorrect Fn implementation crashes the compiler:
struct Goal {
pub msg: String
}
impl Fn<&'static str, Goal> for Goal {
extern "rust-call" fn call(&self, args: &'static str) -> Goal {
return Goal {
msg: self.msg + args
}
}
}
with the error message:
error: internal compiler error: argument to function with "rust-call" ABI is neither a tuple nor unit
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 'Box<Any>', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/libsyntax/ast_util.rs:784