Skip to content

Commit 6e33bc7

Browse files
committed
Address review comments
1 parent b1caa67 commit 6e33bc7

File tree

5 files changed

+9
-10
lines changed

5 files changed

+9
-10
lines changed

library/core/src/net/socket_addr.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use super::display_buffer::DisplayBuffer;
22
use crate::fmt::{self, Write};
3-
use crate::marker::Destruct;
43
use crate::net::{IpAddr, Ipv4Addr, Ipv6Addr};
54

65
/// An internet socket address, either IPv4 or IPv6.
@@ -614,7 +613,7 @@ impl const From<SocketAddrV6> for SocketAddr {
614613

615614
#[stable(feature = "addr_from_into_ip", since = "1.17.0")]
616615
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
617-
impl<I: ~const Into<IpAddr> + ~const Destruct> const From<(I, u16)> for SocketAddr {
616+
impl<I: ~const Into<IpAddr>> const From<(I, u16)> for SocketAddr {
618617
/// Converts a tuple struct (Into<[`IpAddr`]>, `u16`) into a [`SocketAddr`].
619618
///
620619
/// This conversion creates a [`SocketAddr::V4`] for an [`IpAddr::V4`]

library/core/src/result.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,6 @@
534534
#![stable(feature = "rust1", since = "1.0.0")]
535535

536536
use crate::iter::{self, FusedIterator, TrustedLen};
537-
use crate::marker::Destruct;
538537
use crate::ops::{self, ControlFlow, Deref, DerefMut};
539538
use crate::{convert, fmt, hint};
540539

@@ -1289,11 +1288,11 @@ impl<T, E> Result<T, E> {
12891288
/// ```
12901289
#[unstable(feature = "unwrap_infallible", reason = "newly added", issue = "61695")]
12911290
#[inline]
1291+
#[rustc_allow_const_fn_unstable(const_precise_live_drops)]
12921292
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
12931293
pub const fn into_ok(self) -> T
12941294
where
1295-
E: ~const Into<!> + ~const Destruct,
1296-
T: ~const Destruct,
1295+
E: ~const Into<!>,
12971296
{
12981297
match self {
12991298
Ok(x) => x,
@@ -1326,11 +1325,11 @@ impl<T, E> Result<T, E> {
13261325
/// ```
13271326
#[unstable(feature = "unwrap_infallible", reason = "newly added", issue = "61695")]
13281327
#[inline]
1328+
#[rustc_allow_const_fn_unstable(const_precise_live_drops)]
13291329
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
13301330
pub const fn into_err(self) -> E
13311331
where
1332-
T: ~const Into<!> + ~const Destruct,
1333-
E: ~const Destruct,
1332+
T: ~const Into<!>,
13341333
{
13351334
match self {
13361335
Ok(x) => x.into(),

tests/ui/consts/const-try.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
//@ check-pass
2+
//@ revisions: current next
3+
//@[next] compile-flags: -Znext-solver
24

35
// Demonstrates what's needed to make use of `?` in const contexts.
46

tests/ui/traits/const-traits/hir-const-check.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
//@ run-pass
2-
// @ compile-flags: -Znext-solver
1+
//@ check-pass
2+
//@ compile-flags: -Znext-solver
33

44
// Regression test for #69615.
55

tests/ui/traits/const-traits/trait-default-body-stability.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//@ run-pass
2-
// @ known-bug: #110395
32
//@ compile-flags: -Znext-solver
43
#![allow(incomplete_features)]
54
#![feature(staged_api)]

0 commit comments

Comments
 (0)