Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
eda2d0d
fix typos
ffengyu Jul 18, 2025
de3578a
Merge pull request #2511 from ffengyu/errata
tshepang Jul 18, 2025
b2e94bf
Add test demonstrating current beta `#[align]` name resolution regres…
jieyouxu Jul 17, 2025
69b71e4
Mitigate `#[align]` name resolution ambiguity regression with a rename
jieyouxu Jul 17, 2025
966fc57
`SmirCtxt` to `CompilerCtxt`, `SmirInterface` to `CompilerInterface`
makai410 Jul 15, 2025
7f22e88
`SmirContainer` to `Container`
makai410 Jul 15, 2025
ad0de06
use "helper" as a more descriptive name
makai410 Jul 15, 2025
08e3cf5
rename `ui-fulldeps/stable-mir`
makai410 Jul 15, 2025
9a37aab
rename `ui/stable-mir-print`
makai410 Jul 15, 2025
a1deaa7
`SmirError` to `Error`
makai410 Jul 15, 2025
9533871
Update docs in `rustc_public_bridge`
makai410 Jul 15, 2025
483877a
Update docs in `rustc_public`
makai410 Jul 15, 2025
4d79328
use `RustcPublic` instead of `StableMir`
makai410 Jul 15, 2025
20a7f72
fix `ui/rustc_public-ir-print` outputs
makai410 Jul 17, 2025
3fb1af3
enzyme submodule update
ZuseZ4 Jul 18, 2025
42d6b0d
make more builder functions generic
ZuseZ4 Jun 18, 2025
6340164
add -Zoffload=Enable flag behind -Zunstable-options, to enable gpu (h…
ZuseZ4 Jun 18, 2025
5958ebe
add various wrappers for gpu code generation
ZuseZ4 Jul 2, 2025
4a1a5a4
gpu host code generation
ZuseZ4 Jul 2, 2025
e2ab312
add gpu offload codegen host side test
ZuseZ4 Jul 18, 2025
c068599
add unstable-books doc for offload
ZuseZ4 Jul 18, 2025
196833c
Fix ide-assist: Deref transtive
A4-Tacks Jul 19, 2025
54d9743
Add Deref -> DerefMut for generate_mut_trait_impl
A4-Tacks Jul 19, 2025
2f46cde
minor: remove unused var
Young-Flash Jul 19, 2025
e49e107
Merge pull request #20258 from Young-Flash/remove_unused
lnicola Jul 19, 2025
bb46b8c
Allow selecting check tool `Mode` based on `Builder`
Kobzol Jul 11, 2025
245d2c9
Implement `check::Compiletest` using the `tool_check_step` macro
Kobzol Jul 11, 2025
fc74c22
Add approval blocking labels for new bors
Kobzol Jul 19, 2025
a6c7cea
Fix search of raw labels and lifetimes
ChayimFriedman2 Jul 19, 2025
8b6559b
Support `cfg_select!`
ChayimFriedman2 Jul 20, 2025
fdf8bdb
Remove the ptr_unique lang item
bjorn3 Jul 20, 2025
2eaba02
Merge pull request #20265 from ChayimFriedman2/cfg-select
lnicola Jul 20, 2025
fa0320d
Merge pull request #20255 from A4-Tacks/deref-intranstive
lnicola Jul 20, 2025
313dff1
Add test.
cjgillot Jul 4, 2025
7da6fd1
Lower extra lifetimes before normal generic params.
cjgillot Jul 4, 2025
3f9be40
fix handling of base address for TypeId allocations
RalfJung Jul 19, 2025
e68f5fe
Implement `check::RustAnalyzer` using the `tool_check_step` macro
Kobzol Jul 11, 2025
192efbb
clippy: make tests work in stage 1
RalfJung Jul 16, 2025
897d007
Prepare for merging from rust-lang/rust
invalid-email-address Jul 21, 2025
ad20b06
Merge ref '460259d14de0' from rust-lang/rust
invalid-email-address Jul 21, 2025
33d62b5
Merge pull request #20262 from ChayimFriedman2/goto-ref-raw
ShoyuVanilla Jul 21, 2025
4bbe74b
Merge pull request #20256 from A4-Tacks/gen-mut-trait-deref
ShoyuVanilla Jul 21, 2025
750c1e9
Preparing for merge from rust-lang/rust
lnicola Jul 21, 2025
2f14119
Merge from rust-lang/rust
lnicola Jul 21, 2025
1482809
Bump rustc crates
lnicola Jul 21, 2025
f263364
Bump rustc-literal-escaper
lnicola Jul 21, 2025
2050358
Revert "Bump rustc-literal-escaper"
lnicola Jul 21, 2025
da90db7
Downgrade ra-ap-rustc_parse_format
lnicola Jul 21, 2025
8f67bcf
Merge pull request #20268 from lnicola/sync-from-rust
lnicola Jul 21, 2025
1fd0697
Remove Retag for Unique
bjorn3 Jul 21, 2025
79e3c7d
fix some typos
tshepang Jul 21, 2025
4a45ab5
Merge pull request #2513 from rust-lang/tshepang/typos
tshepang Jul 21, 2025
74ba9cb
Don't use another main test file as auxiliary
jieyouxu Jul 21, 2025
62e3a05
Merge pull request #2512 from rust-lang/rustc-pull
tshepang Jul 21, 2025
3c76e3d
Constify Try, From, TryFrom
Randl Jul 21, 2025
c193f30
opt-dist: make `artifact-dir` an absolute path for `opt-dist local`
ognevny Jul 21, 2025
5e3eb25
Rollup merge of #142097 - ZuseZ4:offload-host1, r=oli-obk
jieyouxu Jul 21, 2025
a99f3af
Rollup merge of #143430 - cjgillot:extra-lifetime-swap, r=oli-obk
jieyouxu Jul 21, 2025
1f8b531
Rollup merge of #143768 - Randl:const-try, r=oli-obk
jieyouxu Jul 21, 2025
38efe38
Rollup merge of #143816 - Kobzol:compiletest-check-macro, r=jieyouxu
jieyouxu Jul 21, 2025
2e0748b
Rollup merge of #143985 - makai410:rp-rename, r=oli-obk
jieyouxu Jul 21, 2025
a3ab807
Rollup merge of #144027 - RalfJung:clippy, r=Mark-Simulacrum
jieyouxu Jul 21, 2025
ef4a7fb
Rollup merge of #144080 - jieyouxu:realign, r=BoxyUwU
jieyouxu Jul 21, 2025
0fd009f
Rollup merge of #144176 - Kobzol:bors-labels-blocking, r=oli-obk
jieyouxu Jul 21, 2025
9e9399f
Rollup merge of #144187 - RalfJung:type-id-base-addr, r=oli-obk
jieyouxu Jul 21, 2025
551cef9
Rollup merge of #144212 - bjorn3:remove_unique_lang_item, r=oli-obk
jieyouxu Jul 21, 2025
05f80f7
Rollup merge of #144243 - lnicola:sync-from-ra, r=lnicola
jieyouxu Jul 21, 2025
55a477e
Rollup merge of #144246 - jieyouxu:no-dual-test, r=lqd,RalfJung
jieyouxu Jul 21, 2025
43fa3f5
Rollup merge of #144251 - tshepang:rdg-sync, r=jieyouxu
jieyouxu Jul 21, 2025
6628a4a
Rollup merge of #144254 - ognevny:opt-dist-artifact-dir, r=Kobzol
jieyouxu Jul 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Constify Try, From, TryFrom
  • Loading branch information
Randl committed Jul 21, 2025
commit 3c76e3d0026ea9904358b1614bbd9c4f8b7cedf5
3 changes: 2 additions & 1 deletion library/core/src/array/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ impl Error for TryFromSliceError {
}

#[stable(feature = "try_from_slice_error", since = "1.36.0")]
impl From<Infallible> for TryFromSliceError {
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
impl const From<Infallible> for TryFromSliceError {
fn from(x: Infallible) -> TryFromSliceError {
match x {}
}
Expand Down
3 changes: 2 additions & 1 deletion library/core/src/ascii/ascii_char.rs
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,8 @@ macro_rules! into_int_impl {
($($ty:ty)*) => {
$(
#[unstable(feature = "ascii_char", issue = "110998")]
impl From<AsciiChar> for $ty {
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
impl const From<AsciiChar> for $ty {
#[inline]
fn from(chr: AsciiChar) -> $ty {
chr as u8 as $ty
Expand Down
15 changes: 10 additions & 5 deletions library/core/src/char/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ pub(super) const unsafe fn from_u32_unchecked(i: u32) -> char {
}

#[stable(feature = "char_convert", since = "1.13.0")]
impl From<char> for u32 {
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
impl const From<char> for u32 {
/// Converts a [`char`] into a [`u32`].
///
/// # Examples
Expand All @@ -53,7 +54,8 @@ impl From<char> for u32 {
}

#[stable(feature = "more_char_conversions", since = "1.51.0")]
impl From<char> for u64 {
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
impl const From<char> for u64 {
/// Converts a [`char`] into a [`u64`].
///
/// # Examples
Expand All @@ -72,7 +74,8 @@ impl From<char> for u64 {
}

#[stable(feature = "more_char_conversions", since = "1.51.0")]
impl From<char> for u128 {
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
impl const From<char> for u128 {
/// Converts a [`char`] into a [`u128`].
///
/// # Examples
Expand Down Expand Up @@ -157,7 +160,8 @@ impl TryFrom<char> for u16 {
/// for a superset of Windows-1252 that fills the remaining blanks with corresponding
/// C0 and C1 control codes.
#[stable(feature = "char_convert", since = "1.13.0")]
impl From<u8> for char {
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
impl const From<u8> for char {
/// Converts a [`u8`] into a [`char`].
///
/// # Examples
Expand Down Expand Up @@ -247,7 +251,8 @@ const fn char_try_from_u32(i: u32) -> Result<char, CharTryFromError> {
}

#[stable(feature = "try_from", since = "1.34.0")]
impl TryFrom<u32> for char {
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
impl const TryFrom<u32> for char {
type Error = CharTryFromError;

#[inline]
Expand Down
40 changes: 27 additions & 13 deletions library/core/src/convert/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ pub const fn identity<T>(x: T) -> T {
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_diagnostic_item = "AsRef"]
#[const_trait]
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
pub trait AsRef<T: PointeeSized>: PointeeSized {
/// Converts this type into a shared reference of the (usually inferred) input type.
#[stable(feature = "rust1", since = "1.0.0")]
Expand Down Expand Up @@ -367,6 +369,8 @@ pub trait AsRef<T: PointeeSized>: PointeeSized {
/// `&mut Vec<u8>`, for example, is the better choice (callers need to pass the correct type then).
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_diagnostic_item = "AsMut"]
#[const_trait]
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
pub trait AsMut<T: PointeeSized>: PointeeSized {
/// Converts this type into a mutable reference of the (usually inferred) input type.
#[stable(feature = "rust1", since = "1.0.0")]
Expand Down Expand Up @@ -710,9 +714,10 @@ pub trait TryFrom<T>: Sized {

// As lifts over &
#[stable(feature = "rust1", since = "1.0.0")]
impl<T: PointeeSized, U: PointeeSized> AsRef<U> for &T
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
impl<T: PointeeSized, U: PointeeSized> const AsRef<U> for &T
where
T: AsRef<U>,
T: ~const AsRef<U>,
{
#[inline]
fn as_ref(&self) -> &U {
Expand All @@ -722,9 +727,10 @@ where

// As lifts over &mut
#[stable(feature = "rust1", since = "1.0.0")]
impl<T: PointeeSized, U: PointeeSized> AsRef<U> for &mut T
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
impl<T: PointeeSized, U: PointeeSized> const AsRef<U> for &mut T
where
T: AsRef<U>,
T: ~const AsRef<U>,
{
#[inline]
fn as_ref(&self) -> &U {
Expand All @@ -742,9 +748,10 @@ where

// AsMut lifts over &mut
#[stable(feature = "rust1", since = "1.0.0")]
impl<T: PointeeSized, U: PointeeSized> AsMut<U> for &mut T
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
impl<T: PointeeSized, U: PointeeSized> const AsMut<U> for &mut T
where
T: AsMut<U>,
T: ~const AsMut<U>,
{
#[inline]
fn as_mut(&mut self) -> &mut U {
Expand Down Expand Up @@ -840,31 +847,35 @@ where
////////////////////////////////////////////////////////////////////////////////

#[stable(feature = "rust1", since = "1.0.0")]
impl<T> AsRef<[T]> for [T] {
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
impl<T> const AsRef<[T]> for [T] {
#[inline(always)]
fn as_ref(&self) -> &[T] {
self
}
}

#[stable(feature = "rust1", since = "1.0.0")]
impl<T> AsMut<[T]> for [T] {
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
impl<T> const AsMut<[T]> for [T] {
#[inline(always)]
fn as_mut(&mut self) -> &mut [T] {
self
}
}

#[stable(feature = "rust1", since = "1.0.0")]
impl AsRef<str> for str {
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
impl const AsRef<str> for str {
#[inline(always)]
fn as_ref(&self) -> &str {
self
}
}

#[stable(feature = "as_mut_str_for_str", since = "1.51.0")]
impl AsMut<str> for str {
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
impl const AsMut<str> for str {
#[inline(always)]
fn as_mut(&mut self) -> &mut str {
self
Expand Down Expand Up @@ -925,7 +936,8 @@ impl AsMut<str> for str {
pub enum Infallible {}

#[stable(feature = "convert_infallible", since = "1.34.0")]
impl Clone for Infallible {
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
impl const Clone for Infallible {
fn clone(&self) -> Infallible {
match *self {}
}
Expand Down Expand Up @@ -953,7 +965,8 @@ impl Error for Infallible {
}

#[stable(feature = "convert_infallible", since = "1.34.0")]
impl PartialEq for Infallible {
#[rustc_const_unstable(feature = "const_cmp", issue = "143800")]
impl const PartialEq for Infallible {
fn eq(&self, _: &Infallible) -> bool {
match *self {}
}
Expand All @@ -977,7 +990,8 @@ impl Ord for Infallible {
}

#[stable(feature = "convert_infallible", since = "1.34.0")]
impl From<!> for Infallible {
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
impl const From<!> for Infallible {
#[inline]
fn from(x: !) -> Self {
x
Expand Down
24 changes: 16 additions & 8 deletions library/core/src/convert/num.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ macro_rules! impl_from {
};
($Small:ty => $Large:ty, #[$attr:meta], $doc:expr $(,)?) => {
#[$attr]
impl From<$Small> for $Large {
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
impl const From<$Small> for $Large {
// Rustdocs on the impl block show a "[+] show undocumented items" toggle.
// Rustdocs on functions do not.
#[doc = $doc]
Expand Down Expand Up @@ -200,7 +201,8 @@ macro_rules! impl_float_from_bool {
)?
) => {
#[stable(feature = "float_from_bool", since = "1.68.0")]
impl From<bool> for $float {
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
impl const From<bool> for $float {
#[doc = concat!("Converts a [`bool`] to [`", stringify!($float),"`] losslessly.")]
/// The resulting value is positive `0.0` for `false` and `1.0` for `true` values.
///
Expand Down Expand Up @@ -250,7 +252,8 @@ impl_float_from_bool!(
macro_rules! impl_try_from_unbounded {
($source:ty => $($target:ty),+) => {$(
#[stable(feature = "try_from", since = "1.34.0")]
impl TryFrom<$source> for $target {
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
impl const TryFrom<$source> for $target {
type Error = TryFromIntError;

/// Tries to create the target number type from a source
Expand All @@ -268,7 +271,8 @@ macro_rules! impl_try_from_unbounded {
macro_rules! impl_try_from_lower_bounded {
($source:ty => $($target:ty),+) => {$(
#[stable(feature = "try_from", since = "1.34.0")]
impl TryFrom<$source> for $target {
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
impl const TryFrom<$source> for $target {
type Error = TryFromIntError;

/// Tries to create the target number type from a source
Expand All @@ -290,7 +294,8 @@ macro_rules! impl_try_from_lower_bounded {
macro_rules! impl_try_from_upper_bounded {
($source:ty => $($target:ty),+) => {$(
#[stable(feature = "try_from", since = "1.34.0")]
impl TryFrom<$source> for $target {
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
impl const TryFrom<$source> for $target {
type Error = TryFromIntError;

/// Tries to create the target number type from a source
Expand All @@ -312,7 +317,8 @@ macro_rules! impl_try_from_upper_bounded {
macro_rules! impl_try_from_both_bounded {
($source:ty => $($target:ty),+) => {$(
#[stable(feature = "try_from", since = "1.34.0")]
impl TryFrom<$source> for $target {
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
impl const TryFrom<$source> for $target {
type Error = TryFromIntError;

/// Tries to create the target number type from a source
Expand Down Expand Up @@ -450,7 +456,8 @@ use crate::num::NonZero;
macro_rules! impl_nonzero_int_from_nonzero_int {
($Small:ty => $Large:ty) => {
#[stable(feature = "nz_int_conv", since = "1.41.0")]
impl From<NonZero<$Small>> for NonZero<$Large> {
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
impl const From<NonZero<$Small>> for NonZero<$Large> {
// Rustdocs on the impl block show a "[+] show undocumented items" toggle.
// Rustdocs on functions do not.
#[doc = concat!("Converts <code>[NonZero]\\<[", stringify!($Small), "]></code> ")]
Expand Down Expand Up @@ -540,7 +547,8 @@ impl_nonzero_int_try_from_int!(isize);
macro_rules! impl_nonzero_int_try_from_nonzero_int {
($source:ty => $($target:ty),+) => {$(
#[stable(feature = "nzint_try_from_nzint_conv", since = "1.49.0")]
impl TryFrom<NonZero<$source>> for NonZero<$target> {
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
impl const TryFrom<NonZero<$source>> for NonZero<$target> {
type Error = TryFromIntError;

// Rustdocs on the impl block show a "[+] show undocumented items" toggle.
Expand Down
36 changes: 24 additions & 12 deletions library/core/src/net/ip_addr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1089,7 +1089,8 @@ impl fmt::Debug for IpAddr {
}

#[stable(feature = "ip_from_ip", since = "1.16.0")]
impl From<Ipv4Addr> for IpAddr {
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
impl const From<Ipv4Addr> for IpAddr {
/// Copies this address to a new `IpAddr::V4`.
///
/// # Examples
Expand All @@ -1111,7 +1112,8 @@ impl From<Ipv4Addr> for IpAddr {
}

#[stable(feature = "ip_from_ip", since = "1.16.0")]
impl From<Ipv6Addr> for IpAddr {
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
impl const From<Ipv6Addr> for IpAddr {
/// Copies this address to a new `IpAddr::V6`.
///
/// # Examples
Expand Down Expand Up @@ -1221,7 +1223,8 @@ impl Ord for Ipv4Addr {
}

#[stable(feature = "ip_u32", since = "1.1.0")]
impl From<Ipv4Addr> for u32 {
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
impl const From<Ipv4Addr> for u32 {
/// Uses [`Ipv4Addr::to_bits`] to convert an IPv4 address to a host byte order `u32`.
#[inline]
fn from(ip: Ipv4Addr) -> u32 {
Expand All @@ -1230,7 +1233,8 @@ impl From<Ipv4Addr> for u32 {
}

#[stable(feature = "ip_u32", since = "1.1.0")]
impl From<u32> for Ipv4Addr {
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
impl const From<u32> for Ipv4Addr {
/// Uses [`Ipv4Addr::from_bits`] to convert a host byte order `u32` into an IPv4 address.
#[inline]
fn from(ip: u32) -> Ipv4Addr {
Expand All @@ -1239,7 +1243,8 @@ impl From<u32> for Ipv4Addr {
}

#[stable(feature = "from_slice_v4", since = "1.9.0")]
impl From<[u8; 4]> for Ipv4Addr {
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
impl const From<[u8; 4]> for Ipv4Addr {
/// Creates an `Ipv4Addr` from a four element byte array.
///
/// # Examples
Expand All @@ -1257,7 +1262,8 @@ impl From<[u8; 4]> for Ipv4Addr {
}

#[stable(feature = "ip_from_slice", since = "1.17.0")]
impl From<[u8; 4]> for IpAddr {
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
impl const From<[u8; 4]> for IpAddr {
/// Creates an `IpAddr::V4` from a four element byte array.
///
/// # Examples
Expand Down Expand Up @@ -2211,15 +2217,17 @@ impl Ord for Ipv6Addr {
}

#[stable(feature = "i128", since = "1.26.0")]
impl From<Ipv6Addr> for u128 {
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
impl const From<Ipv6Addr> for u128 {
/// Uses [`Ipv6Addr::to_bits`] to convert an IPv6 address to a host byte order `u128`.
#[inline]
fn from(ip: Ipv6Addr) -> u128 {
ip.to_bits()
}
}
#[stable(feature = "i128", since = "1.26.0")]
impl From<u128> for Ipv6Addr {
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
impl const From<u128> for Ipv6Addr {
/// Uses [`Ipv6Addr::from_bits`] to convert a host byte order `u128` to an IPv6 address.
#[inline]
fn from(ip: u128) -> Ipv6Addr {
Expand All @@ -2228,7 +2236,8 @@ impl From<u128> for Ipv6Addr {
}

#[stable(feature = "ipv6_from_octets", since = "1.9.0")]
impl From<[u8; 16]> for Ipv6Addr {
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
impl const From<[u8; 16]> for Ipv6Addr {
/// Creates an `Ipv6Addr` from a sixteen element byte array.
///
/// # Examples
Expand All @@ -2255,7 +2264,8 @@ impl From<[u8; 16]> for Ipv6Addr {
}

#[stable(feature = "ipv6_from_segments", since = "1.16.0")]
impl From<[u16; 8]> for Ipv6Addr {
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
impl const From<[u16; 8]> for Ipv6Addr {
/// Creates an `Ipv6Addr` from an eight element 16-bit array.
///
/// # Examples
Expand Down Expand Up @@ -2283,7 +2293,8 @@ impl From<[u16; 8]> for Ipv6Addr {
}

#[stable(feature = "ip_from_slice", since = "1.17.0")]
impl From<[u8; 16]> for IpAddr {
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
impl const From<[u8; 16]> for IpAddr {
/// Creates an `IpAddr::V6` from a sixteen element byte array.
///
/// # Examples
Expand All @@ -2310,7 +2321,8 @@ impl From<[u8; 16]> for IpAddr {
}

#[stable(feature = "ip_from_slice", since = "1.17.0")]
impl From<[u16; 8]> for IpAddr {
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
impl const From<[u16; 8]> for IpAddr {
/// Creates an `IpAddr::V6` from an eight element 16-bit array.
///
/// # Examples
Expand Down
Loading
Loading