You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This generates the following error on the Rust playpen:
rustc: /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/llvm/lib/IR/Instructions.cpp:1083: void llvm::StoreInst::AssertOK(): Assertion `getOperand(0)->getType() == cast<PointerType>(getOperand(1)->getType())->getElementType() && "Ptr must be a pointer to Val type!"' failed.
Aborted (core dumped)
playpen: application terminated with error code 134
A minor change to the closure fixes the issue:
// ...
return Box::new(range(0, 3).map(|i| i )); // without the explicit return inside the closure
// ...
This variant also works:
// ...
Box::new(range(0, 3).map(|i| { return i; })) // without the explicit return outside the closure
// ...
If it helps, this is the output from rustc --version --verbose
Without the adjustments the retslot might have the wrong type, e.g. when
the return value is implicitly coerced to a trait object.
Fixesrust-lang#22346
Without the adjustments the retslot might have the wrong type, e.g. when
the return value is implicitly coerced to a trait object.
Fixesrust-lang#22346
I ran into a very strange issue today, the code that can replicate the issue is as follows:
This generates the following error on the Rust playpen:
A minor change to the closure fixes the issue:
This variant also works:
If it helps, this is the output from
rustc --version --verbose
The text was updated successfully, but these errors were encountered: