1 // Check that we check fns appearing in constant declarations.
4 // Returning local references?
8 impl Drop for DropString {
11 self.inner.push_str("dropped");
14 const LOCAL_REF: fn() -> &'static str = {
15 fn broken() -> &'static str {
16 let local = DropString { inner: format!("Some local string") };
17 return &local.inner; //~ borrow may still be in use when destructor runs