Is this closure_lifetime_binder unsoundness already covered by #25860?
Rust Internals
Is this closure_lifetime_binder unsoundness already covered by #25860?
I discovered a #25860-like unsoundness while experimenting with closure_lifetime_binder, and I'm not sure where (or whether) to report it, so I'm asking here. #![forbid(unsafe_code)] #![feature(closure_lifetime_binder)] static UNIT: &'static &'static () = &&(); fn extend<'x>(r: &'x String) -> &'static String { let f = for<'a, 'b> |_: &'a &'b (), v: &'b String| -> &'a String { v }; let g: fn(&'static &'static (), &'x String) -> &'static String = f; g(UNIT, r) } fn main() { let...
0 comments
No comments yet.