@@ -206,7 +206,7 @@ macro_rules! declare_error_trait {
206
206
/// containing an integer, the unexpected type is the integer and the
207
207
/// expected type is the string.
208
208
#[ cold]
209
- fn invalid_type( unexp: Unexpected , exp: & Expected ) -> Self {
209
+ fn invalid_type( unexp: Unexpected , exp: & dyn Expected ) -> Self {
210
210
Error :: custom( format_args!( "invalid type: {}, expected {}" , unexp, exp) )
211
211
}
212
212
@@ -224,7 +224,7 @@ macro_rules! declare_error_trait {
224
224
/// that is not valid UTF-8, the unexpected value is the bytes and the
225
225
/// expected value is a string.
226
226
#[ cold]
227
- fn invalid_value( unexp: Unexpected , exp: & Expected ) -> Self {
227
+ fn invalid_value( unexp: Unexpected , exp: & dyn Expected ) -> Self {
228
228
Error :: custom( format_args!( "invalid value: {}, expected {}" , unexp, exp) )
229
229
}
230
230
@@ -238,7 +238,7 @@ macro_rules! declare_error_trait {
238
238
/// expected. For example `exp` might say that a tuple of size 6 was
239
239
/// expected.
240
240
#[ cold]
241
- fn invalid_length( len: usize , exp: & Expected ) -> Self {
241
+ fn invalid_length( len: usize , exp: & dyn Expected ) -> Self {
242
242
Error :: custom( format_args!( "invalid length {}, expected {}" , len, exp) )
243
243
}
244
244
@@ -492,7 +492,7 @@ impl Expected for &str {
492
492
}
493
493
}
494
494
495
- impl Display for Expected + ' _ {
495
+ impl Display for dyn Expected + ' _ {
496
496
fn fmt ( & self , formatter : & mut fmt:: Formatter ) -> fmt:: Result {
497
497
Expected :: fmt ( self , formatter)
498
498
}
0 commit comments