diff options
| author | bors <bors@rust-lang.org> | 2023-03-24 06:16:24 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-03-24 06:16:24 +0000 |
| commit | c763eceae349c1d827d9cfbf5df21ca40b21c861 (patch) | |
| tree | df8f56ba15d8be04f1ed1a37e30b8848b8b39b8f /compiler/rustc_trait_selection/src/solve/assembly.rs | |
| parent | 4c0f5008ce74563873cbd8574018dbe4906a5361 (diff) | |
| parent | 2cfcca629fe53f81ab312eeabb6d0efc5151a9bd (diff) | |
| download | rust-c763eceae349c1d827d9cfbf5df21ca40b21c861.tar.gz rust-c763eceae349c1d827d9cfbf5df21ca40b21c861.zip | |
Auto merge of #109552 - matthiaskrgr:rollup-03xwois, r=matthiaskrgr
Rollup of 5 pull requests Successful merges: - #109406 (Remove outdated comments) - #109433 (Return equal for two identical projections) - #109495 (Implement non-const `Destruct` trait in new solver) - #109519 (Link against libc++ on AIX) - #109550 (Make helper functions private in fn_ctxt/adjust_fulfillment_errors) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_trait_selection/src/solve/assembly.rs')
| -rw-r--r-- | compiler/rustc_trait_selection/src/solve/assembly.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/rustc_trait_selection/src/solve/assembly.rs b/compiler/rustc_trait_selection/src/solve/assembly.rs index 8cb09108e83..995fec78c40 100644 --- a/compiler/rustc_trait_selection/src/solve/assembly.rs +++ b/compiler/rustc_trait_selection/src/solve/assembly.rs @@ -212,6 +212,11 @@ pub(super) trait GoalKind<'tcx>: TypeFoldable<TyCtxt<'tcx>> + Copy + Eq { ecx: &mut EvalCtxt<'_, 'tcx>, goal: Goal<'tcx, Self>, ) -> QueryResult<'tcx>; + + fn consider_builtin_destruct_candidate( + ecx: &mut EvalCtxt<'_, 'tcx>, + goal: Goal<'tcx, Self>, + ) -> QueryResult<'tcx>; } impl<'tcx> EvalCtxt<'_, 'tcx> { @@ -340,6 +345,8 @@ impl<'tcx> EvalCtxt<'_, 'tcx> { G::consider_builtin_unsize_candidate(self, goal) } else if lang_items.discriminant_kind_trait() == Some(trait_def_id) { G::consider_builtin_discriminant_kind_candidate(self, goal) + } else if lang_items.destruct_trait() == Some(trait_def_id) { + G::consider_builtin_destruct_candidate(self, goal) } else { Err(NoSolution) }; |
