diff options
| author | Josh Triplett <josh@joshtriplett.org> | 2025-01-12 12:27:24 +0200 | 
|---|---|---|
| committer | Josh Triplett <josh@joshtriplett.org> | 2025-01-12 12:27:24 +0200 | 
| commit | 22a4ec39fbb53fd39179961a19c643d600bbeebd (patch) | |
| tree | 8bd18fd93aaacb098ee6e9c6d89e786a0e5b1ffc /library/core/src | |
| parent | 76780fa10e9e449bdd68d773041f85a64303bb02 (diff) | |
| download | rust-22a4ec39fbb53fd39179961a19c643d600bbeebd.tar.gz rust-22a4ec39fbb53fd39179961a19c643d600bbeebd.zip  | |
Omit some more `From` impls to avoid inference failures
Diffstat (limited to 'library/core/src')
| -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 {  | 
