Skip to content

Commit 3eee309

Browse files
committed
Fix error when lender feature is not enabled
1 parent 20efa13 commit 3eee309

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/validation.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ pub fn not_null_pointer<T>(pointer: *const T) -> Result<(), PointerError> {
1414

1515
#[inline]
1616
pub fn lent_pointer<T: 'static>(pointer: *const T) -> Result<(), PointerError> {
17+
#[cfg(not(all(feature = "std", feature = "lender")))]
18+
return Ok(());
1719
#[cfg(all(feature = "std", feature = "lender"))]
1820
match lender::lent_type_of(pointer) {
1921
Some(type_id) if type_id != std::any::TypeId::of::<T>() => {

0 commit comments

Comments
 (0)