diff options
Diffstat (limited to 'library/core/src/bstr.rs')
| -rw-r--r-- | library/core/src/bstr.rs | 48 |
1 files changed, 26 insertions, 22 deletions
diff --git a/library/core/src/bstr.rs b/library/core/src/bstr.rs index 11212761ead..9f20eb1a0e8 100644 --- a/library/core/src/bstr.rs +++ b/library/core/src/bstr.rs @@ -246,21 +246,23 @@ impl<'a> Default for &'a mut ByteStr { } } -#[unstable(feature = "bstr", issue = "134915")] -impl<'a, const N: usize> From<&'a [u8; N]> for &'a ByteStr { - #[inline] - fn from(s: &'a [u8; N]) -> Self { - ByteStr::from_bytes(s) - } -} - -#[unstable(feature = "bstr", issue = "134915")] -impl<'a> From<&'a [u8]> for &'a ByteStr { - #[inline] - fn from(s: &'a [u8]) -> Self { - ByteStr::from_bytes(s) - } -} +// Omitted due to inference failures +// +// #[unstable(feature = "bstr", issue = "134915")] +// impl<'a, const N: usize> From<&'a [u8; N]> for &'a ByteStr { +// #[inline] +// fn from(s: &'a [u8; N]) -> Self { +// ByteStr::from_bytes(s) +// } +// } +// +// #[unstable(feature = "bstr", issue = "134915")] +// impl<'a> From<&'a [u8]> for &'a ByteStr { +// #[inline] +// fn from(s: &'a [u8]) -> Self { +// ByteStr::from_bytes(s) +// } +// } // Omitted due to slice-from-array-issue-113238: // @@ -280,13 +282,15 @@ impl<'a> From<&'a [u8]> for &'a ByteStr { // } // } -#[unstable(feature = "bstr", issue = "134915")] -impl<'a> From<&'a str> for &'a ByteStr { - #[inline] - fn from(s: &'a str) -> Self { - ByteStr::from_bytes(s.as_bytes()) - } -} +// Omitted due to inference failures +// +// #[unstable(feature = "bstr", issue = "134915")] +// impl<'a> From<&'a str> for &'a ByteStr { +// #[inline] +// fn from(s: &'a str) -> Self { +// ByteStr::from_bytes(s.as_bytes()) +// } +// } #[unstable(feature = "bstr", issue = "134915")] impl hash::Hash for ByteStr { |
