Open
Description
Summary
Consider the following code:
// SAFETY: trust me ok
long_var_name = unsafe {
/* ... */
};
Normally, rustfmt
will either leave the unsafe
block as above or convert this into the following, depending on its length:
// SAFETY: trust me ok
long_var_name = unsafe { /* ... */ };
However, in rare cases, if /* ... */
is exactly the right length, rustfmt
will emit:
// SAFETY: trust me ok
long_var_name =
unsafe { /* ... */ };
Which breaks the undocumented_unsafe_blocks
lint, since the comment isn't immediately before the line with unsafe
. It should accept cases like this.
Lint Name
undocumented_unsafe_blocks