Add a note for unsatisfied ~const Drop
bounds
This commit is contained in:
parent
e745b4ddbd
commit
7f54d68f26
3 changed files with 33 additions and 17 deletions
|
@ -439,6 +439,13 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
|
|||
}
|
||||
}
|
||||
|
||||
if Some(trait_ref.def_id()) == tcx.lang_items().drop_trait()
|
||||
&& predicate_is_const
|
||||
{
|
||||
err.note("`~const Drop` was renamed to `~const Destruct`");
|
||||
err.note("See <https://github.com/rust-lang/rust/pull/94901> for more details");
|
||||
}
|
||||
|
||||
let explanation = if let ObligationCauseCode::MainFunctionType =
|
||||
obligation.cause.code()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue