diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs index 73251d40599..afc659ccf3a 100644 --- a/src/libstd/thread/mod.rs +++ b/src/libstd/thread/mod.rs @@ -437,8 +437,8 @@ impl Builder { /// let handler = unsafe { /// builder.spawn_unchecked(move || { /// println!("x = {}", *thread_x); - /// }).unwrap(); - /// } + /// }).unwrap() + /// }; /// /// // caller has to ensure `join()` is called, otherwise /// // it is possible to access freed memory if `x` gets