Description
Sorry, not the greatest summary.
Currently we dispatch the visitor methods from trans::reflect::visit() using trans_call_inner
directly and without monomorphising the target method or substituting the type properly. These are methods not functions, so I guess we don't need to monomorphise, but this still seems pretty bad. One effect of this is that we can't use the method's type for anything because the method signature includes type parameters, but the methods are in a different crate (libdebug) from the caller, so the type_contents machinery chokes. In particular, this means we can't get the proper llvm attributes for the method call. I have had to hack things so we don't get attributes for any lang items (since I don't see any way to distinguish the reflection methods from other lang items once inside invoke). That is bad.