// run-pass// compile-flags: -Z chalktraitFoo{}implFoofori32{}structS<T: Foo>{x: T,}fnonly_foo<T: Foo>(_x: &T){}impl<T>S<T>{// Test that we have the correct environment inside an inherent method.fndummy_foo(&self){only_foo(&self.x)}}fnmain(){lets=S{x: 5,};s.dummy_foo();}