Closed
Description
It fails to compile FnOnce impl
.
Code that does not compile
#![feature(unboxed_closures)]
#![feature(core)]
struct Data {
identifier: String,
}
impl FnOnce<u64> for Data {
type Output = u64;
extern "rust-call" fn call_once(self, arg: u64) -> Self::Output {
arg
}
}
fn main() {
}
Code that compiles
#![feature(unboxed_closures)]
#![feature(core)]
struct Data {
identifier: String,
}
impl FnOnce<(u64,)> for Data {
type Output = u64;
extern "rust-call" fn call_once(self, args: (u64,)) -> Self::Output {
args.0
}
}
fn main() {
}
Error message is not helpful.
Metadata
Metadata
Assignees
Labels
No labels