//@ check-pass #![warn(non_local_definitions)] trait Trait {} fn main() { mod below { pub struct Type(T); } struct InsideMain; trait HasFoo {} impl Trait for &Vec> //~^ WARN non-local `impl` definition where T: HasFoo {} }