Introducing MIR


@nikomatsakis wrote about the on-going refactoring inside the compiler to introduce the MIR (mid-level intermediate representation):


Still digesting the meaty post, but does this mean in a compiler plugin I could somehow determine whether or not a given type implements a given trait since this MIR representation comes after type checking?


Macro compiler plugins (aka syntax extensions) currently operate on the AST and this will not change with MIR, thus they don’t have and won’t gain access to that info. On the other hand, lint plugins already run after type checking, on the HIR currently, and hence already have access to that sort of information. They should still have access with MIR, although I don’t know the details of how they will work precisely.