I'm assuming the car isn't the the WRX or STI from the title more details would help. But from the specs it looks ok but I dont know that it would just from the specs. You need to check:
1. the mounts if they don't line up thats going to be a problem off the bat.
2. the ecu will be different so you need to check that out.
3. make sure the tranny will work with the engine, if not thats going to be a pain in the butt.
4 probably a lot of other stuff.
It might be interesting to see if the 2011 engine would fit though. Because if the new engines don't have the head gasket problems this could be a solution to the head gasket problems in older models. That is, of course, if it fits and the new engines don't continue the head gasket problems.