Start using #[diagnostic::do_not_recommend] in the standard library
This commit starts using `#[diagnostic::do_not_recommend]` in the standard library to improve some error messages. In this case we just hide a certain nightly only impl as suggested in #121521
This commit is contained in:
@@ -165,6 +165,7 @@
|
||||
#![feature(const_unsafecell_get_mut)]
|
||||
#![feature(const_waker)]
|
||||
#![feature(coverage_attribute)]
|
||||
#![feature(do_not_recommend)]
|
||||
#![feature(duration_consts_float)]
|
||||
#![feature(internal_impls_macro)]
|
||||
#![feature(ip)]
|
||||
|
||||
@@ -2507,6 +2507,7 @@ impl<T> ops::FromResidual for Option<T> {
|
||||
}
|
||||
}
|
||||
|
||||
#[diagnostic::do_not_recommend]
|
||||
#[unstable(feature = "try_trait_v2_yeet", issue = "96374")]
|
||||
impl<T> ops::FromResidual<ops::Yeet<()>> for Option<T> {
|
||||
#[inline]
|
||||
|
||||
@@ -1990,7 +1990,7 @@ impl<T, E, F: From<E>> ops::FromResidual<Result<convert::Infallible, E>> for Res
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[diagnostic::do_not_recommend]
|
||||
#[unstable(feature = "try_trait_v2_yeet", issue = "96374")]
|
||||
impl<T, E, F: From<E>> ops::FromResidual<ops::Yeet<E>> for Result<T, F> {
|
||||
#[inline]
|
||||
|
||||
Reference in New Issue
Block a user