diff --git a/protobuf/src/coded_input_stream/input_source.rs b/protobuf/src/coded_input_stream/input_source.rs index 5f364755e..2b9010f7d 100644 --- a/protobuf/src/coded_input_stream/input_source.rs +++ b/protobuf/src/coded_input_stream/input_source.rs @@ -7,6 +7,7 @@ use crate::coded_input_stream::buf_read_or_reader::BufReadOrReader; #[derive(Debug)] pub(crate) enum InputSource<'a> { Read(BufReadOrReader<'a>), + #[allow(dead_code)] // Keep the field to clarify we logically hold the reference. Slice(&'a [u8]), #[cfg(feature = "bytes")] Bytes(&'a Bytes), diff --git a/protobuf/src/reflect/oneof/mod.rs b/protobuf/src/reflect/oneof/mod.rs index 6c33bd9d4..f355ed1ac 100644 --- a/protobuf/src/reflect/oneof/mod.rs +++ b/protobuf/src/reflect/oneof/mod.rs @@ -16,6 +16,7 @@ pub struct OneofDescriptor { } pub(crate) enum OneofDescriptorImplRef { + #[allow(dead_code)] Generated(&'static GeneratedOneofDescriptor), Dynamic, }