librustc: Fix bugs regarding to impl privacy. rs=bugfix