diff --git a/rust/upb/arena.rs b/rust/upb/arena.rs index b1a90dc4e9..d4581eabd3 100644 --- a/rust/upb/arena.rs +++ b/rust/upb/arena.rs @@ -5,7 +5,7 @@ // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd -use crate::opaque_pointee::opaque_pointee; +use super::opaque_pointee::opaque_pointee; use std::alloc::{self, Layout}; use std::cell::UnsafeCell; use std::marker::PhantomData; diff --git a/rust/upb/array.rs b/rust/upb/array.rs index aeadd1bdfc..1c42cefbb0 100644 --- a/rust/upb/array.rs +++ b/rust/upb/array.rs @@ -5,8 +5,8 @@ // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd -use crate::opaque_pointee::opaque_pointee; -use crate::{upb_MessageValue, upb_MutableMessageValue, CType, RawArena}; +use super::opaque_pointee::opaque_pointee; +use super::{upb_MessageValue, upb_MutableMessageValue, CType, RawArena}; use std::ptr::NonNull; opaque_pointee!(upb_Array); @@ -27,13 +27,14 @@ extern "C" { #[cfg(test)] mod tests { + use super::super::Arena; use super::*; #[test] fn array_ffi_test() { // SAFETY: FFI unit test uses C API under expected patterns. unsafe { - let arena = crate::Arena::new(); + let arena = Arena::new(); let raw_arena = arena.raw(); let array = upb_Array_New(raw_arena, CType::Float); diff --git a/rust/upb/extension_registry.rs b/rust/upb/extension_registry.rs index c0400cd61e..ce7fd26b6e 100644 --- a/rust/upb/extension_registry.rs +++ b/rust/upb/extension_registry.rs @@ -5,7 +5,7 @@ // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd -use crate::opaque_pointee::opaque_pointee; +use super::opaque_pointee::opaque_pointee; use std::ptr::NonNull; opaque_pointee!(upb_ExtensionRegistry); diff --git a/rust/upb/map.rs b/rust/upb/map.rs index 5c97a21d64..5b60149a74 100644 --- a/rust/upb/map.rs +++ b/rust/upb/map.rs @@ -5,8 +5,8 @@ // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd -use crate::opaque_pointee::opaque_pointee; -use crate::{upb_MessageValue, CType, RawArena}; +use super::opaque_pointee::opaque_pointee; +use super::{upb_MessageValue, CType, RawArena}; use std::ptr::NonNull; opaque_pointee!(upb_Map); @@ -49,13 +49,14 @@ extern "C" { #[cfg(test)] mod tests { + use super::super::Arena; use super::*; #[test] fn map_ffi_test() { // SAFETY: FFI unit test uses C API under expected patterns. unsafe { - let arena = crate::Arena::new(); + let arena = Arena::new(); let raw_arena = arena.raw(); let map = upb_Map_New(raw_arena, CType::Bool, CType::Double); assert_eq!(upb_Map_Size(map), 0); diff --git a/rust/upb/message.rs b/rust/upb/message.rs index 865c52ee9d..67d1e06e78 100644 --- a/rust/upb/message.rs +++ b/rust/upb/message.rs @@ -5,8 +5,8 @@ // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd -use crate::opaque_pointee::opaque_pointee; -use crate::{upb_ExtensionRegistry, upb_MiniTable, upb_MiniTableField, RawArena}; +use super::opaque_pointee::opaque_pointee; +use super::{upb_ExtensionRegistry, upb_MiniTable, upb_MiniTableField, RawArena}; use std::ptr::NonNull; opaque_pointee!(upb_Message); diff --git a/rust/upb/message_value.rs b/rust/upb/message_value.rs index 1bb5a8deb7..5cde4d6bb2 100644 --- a/rust/upb/message_value.rs +++ b/rust/upb/message_value.rs @@ -5,7 +5,7 @@ // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd -use crate::{RawArray, RawMap, RawMessage, StringView}; +use super::{RawArray, RawMap, RawMessage, StringView}; // Transcribed from google3/third_party/upb/upb/message/value.h #[repr(C)] diff --git a/rust/upb/mini_table.rs b/rust/upb/mini_table.rs index fe80a86a68..64b64ec192 100644 --- a/rust/upb/mini_table.rs +++ b/rust/upb/mini_table.rs @@ -5,7 +5,7 @@ // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd -use crate::opaque_pointee::opaque_pointee; +use super::opaque_pointee::opaque_pointee; use std::ptr::NonNull; opaque_pointee!(upb_MiniTable); diff --git a/rust/upb/owned_arena_box.rs b/rust/upb/owned_arena_box.rs index 4cd11d6666..c4ff1ac809 100644 --- a/rust/upb/owned_arena_box.rs +++ b/rust/upb/owned_arena_box.rs @@ -5,7 +5,7 @@ // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd -use crate::Arena; +use super::Arena; use std::fmt::{self, Debug}; use std::ops::{Deref, DerefMut}; use std::ptr::NonNull; diff --git a/rust/upb/text.rs b/rust/upb/text.rs index 2e6f84adaf..2f1cf09448 100644 --- a/rust/upb/text.rs +++ b/rust/upb/text.rs @@ -5,7 +5,7 @@ // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd -use crate::{upb_MiniTable, RawMessage}; +use super::{upb_MiniTable, RawMessage}; extern "C" { /// Returns the minimum needed length (excluding NULL) that `buf` has to be diff --git a/rust/upb/wire.rs b/rust/upb/wire.rs index eaf53653a4..fe45558118 100644 --- a/rust/upb/wire.rs +++ b/rust/upb/wire.rs @@ -5,7 +5,7 @@ // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd -use crate::{upb_ExtensionRegistry, upb_MiniTable, Arena, RawArena, RawMessage}; +use super::{upb_ExtensionRegistry, upb_MiniTable, Arena, RawArena, RawMessage}; // LINT.IfChange(encode_status) #[repr(C)]