Skip to content

Commit cf75c90

Browse files
nicholasbishopGabrielMajeri
authored andcommitted
Fix compilation of doctests
Tested with: CARGO_PROFILE_DEV_PANIC=unwind \ cargo test -Zbuild-std=std --target x86_64-unknown-linux-gnu (Changing panic to unwind avoids rust-lang/wg-cargo-std-aware#56)
1 parent c4ab6ae commit cf75c90

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

src/data_types/enums.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@
3030
///
3131
/// Usage example:
3232
/// ```
33+
/// use uefi::newtype_enum;
3334
/// newtype_enum! {
34-
/// #[derive(Cmp, PartialCmp)]
35+
/// #[derive(Ord, PartialOrd)]
3536
/// pub enum UnixBool: i32 => #[allow(missing_docs)] {
3637
/// FALSE = 0,
3738
/// TRUE = 1,

src/data_types/guid.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,9 @@ impl fmt::Display for Guid {
9797
/// textual format as an argument, and is used in the following way:
9898
///
9999
/// ```
100+
/// use uefi::unsafe_guid;
100101
/// #[unsafe_guid("12345678-9abc-def0-1234-56789abcdef0")]
101-
/// type Emptiness = ();
102+
/// struct Emptiness;
102103
/// ```
103104
pub unsafe trait Identify {
104105
/// Unique protocol identifier.

src/proto/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ use crate::Identify;
1818
/// protocol's GUID using the following syntax:
1919
///
2020
/// ```
21+
/// #![feature(negative_impls)]
22+
/// use uefi::{proto::Protocol, unsafe_guid};
2123
/// #[unsafe_guid("12345678-9abc-def0-1234-56789abcdef0")]
2224
/// #[derive(Protocol)]
2325
/// struct DummyProtocol {}

0 commit comments

Comments
 (0)