rustc: use Ty instead of passing ty::sty around.

r? @nikomatsakis