-
Notifications
You must be signed in to change notification settings - Fork 972
Open
Labels
A-commentsArea: commentsArea: commentsC-bugCategory: this is a bug; use also I-* labels for specific bug kinds, e.g. I-non-idempotency or I-ICECategory: this is a bug; use also I-* labels for specific bug kinds, e.g. I-non-idempotency or I-ICES-fixed-needs-subtree-syncStatus: fixed, but needs a subtree syncStatus: fixed, but needs a subtree sync
Description
I just ran rustfmt on bytemuck (da748163ea203f80098b6bdc754c54ebc535364c) and then this happened:
diff --git a/src/transparent.rs b/src/transparent.rs
index a588eea..de099db 100644
--- a/src/transparent.rs
+++ b/src/transparent.rs
@@ -103,9 +103,9 @@ use super::*;
/// #[derive(TransparentWrapper)]
/// #[repr(transparent)]
/// #[transparent(usize)]
-/// struct Wrapper<T: ?Sized>(usize, PhantomData<T>); // PhantomData<T> implements Zeroable for all T
-/// ```
-///
+/// struct Wrapper<T: ?Sized>(usize, PhantomData<T>); // PhantomData<T>
+/// implements Zeroable for all T ```
+///
/// Here, an error will occur, because `MyZst` does not implement `Zeroable`.
#[cfg_attr(feature = "derive", doc = "```compile_fail")]
#[cfg_attr(This feels like #4158 except that issue was fixed in 2020 and my rustfmt is newer:
$ cargo +nightly fmt -- -V
rustfmt 1.8.0-nightly (54a8a1db60 2025-09-26)
Metadata
Metadata
Assignees
Labels
A-commentsArea: commentsArea: commentsC-bugCategory: this is a bug; use also I-* labels for specific bug kinds, e.g. I-non-idempotency or I-ICECategory: this is a bug; use also I-* labels for specific bug kinds, e.g. I-non-idempotency or I-ICES-fixed-needs-subtree-syncStatus: fixed, but needs a subtree syncStatus: fixed, but needs a subtree sync