Skip to content

Commit

Permalink
Fix doctests with feature gate
Browse files Browse the repository at this point in the history
  • Loading branch information
juntyr committed Dec 10, 2023
1 parent f4cff70 commit 9488c90
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
//! The layout of types is only defined if they're `#[repr(C)]`. This crate
//! works on non-`#[repr(C)]` types, but their layout is unpredictable.
//!
#![cfg(feature = "derive")]
//! ```rust
//! # #![feature(const_type_name)]
//! # #![feature(offset_of)]
Expand Down Expand Up @@ -92,6 +93,7 @@
//! Over-aligned types have trailing padding, which can be a source of bugs in
//! some FFI scenarios:
//!
#![cfg(feature = "derive")]
//! ```rust
//! # #![feature(const_type_name)]
//! # #![feature(offset_of)]
Expand Down

0 comments on commit 9488c90

Please sign in to comment.