Rollup merge of #128008 - weiznich:fix/121521, r=lcnr · model-checking/verify-rust-std@7ae76f0 (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Commit 7ae76f0
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 rust-lang#121521The result in not perfect yet, but at least the `Yeet` suggestion is not shown anymore. I would consider that as a minor improvement.
File tree
3 files changed
lines changed
3 files changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -165,6 +165,7 @@ | ||
165 | 165 | #![feature(const_unsafecell_get_mut)] |
166 | 166 | #![feature(const_waker)] |
167 | 167 | #![feature(coverage_attribute)] |
168 | +#![feature(do_not_recommend)] | |
168 | 169 | #![feature(duration_consts_float)] |
169 | 170 | #![feature(internal_impls_macro)] |
170 | 171 | #![feature(ip)] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -2507,6 +2507,7 @@ impl ops::FromResidual for Option { | ||
2507 | 2507 | } |
2508 | 2508 | } |
2509 | 2509 | |
2510 | +#[diagnostic::do_not_recommend] | |
2510 | 2511 | #[unstable(feature = "try_trait_v2_yeet", issue = "96374")] |
2511 | 2512 | impl<T> ops::FromResidual<ops::Yeet<()>> for Option<T> { |
2512 | 2513 | #[inline] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1990,7 +1990,7 @@ impl<T, E, F: From> ops::FromResidual<Result<convert::Infallible, E>> for Res | ||
1990 | 1990 | } |
1991 | 1991 | } |
1992 | 1992 | } |
1993 | - | |
1993 | +#[diagnostic::do_not_recommend] | |
1994 | 1994 | #[unstable(feature = "try_trait_v2_yeet", issue = "96374")] |
1995 | 1995 | impl<T, E, F: From<E>> ops::FromResidual<ops::Yeet<E>> for Result<T, F> { |
1996 | 1996 | #[inline] |