diff --git a/protobuf/src/reflect/acc/v2/map.rs b/protobuf/src/reflect/acc/v2/map.rs index d65eda98b..c3f3af213 100644 --- a/protobuf/src/reflect/acc/v2/map.rs +++ b/protobuf/src/reflect/acc/v2/map.rs @@ -109,6 +109,9 @@ where } /// Make accessor for map field, new version +// This is only used in generated code. +// Rust compiler allows it, and we want to avoid exposing traits in public API. +#[allow(private_bounds)] pub fn make_map_simpler_accessor_new( name: &'static str, get_field: for<'a> fn(&'a M) -> &'a T,