diff --git a/test_suite/tests/expand/de_enum.expanded.rs b/test_suite/tests/expand/de_enum.expanded.rs index 0207a912..0aa879e7 100644 --- a/test_suite/tests/expand/de_enum.expanded.rs +++ b/test_suite/tests/expand/de_enum.expanded.rs @@ -332,25 +332,6 @@ const _: () = { )), } } - fn visit_borrowed_str<__E>( - self, - __value: &'de str, - ) -> _serde::__private::Result - where - __E: _serde::de::Error, - { - match __value { - "Unit" => _serde::__private::Ok(__Field::__field0), - "Seq" => _serde::__private::Ok(__Field::__field1), - "Map" => _serde::__private::Ok(__Field::__field2), - "_Unit2" => _serde::__private::Ok(__Field::__field3), - "_Seq2" => _serde::__private::Ok(__Field::__field4), - "_Map2" => _serde::__private::Ok(__Field::__field5), - _ => _serde::__private::Err(_serde::de::Error::unknown_variant( - __value, VARIANTS, - )), - } - } fn visit_bytes<__E>( self, __value: &[u8], @@ -373,28 +354,6 @@ const _: () = { } } } - fn visit_borrowed_bytes<__E>( - self, - __value: &'de [u8], - ) -> _serde::__private::Result - where - __E: _serde::de::Error, - { - match __value { - b"Unit" => _serde::__private::Ok(__Field::__field0), - b"Seq" => _serde::__private::Ok(__Field::__field1), - b"Map" => _serde::__private::Ok(__Field::__field2), - b"_Unit2" => _serde::__private::Ok(__Field::__field3), - b"_Seq2" => _serde::__private::Ok(__Field::__field4), - b"_Map2" => _serde::__private::Ok(__Field::__field5), - _ => { - let __value = &_serde::__private::from_utf8_lossy(__value); - _serde::__private::Err(_serde::de::Error::unknown_variant( - __value, VARIANTS, - )) - } - } - } } impl<'de> _serde::Deserialize<'de> for __Field { #[inline] @@ -632,21 +591,6 @@ const _: () = { _ => _serde::__private::Ok(__Field::__ignore), } } - fn visit_borrowed_str<__E>( - self, - __value: &'de str, - ) -> _serde::__private::Result - where - __E: _serde::de::Error, - { - match __value { - "a" => _serde::__private::Ok(__Field::__field0), - "b" => _serde::__private::Ok(__Field::__field1), - "c" => _serde::__private::Ok(__Field::__field2), - "d" => _serde::__private::Ok(__Field::__field3), - _ => _serde::__private::Ok(__Field::__ignore), - } - } fn visit_bytes<__E>( self, __value: &[u8], @@ -662,21 +606,6 @@ const _: () = { _ => _serde::__private::Ok(__Field::__ignore), } } - fn visit_borrowed_bytes<__E>( - self, - __value: &'de [u8], - ) -> _serde::__private::Result - where - __E: _serde::de::Error, - { - match __value { - b"a" => _serde::__private::Ok(__Field::__field0), - b"b" => _serde::__private::Ok(__Field::__field1), - b"c" => _serde::__private::Ok(__Field::__field2), - b"d" => _serde::__private::Ok(__Field::__field3), - _ => _serde::__private::Ok(__Field::__ignore), - } - } } impl<'de> _serde::Deserialize<'de> for __Field { #[inline] @@ -1165,21 +1094,6 @@ const _: () = { _ => _serde::__private::Ok(__Field::__ignore), } } - fn visit_borrowed_str<__E>( - self, - __value: &'de str, - ) -> _serde::__private::Result - where - __E: _serde::de::Error, - { - match __value { - "a" => _serde::__private::Ok(__Field::__field0), - "b" => _serde::__private::Ok(__Field::__field1), - "c" => _serde::__private::Ok(__Field::__field2), - "d" => _serde::__private::Ok(__Field::__field3), - _ => _serde::__private::Ok(__Field::__ignore), - } - } fn visit_bytes<__E>( self, __value: &[u8], @@ -1195,21 +1109,6 @@ const _: () = { _ => _serde::__private::Ok(__Field::__ignore), } } - fn visit_borrowed_bytes<__E>( - self, - __value: &'de [u8], - ) -> _serde::__private::Result - where - __E: _serde::de::Error, - { - match __value { - b"a" => _serde::__private::Ok(__Field::__field0), - b"b" => _serde::__private::Ok(__Field::__field1), - b"c" => _serde::__private::Ok(__Field::__field2), - b"d" => _serde::__private::Ok(__Field::__field3), - _ => _serde::__private::Ok(__Field::__ignore), - } - } } impl<'de> _serde::Deserialize<'de> for __Field { #[inline] diff --git a/test_suite/tests/expand/default_ty_param.expanded.rs b/test_suite/tests/expand/default_ty_param.expanded.rs index f3de6dba..d24ce254 100644 --- a/test_suite/tests/expand/default_ty_param.expanded.rs +++ b/test_suite/tests/expand/default_ty_param.expanded.rs @@ -92,18 +92,6 @@ const _: () = { _ => _serde::__private::Ok(__Field::__ignore), } } - fn visit_borrowed_str<__E>( - self, - __value: &'de str, - ) -> _serde::__private::Result - where - __E: _serde::de::Error, - { - match __value { - "phantom" => _serde::__private::Ok(__Field::__field0), - _ => _serde::__private::Ok(__Field::__ignore), - } - } fn visit_bytes<__E>( self, __value: &[u8], @@ -116,18 +104,6 @@ const _: () = { _ => _serde::__private::Ok(__Field::__ignore), } } - fn visit_borrowed_bytes<__E>( - self, - __value: &'de [u8], - ) -> _serde::__private::Result - where - __E: _serde::de::Error, - { - match __value { - b"phantom" => _serde::__private::Ok(__Field::__field0), - _ => _serde::__private::Ok(__Field::__ignore), - } - } } impl<'de> _serde::Deserialize<'de> for __Field { #[inline] @@ -296,18 +272,6 @@ const _: () = { _ => _serde::__private::Ok(__Field::__ignore), } } - fn visit_borrowed_str<__E>( - self, - __value: &'de str, - ) -> _serde::__private::Result - where - __E: _serde::de::Error, - { - match __value { - "phantom" => _serde::__private::Ok(__Field::__field0), - _ => _serde::__private::Ok(__Field::__ignore), - } - } fn visit_bytes<__E>( self, __value: &[u8], @@ -320,18 +284,6 @@ const _: () = { _ => _serde::__private::Ok(__Field::__ignore), } } - fn visit_borrowed_bytes<__E>( - self, - __value: &'de [u8], - ) -> _serde::__private::Result - where - __E: _serde::de::Error, - { - match __value { - b"phantom" => _serde::__private::Ok(__Field::__field0), - _ => _serde::__private::Ok(__Field::__ignore), - } - } } impl<'de> _serde::Deserialize<'de> for __Field { #[inline] diff --git a/test_suite/tests/expand/generic_enum.expanded.rs b/test_suite/tests/expand/generic_enum.expanded.rs index 4d309d40..d2d8658d 100644 --- a/test_suite/tests/expand/generic_enum.expanded.rs +++ b/test_suite/tests/expand/generic_enum.expanded.rs @@ -174,23 +174,6 @@ const _: () = { )), } } - fn visit_borrowed_str<__E>( - self, - __value: &'de str, - ) -> _serde::__private::Result - where - __E: _serde::de::Error, - { - match __value { - "Unit" => _serde::__private::Ok(__Field::__field0), - "NewType" => _serde::__private::Ok(__Field::__field1), - "Seq" => _serde::__private::Ok(__Field::__field2), - "Map" => _serde::__private::Ok(__Field::__field3), - _ => _serde::__private::Err(_serde::de::Error::unknown_variant( - __value, VARIANTS, - )), - } - } fn visit_bytes<__E>( self, __value: &[u8], @@ -211,26 +194,6 @@ const _: () = { } } } - fn visit_borrowed_bytes<__E>( - self, - __value: &'de [u8], - ) -> _serde::__private::Result - where - __E: _serde::de::Error, - { - match __value { - b"Unit" => _serde::__private::Ok(__Field::__field0), - b"NewType" => _serde::__private::Ok(__Field::__field1), - b"Seq" => _serde::__private::Ok(__Field::__field2), - b"Map" => _serde::__private::Ok(__Field::__field3), - _ => { - let __value = &_serde::__private::from_utf8_lossy(__value); - _serde::__private::Err(_serde::de::Error::unknown_variant( - __value, VARIANTS, - )) - } - } - } } impl<'de> _serde::Deserialize<'de> for __Field { #[inline] @@ -410,19 +373,6 @@ const _: () = { _ => _serde::__private::Ok(__Field::__ignore), } } - fn visit_borrowed_str<__E>( - self, - __value: &'de str, - ) -> _serde::__private::Result - where - __E: _serde::de::Error, - { - match __value { - "x" => _serde::__private::Ok(__Field::__field0), - "y" => _serde::__private::Ok(__Field::__field1), - _ => _serde::__private::Ok(__Field::__ignore), - } - } fn visit_bytes<__E>( self, __value: &[u8], @@ -436,19 +386,6 @@ const _: () = { _ => _serde::__private::Ok(__Field::__ignore), } } - fn visit_borrowed_bytes<__E>( - self, - __value: &'de [u8], - ) -> _serde::__private::Result - where - __E: _serde::de::Error, - { - match __value { - b"x" => _serde::__private::Ok(__Field::__field0), - b"y" => _serde::__private::Ok(__Field::__field1), - _ => _serde::__private::Ok(__Field::__ignore), - } - } } impl<'de> _serde::Deserialize<'de> for __Field { #[inline] diff --git a/test_suite/tests/expand/generic_struct.expanded.rs b/test_suite/tests/expand/generic_struct.expanded.rs index fadecf6d..d57460c3 100644 --- a/test_suite/tests/expand/generic_struct.expanded.rs +++ b/test_suite/tests/expand/generic_struct.expanded.rs @@ -88,18 +88,6 @@ const _: () = { _ => _serde::__private::Ok(__Field::__ignore), } } - fn visit_borrowed_str<__E>( - self, - __value: &'de str, - ) -> _serde::__private::Result - where - __E: _serde::de::Error, - { - match __value { - "x" => _serde::__private::Ok(__Field::__field0), - _ => _serde::__private::Ok(__Field::__ignore), - } - } fn visit_bytes<__E>( self, __value: &[u8], @@ -112,18 +100,6 @@ const _: () = { _ => _serde::__private::Ok(__Field::__ignore), } } - fn visit_borrowed_bytes<__E>( - self, - __value: &'de [u8], - ) -> _serde::__private::Result - where - __E: _serde::de::Error, - { - match __value { - b"x" => _serde::__private::Ok(__Field::__field0), - _ => _serde::__private::Ok(__Field::__ignore), - } - } } impl<'de> _serde::Deserialize<'de> for __Field { #[inline] @@ -292,18 +268,6 @@ const _: () = { _ => _serde::__private::Ok(__Field::__ignore), } } - fn visit_borrowed_str<__E>( - self, - __value: &'de str, - ) -> _serde::__private::Result - where - __E: _serde::de::Error, - { - match __value { - "x" => _serde::__private::Ok(__Field::__field0), - _ => _serde::__private::Ok(__Field::__ignore), - } - } fn visit_bytes<__E>( self, __value: &[u8], @@ -316,18 +280,6 @@ const _: () = { _ => _serde::__private::Ok(__Field::__ignore), } } - fn visit_borrowed_bytes<__E>( - self, - __value: &'de [u8], - ) -> _serde::__private::Result - where - __E: _serde::de::Error, - { - match __value { - b"x" => _serde::__private::Ok(__Field::__field0), - _ => _serde::__private::Ok(__Field::__ignore), - } - } } impl<'de> _serde::Deserialize<'de> for __Field { #[inline] diff --git a/test_suite/tests/expand/lifetimes.expanded.rs b/test_suite/tests/expand/lifetimes.expanded.rs index 9a13fb50..f8ec1df7 100644 --- a/test_suite/tests/expand/lifetimes.expanded.rs +++ b/test_suite/tests/expand/lifetimes.expanded.rs @@ -151,23 +151,6 @@ const _: () = { )), } } - fn visit_borrowed_str<__E>( - self, - __value: &'de str, - ) -> _serde::__private::Result - where - __E: _serde::de::Error, - { - match __value { - "LifetimeSeq" => _serde::__private::Ok(__Field::__field0), - "NoLifetimeSeq" => _serde::__private::Ok(__Field::__field1), - "LifetimeMap" => _serde::__private::Ok(__Field::__field2), - "NoLifetimeMap" => _serde::__private::Ok(__Field::__field3), - _ => _serde::__private::Err(_serde::de::Error::unknown_variant( - __value, VARIANTS, - )), - } - } fn visit_bytes<__E>( self, __value: &[u8], @@ -188,26 +171,6 @@ const _: () = { } } } - fn visit_borrowed_bytes<__E>( - self, - __value: &'de [u8], - ) -> _serde::__private::Result - where - __E: _serde::de::Error, - { - match __value { - b"LifetimeSeq" => _serde::__private::Ok(__Field::__field0), - b"NoLifetimeSeq" => _serde::__private::Ok(__Field::__field1), - b"LifetimeMap" => _serde::__private::Ok(__Field::__field2), - b"NoLifetimeMap" => _serde::__private::Ok(__Field::__field3), - _ => { - let __value = &_serde::__private::from_utf8_lossy(__value); - _serde::__private::Err(_serde::de::Error::unknown_variant( - __value, VARIANTS, - )) - } - } - } } impl<'de> _serde::Deserialize<'de> for __Field { #[inline] @@ -296,18 +259,6 @@ const _: () = { _ => _serde::__private::Ok(__Field::__ignore), } } - fn visit_borrowed_str<__E>( - self, - __value: &'de str, - ) -> _serde::__private::Result - where - __E: _serde::de::Error, - { - match __value { - "a" => _serde::__private::Ok(__Field::__field0), - _ => _serde::__private::Ok(__Field::__ignore), - } - } fn visit_bytes<__E>( self, __value: &[u8], @@ -320,18 +271,6 @@ const _: () = { _ => _serde::__private::Ok(__Field::__ignore), } } - fn visit_borrowed_bytes<__E>( - self, - __value: &'de [u8], - ) -> _serde::__private::Result - where - __E: _serde::de::Error, - { - match __value { - b"a" => _serde::__private::Ok(__Field::__field0), - _ => _serde::__private::Ok(__Field::__ignore), - } - } } impl<'de> _serde::Deserialize<'de> for __Field { #[inline] @@ -504,18 +443,6 @@ const _: () = { _ => _serde::__private::Ok(__Field::__ignore), } } - fn visit_borrowed_str<__E>( - self, - __value: &'de str, - ) -> _serde::__private::Result - where - __E: _serde::de::Error, - { - match __value { - "a" => _serde::__private::Ok(__Field::__field0), - _ => _serde::__private::Ok(__Field::__ignore), - } - } fn visit_bytes<__E>( self, __value: &[u8], @@ -528,18 +455,6 @@ const _: () = { _ => _serde::__private::Ok(__Field::__ignore), } } - fn visit_borrowed_bytes<__E>( - self, - __value: &'de [u8], - ) -> _serde::__private::Result - where - __E: _serde::de::Error, - { - match __value { - b"a" => _serde::__private::Ok(__Field::__field0), - _ => _serde::__private::Ok(__Field::__ignore), - } - } } impl<'de> _serde::Deserialize<'de> for __Field { #[inline] diff --git a/test_suite/tests/expand/named_map.expanded.rs b/test_suite/tests/expand/named_map.expanded.rs index 6a93e6f4..1a621b57 100644 --- a/test_suite/tests/expand/named_map.expanded.rs +++ b/test_suite/tests/expand/named_map.expanded.rs @@ -117,20 +117,6 @@ const _: () = { _ => _serde::__private::Ok(__Field::__ignore), } } - fn visit_borrowed_str<__E>( - self, - __value: &'de str, - ) -> _serde::__private::Result - where - __E: _serde::de::Error, - { - match __value { - "a" => _serde::__private::Ok(__Field::__field0), - "b" => _serde::__private::Ok(__Field::__field1), - "c" => _serde::__private::Ok(__Field::__field2), - _ => _serde::__private::Ok(__Field::__ignore), - } - } fn visit_bytes<__E>( self, __value: &[u8], @@ -145,20 +131,6 @@ const _: () = { _ => _serde::__private::Ok(__Field::__ignore), } } - fn visit_borrowed_bytes<__E>( - self, - __value: &'de [u8], - ) -> _serde::__private::Result - where - __E: _serde::de::Error, - { - match __value { - b"a" => _serde::__private::Ok(__Field::__field0), - b"b" => _serde::__private::Ok(__Field::__field1), - b"c" => _serde::__private::Ok(__Field::__field2), - _ => _serde::__private::Ok(__Field::__ignore), - } - } } impl<'de> _serde::Deserialize<'de> for __Field { #[inline] @@ -429,20 +401,6 @@ const _: () = { _ => _serde::__private::Ok(__Field::__ignore), } } - fn visit_borrowed_str<__E>( - self, - __value: &'de str, - ) -> _serde::__private::Result - where - __E: _serde::de::Error, - { - match __value { - "a" => _serde::__private::Ok(__Field::__field0), - "b" => _serde::__private::Ok(__Field::__field1), - "c" => _serde::__private::Ok(__Field::__field2), - _ => _serde::__private::Ok(__Field::__ignore), - } - } fn visit_bytes<__E>( self, __value: &[u8], @@ -457,20 +415,6 @@ const _: () = { _ => _serde::__private::Ok(__Field::__ignore), } } - fn visit_borrowed_bytes<__E>( - self, - __value: &'de [u8], - ) -> _serde::__private::Result - where - __E: _serde::de::Error, - { - match __value { - b"a" => _serde::__private::Ok(__Field::__field0), - b"b" => _serde::__private::Ok(__Field::__field1), - b"c" => _serde::__private::Ok(__Field::__field2), - _ => _serde::__private::Ok(__Field::__ignore), - } - } } impl<'de> _serde::Deserialize<'de> for __Field { #[inline] diff --git a/test_suite/tests/expand/void.expanded.rs b/test_suite/tests/expand/void.expanded.rs index e1b3994e..65c3d2c6 100644 --- a/test_suite/tests/expand/void.expanded.rs +++ b/test_suite/tests/expand/void.expanded.rs @@ -64,19 +64,6 @@ const _: () = { )), } } - fn visit_borrowed_str<__E>( - self, - __value: &'de str, - ) -> _serde::__private::Result - where - __E: _serde::de::Error, - { - match __value { - _ => _serde::__private::Err(_serde::de::Error::unknown_variant( - __value, VARIANTS, - )), - } - } fn visit_bytes<__E>( self, __value: &[u8], @@ -93,22 +80,6 @@ const _: () = { } } } - fn visit_borrowed_bytes<__E>( - self, - __value: &'de [u8], - ) -> _serde::__private::Result - where - __E: _serde::de::Error, - { - match __value { - _ => { - let __value = &_serde::__private::from_utf8_lossy(__value); - _serde::__private::Err(_serde::de::Error::unknown_variant( - __value, VARIANTS, - )) - } - } - } } impl<'de> _serde::Deserialize<'de> for __Field { #[inline]