]> git.lizzy.rs Git - rust.git/commitdiff
avoid implicitly returning ()
authorRalf Jung <post@ralfj.de>
Thu, 23 Jul 2020 15:06:33 +0000 (17:06 +0200)
committerRalf Jung <post@ralfj.de>
Thu, 23 Jul 2020 15:12:31 +0000 (17:12 +0200)
src/libstd/sys/windows/thread_local_key.rs

index 0bd9600b6f2e1b0e8bb7fe374e3dcf3693d91276..82901871e78ae25d68abdc50948af105064251af 100644 (file)
@@ -131,7 +131,8 @@ unsafe fn register_dtor(key: Key, dtor: Dtor) {
                 #[cfg(miri)]
                 miri_static_root(&*node as *const _ as *const u8);
 
-                return mem::forget(node);
+                mem::forget(node);
+                return;
             }
             Err(cur) => head = cur,
         }