diff --git a/support/mesh/mesh_protobuf/src/protofile/mod.rs b/support/mesh/mesh_protobuf/src/protofile/mod.rs index 24812e9cb2..d03009b2c7 100644 --- a/support/mesh/mesh_protobuf/src/protofile/mod.rs +++ b/support/mesh/mesh_protobuf/src/protofile/mod.rs @@ -113,6 +113,7 @@ pub struct FieldType<'a> { annotation: &'a str, } +#[cfg_attr(not(feature = "std"), expect(dead_code))] #[derive(Debug, Copy, Clone)] enum SequenceType<'a> { Optional, @@ -120,6 +121,7 @@ enum SequenceType<'a> { Map(&'a str), } +#[cfg_attr(not(feature = "std"), expect(dead_code))] #[derive(Debug, Copy, Clone)] enum FieldKind<'a> { Builtin(&'a str), @@ -291,6 +293,7 @@ impl<'a> FieldType<'a> { } /// A descriptor for a message field. +#[cfg_attr(not(feature = "std"), expect(dead_code))] #[derive(Debug, Copy, Clone)] pub struct FieldDescriptor<'a> { field_type: FieldType<'a>, @@ -317,6 +320,7 @@ impl<'a> FieldDescriptor<'a> { } /// A description of a protobuf `oneof`. +#[cfg_attr(not(feature = "std"), expect(dead_code))] #[derive(Debug, Copy, Clone)] pub struct OneofDescriptor<'a> { name: &'a str, @@ -332,6 +336,7 @@ impl<'a> OneofDescriptor<'a> { /// A message descriptor. #[derive(Debug, Copy, Clone)] +#[cfg_attr(not(feature = "std"), expect(dead_code))] pub struct MessageDescriptor<'a> { comment: &'a str, name: &'a str, diff --git a/support/mesh/mesh_protobuf/src/time.rs b/support/mesh/mesh_protobuf/src/time.rs index e7f34bb05d..90a832e5ce 100644 --- a/support/mesh/mesh_protobuf/src/time.rs +++ b/support/mesh/mesh_protobuf/src/time.rs @@ -18,6 +18,7 @@ use crate::table::DescribeTable; use crate::table::TableEncoder; use core::time::Duration; use mesh_protobuf::Protobuf; +#[cfg(feature = "std")] use thiserror::Error; const NANOS_PER_SEC: u32 = 1_000_000_000; @@ -66,6 +67,7 @@ impl From for Timestamp { } } +#[cfg(feature = "std")] #[derive(Debug, Error)] #[error("timestamp out of range for system time")] pub struct TimestampOutOfRange;