diff --git a/prost-types/src/lib.rs b/prost-types/src/lib.rs index bd627a71f..cee4d0d1e 100644 --- a/prost-types/src/lib.rs +++ b/prost-types/src/lib.rs @@ -41,6 +41,8 @@ pub use protobuf::*; #[cfg(feature = "any-v2")] pub use any_v2::ProstAny as Any; +#[cfg(feature = "any-v2")] +pub use protobuf::Any as AnyV1; // The Protobuf `Duration` and `Timestamp` types can't delegate to the standard library equivalents // because the Protobuf versions are signed. To make them easier to work with, `From` conversions diff --git a/tests/src/decode_error.rs b/tests/src/decode_error.rs index ff74240e7..804a31705 100644 --- a/tests/src/decode_error.rs +++ b/tests/src/decode_error.rs @@ -136,7 +136,7 @@ fn test_decode_error_invalid_string() { #[test] fn test_decode_error_any() { - use prost_types::{Any, Timestamp}; + use prost_types::{AnyV1 as Any, Timestamp}; let msg = Any { type_url: "non-existing-url".to_string(),