librustc: Pass the correct type when adding cleanups.

Fixes #9382.

r? @nikomatsakis