Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Don't run doctests with invalid pointers
The `Handle::from_ptr` and `SystemTable<View>::from_ptr` doctests use a `0xdeadbeef` pointer, which of course is not valid. Change the tests to compile but not actually run so that they don't trigger UB. Noticed this when running the unit tests with Miri, which caught the undefined behavior the in the SystemTable case.
  • Loading branch information
nicholasbishop committed Mar 2, 2022
commit f8aa8506682ab13ecb28d58260ff05302324581f
2 changes: 1 addition & 1 deletion src/data_types/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ impl Handle {
/// come from the Multiboot2 information structure or something similar.
///
/// # Example
/// ```rust
/// ```no_run
/// use core::ffi::c_void;
/// use uefi::Handle;
///
Expand Down
2 changes: 1 addition & 1 deletion src/table/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ impl<View: SystemTableView> SystemTable<View> {
/// come from the Multiboot2 information structure or something similar.
///
/// # Example
/// ```rust
/// ```no_run
/// use core::ffi::c_void;
/// use uefi::prelude::{Boot, SystemTable};
///
Expand Down