diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-04-11 12:06:56 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-11 12:06:56 +0200 |
| commit | 7ed15fb584a9cbb6888113a837433cc416f7c073 (patch) | |
| tree | 0e20716253fe0dff28d3d6a01572e4491fc0750f /compiler/rustc_trait_selection/src | |
| parent | 69fb8f63499ef8f677481d76d92ef91f019e6291 (diff) | |
| parent | 7f54d68f26783afb5b05ef1f49f655119313fcad (diff) | |
Rollup merge of #95876 - fee1-dead:note-const-drop, r=oli-obk
Add a note for unsatisfied `~const Drop` bounds r? ``@oli-obk``
Diffstat (limited to 'compiler/rustc_trait_selection/src')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs index ac98dd5801e..0cb70de2415 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs @@ -440,6 +440,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() { |
