mozilla/rust — pull request #5778 by jld (2013-04-08 08:33:54+00:00)
Title: Remove enum layout assumptions from type visitor

This takes care of one of the last remnants of assumptions about enum layout. A type visitor is now passed a function to read a value's discriminant, then accesses fields by being passed a byte offset for each one. The latter may not be fully general, despite the constraints imposed on representations by borrowed pointers, but works for any representations currently planned and is relatively simple.

Closes #5652.