librustc: Check restrictions on all subcomponents of a path when moving

it. r=nikomatsakis