diff options
Diffstat (limited to 'rust/common')
-rw-r--r-- | rust/common/meson.build | 4 | ||||
-rw-r--r-- | rust/common/src/uninit.rs | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/rust/common/meson.build b/rust/common/meson.build index b805e0f..aff601d 100644 --- a/rust/common/meson.build +++ b/rust/common/meson.build @@ -24,11 +24,13 @@ _common_rs = static_library( common_rs = declare_dependency(link_with: [_common_rs]) +rust.test('rust-common-tests', _common_rs, + suite: ['unit', 'rust']) + # Doctests are essentially integration tests, so they need the same dependencies. # Note that running them requires the object files for C code, so place them # in a separate suite that is run by the "build" CI jobs rather than "check". rust.doctest('rust-common-doctests', _common_rs, - protocol: 'rust', dependencies: common_rs, suite: ['doc', 'rust']) diff --git a/rust/common/src/uninit.rs b/rust/common/src/uninit.rs index e7f9fcd..8d021b1 100644 --- a/rust/common/src/uninit.rs +++ b/rust/common/src/uninit.rs @@ -35,7 +35,7 @@ impl<'a, T, U> MaybeUninitField<'a, T, U> { } } -impl<'a, T, U> Deref for MaybeUninitField<'a, T, U> { +impl<T, U> Deref for MaybeUninitField<'_, T, U> { type Target = MaybeUninit<U>; fn deref(&self) -> &MaybeUninit<U> { @@ -46,7 +46,7 @@ impl<'a, T, U> Deref for MaybeUninitField<'a, T, U> { } } -impl<'a, T, U> DerefMut for MaybeUninitField<'a, T, U> { +impl<T, U> DerefMut for MaybeUninitField<'_, T, U> { fn deref_mut(&mut self) -> &mut MaybeUninit<U> { // SAFETY: self.child was obtained by dereferencing a valid mutable // reference; the content of the memory may be invalid or uninitialized |