Closed
Description
struct Foo<'a, 'b: 'a>(&'a &'b i32);
impl<'a, 'b> Foo<'a, 'b> {
fn foo(&self) {}
}
compiles. As far as I can tell, the bound on 'b is checked in the definitions of the functions, but isn't checked in the use of them. As a concrete example of this Kimundi/scoped-threadpool-rs#8 ( https://play.rust-lang.org/?gist=870da1405ea15e80f778&version=nightly ) will allow the incorrect use of ScopeRef in the test, while copying the bounds from the struct definition to the impl definition correctly rejects it.