fn std::mem::drop()
not accepted as argument of type fn(&Arg)
#96057
Labels
A-inference
Area: Type inference
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I tried this code:
I expected to see this happen:
I expect the code to compile. It looks like this should work, because drop should be more or less equivalent to toilet closure, it just has generic argument, but without any bounds, so it seems like it should be accepted here.
Instead, this happened:
Code doesn't compile with:
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: