Skip to content

Commit 21df2a5

Browse files
authored
Fix broken intra-doc links (#3531)
1 parent fdbee22 commit 21df2a5

File tree

6 files changed

+14
-8
lines changed

6 files changed

+14
-8
lines changed

crates/libafl_frida/src/helper.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ impl FridaInstrumentationHelperBuilder {
294294

295295
/// Load a script
296296
///
297-
/// See [`Script::new`] for details
297+
/// See [`Script::load`] for details
298298
#[must_use]
299299
pub fn load_script<F: Fn(&str, &[u8])>(
300300
self,

crates/libafl_intelpt/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ pub const PAGE_SIZE: usize = 4096;
3636
/// Returns `Ok(())` if Intel PT is available and has the features used by `LibAFL`, otherwise
3737
/// returns an `Err` containing a description of the reasons.
3838
///
39-
/// If you use this with QEMU check out [`Self::availability_in_qemu()`] instead.
39+
/// If you use this with QEMU check out [`availability_in_qemu_kvm()`] instead.
4040
///
4141
/// Due to the numerous factors that can affect `IntelPT` availability, this function was
4242
/// developed on a best-effort basis.
@@ -78,7 +78,7 @@ pub fn availability() -> Result<(), String> {
7878
/// Check if Intel PT is available on the current system and can be used in combination with
7979
/// QEMU.
8080
///
81-
/// If you don't use this with QEMU check out [`IntelPT::availability()`] instead.
81+
/// If you don't use this with QEMU check out [`availability()`] instead.
8282
pub fn availability_in_qemu_kvm() -> Result<(), String> {
8383
let mut reasons = match availability() {
8484
Err(s) => vec![s],

crates/libafl_qemu/src/emu/hooks.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,7 @@ where
780780
}
781781

782782
/// # Safety
783-
/// This can call through to a potentialy unsafe [`backdoor_function`]
783+
/// This can call through to a potentialy unsafe [`Self::backdoor_function`]
784784
pub unsafe fn backdoor(&mut self, hook: BackdoorHook<ET, I, S>) -> Option<BackdoorHookId> {
785785
match hook {
786786
Hook::Function(f) => Some(self.backdoor_function(f)),

crates/libafl_qemu/src/emu/usermode.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
use libafl_bolts::Error;
22
use libafl_qemu_sys::{GuestAddr, MmapPerms, VerifyAccess};
33

4+
#[cfg(doc)]
5+
use crate::Qemu;
46
use crate::{CPU, Emulator, GuestMaps, NopSnapshotManager, Regs, TargetSignalHandling};
57

68
pub type StdSnapshotManager = NopSnapshotManager;

crates/libafl_qemu/src/qemu/usermode.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ use libc::{c_int, c_uchar, siginfo_t, strlen};
1414
#[cfg(feature = "python")]
1515
use pyo3::{IntoPyObject, Py, PyRef, PyRefMut, Python, pyclass, pymethods};
1616

17+
#[cfg(doc)]
18+
use crate::modules::snapshot::SnapshotModule;
1719
use crate::{CPU, Qemu, qemu::QEMU_IS_RUNNING};
1820

1921
/// Choose how QEMU target signals should be handled.

crates/shmem_providers/src/lib.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,7 @@ pub mod unix_shmem {
716716
pub use default::{MAX_MMAP_FILENAME_LEN, MmapShMem, MmapShMemProvider};
717717

718718
#[cfg(doc)]
719-
use crate::shmem::{ShMem, ShMemProvider};
719+
use crate::ShMem;
720720

721721
/// Shared memory provider for Android, allocating and forwarding maps over unix domain sockets.
722722
#[cfg(target_os = "android")]
@@ -747,6 +747,8 @@ pub mod unix_shmem {
747747
shmctl, shmdt, shmget,
748748
};
749749

750+
#[cfg(doc)]
751+
use crate::ShMemDescription;
750752
use crate::{ShMem, ShMemId, ShMemProvider};
751753

752754
/// The max number of bytes used when generating names for [`MmapShMem`]s.
@@ -933,8 +935,8 @@ pub mod unix_shmem {
933935
///
934936
/// Only available on UNIX systems at the moment.
935937
///
936-
/// You likely want to pass the [`crate::shmem::ShMemDescription`] of the returned [`ShMem`]
937-
/// and reopen the shared memory in the child process using [`crate::shmem::ShMemProvider::shmem_from_description`].
938+
/// You likely want to pass the [`ShMemDescription`] of the returned [`ShMem`]
939+
/// and reopen the shared memory in the child process using [`ShMemProvider::shmem_from_description`].
938940
///
939941
/// # Errors
940942
///
@@ -1333,7 +1335,7 @@ pub mod unix_shmem {
13331335
}
13341336
}
13351337

1336-
/// Get a [`crate::shmem::unix_shmem::UnixShMem`] of the existing [`ShMem`] mapping identified by id.
1338+
/// Get a [`crate::unix_shmem::UnixShMem`] of the existing [`ShMem`] mapping identified by id.
13371339
pub fn shmem_from_id_and_size(id: ShMemId, map_size: usize) -> Result<Self, Error> {
13381340
unsafe {
13391341
let fd: i32 = id.to_string().parse().unwrap();

0 commit comments

Comments
 (0)