zig fmt: remove trailing whitespace on doc comments
Fixes #11353 The renderer treats comments and doc comments differently since doc comments are parsed into the Ast. This commit adds a check after getting the text for the doc comment and trims whitespace at the end before rendering. The `a = 0,` in the test is here to avoid a ParseError while parsing the test.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
//! Futex is a mechanism used to block (`wait`) and unblock (`wake`) threads using a 32bit memory address as hints.
|
||||
//! Blocking a thread is acknowledged only if the 32bit memory address is equal to a given value.
|
||||
//! This check helps avoid block/unblock deadlocks which occur if a `wake()` happens before a `wait()`.
|
||||
//! Using Futex, other Thread synchronization primitives can be built which efficiently wait for cross-thread events or signals.
|
||||
//! Using Futex, other Thread synchronization primitives can be built which efficiently wait for cross-thread events or signals.
|
||||
|
||||
const std = @import("../std.zig");
|
||||
const builtin = @import("builtin");
|
||||
@@ -20,7 +20,7 @@ const spinLoopHint = std.atomic.spinLoopHint;
|
||||
/// - The value at `ptr` is no longer equal to `expect`.
|
||||
/// - The caller is unblocked by a matching `wake()`.
|
||||
/// - The caller is unblocked spuriously by an arbitrary internal signal.
|
||||
///
|
||||
///
|
||||
/// If `timeout` is provided, and the caller is blocked for longer than `timeout` nanoseconds`, `error.TimedOut` is returned.
|
||||
///
|
||||
/// The checking of `ptr` and `expect`, along with blocking the caller, is done atomically
|
||||
|
||||
Reference in New Issue
Block a user