Rollup merge of #128008 - weiznich:fix/121521, r=lcnr · model-checking/verify-rust-std@7ae76f0

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#121521 The 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

Lines changed: 1 addition & 0 deletions

Original file line numberDiff line numberDiff line change

@@ -165,6 +165,7 @@

165165

#![feature(const_unsafecell_get_mut)]

166166

#![feature(const_waker)]

167167

#![feature(coverage_attribute)]

168+

#![feature(do_not_recommend)]

168169

#![feature(duration_consts_float)]

169170

#![feature(internal_impls_macro)]

170171

#![feature(ip)]

Lines changed: 1 addition & 0 deletions

Original file line numberDiff line numberDiff line change

@@ -2507,6 +2507,7 @@ impl<T> ops::FromResidual for Option<T> {

25072507

}

25082508

}

25092509
2510+

#[diagnostic::do_not_recommend]

25102511

#[unstable(feature = "try_trait_v2_yeet", issue = "96374")]

25112512

impl<T> ops::FromResidual<ops::Yeet<()>> for Option<T> {

25122513

#[inline]

Lines changed: 1 addition & 1 deletion

Original file line numberDiff line numberDiff line change

@@ -1990,7 +1990,7 @@ impl<T, E, F: From<E>> ops::FromResidual<Result<convert::Infallible, E>> for Res

19901990

}

19911991

}

19921992

}

1993-
1993+

#[diagnostic::do_not_recommend]

19941994

#[unstable(feature = "try_trait_v2_yeet", issue = "96374")]

19951995

impl<T, E, F: From<E>> ops::FromResidual<ops::Yeet<E>> for Result<T, F> {

19961996

#[inline]

0 commit comments