Skip to content

Commit 6b81374

Browse files
authored
Re-parent orphaned comment (#2935)
gherrit-pr-id: Gb42a1cb203b56f92ec3b6cb30dfbf1eed5330708
1 parent 67c0fff commit 6b81374

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

src/lib.rs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -421,24 +421,6 @@ const _: () = {
421421
_WARNING
422422
};
423423

424-
// These exist so that code which was written against the old names will get
425-
// less confusing error messages when they upgrade to a more recent version of
426-
// zerocopy. On our MSRV toolchain, the error messages read, for example:
427-
//
428-
// error[E0603]: trait `FromZeroes` is private
429-
// --> examples/deprecated.rs:1:15
430-
// |
431-
// 1 | use zerocopy::FromZeroes;
432-
// | ^^^^^^^^^^ private trait
433-
// |
434-
// note: the trait `FromZeroes` is defined here
435-
// --> /Users/josh/workspace/zerocopy/src/lib.rs:1845:5
436-
// |
437-
// 1845 | use FromZeros as FromZeroes;
438-
// | ^^^^^^^^^^^^^^^^^^^^^^^
439-
//
440-
// The "note" provides enough context to make it easy to figure out how to fix
441-
// the error.
442424
/// Implements [`KnownLayout`].
443425
///
444426
/// This derive analyzes various aspects of a type's layout that are needed for
@@ -541,6 +523,24 @@ const _: () = {
541523
#[cfg(any(feature = "derive", test))]
542524
#[cfg_attr(doc_cfg, doc(cfg(feature = "derive")))]
543525
pub use zerocopy_derive::KnownLayout;
526+
// These exist so that code which was written against the old names will get
527+
// less confusing error messages when they upgrade to a more recent version of
528+
// zerocopy. On our MSRV toolchain, the error messages read, for example:
529+
//
530+
// error[E0603]: trait `FromZeroes` is private
531+
// --> examples/deprecated.rs:1:15
532+
// |
533+
// 1 | use zerocopy::FromZeroes;
534+
// | ^^^^^^^^^^ private trait
535+
// |
536+
// note: the trait `FromZeroes` is defined here
537+
// --> /Users/josh/workspace/zerocopy/src/lib.rs:1845:5
538+
// |
539+
// 1845 | use FromZeros as FromZeroes;
540+
// | ^^^^^^^^^^^^^^^^^^^^^^^
541+
//
542+
// The "note" provides enough context to make it easy to figure out how to fix
543+
// the error.
544544
#[allow(unused)]
545545
use {FromZeros as FromZeroes, IntoBytes as AsBytes, Ref as LayoutVerified};
546546

0 commit comments

Comments
 (0)