Skip to content

Commit

Permalink
Some comment tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Nadrieril committed Sep 19, 2024
1 parent 4ed76ff commit 8dab216
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions frontend/exporter/src/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ pub mod rustc {
tcx: TyCtxt<'tcx>,
predicates: impl Iterator<Item = Predicate<'tcx>>,
) -> impl Iterator<Item = PolyTraitPredicate<'tcx>> {
// Warning: this skip_binder seems dangerous
let generics = self.skip_binder().trait_ref.args;
predicates
.filter_map(|pred| pred.as_trait_clause())
Expand Down Expand Up @@ -345,6 +346,7 @@ pub mod rustc {
});
}
for (item, binder) in candidate.pred.associated_items_trait_predicates(tcx) {
// Warning: this skip_binder seems dangerous
for (index, parent_pred) in binder.skip_binder().into_iter() {
let mut path = candidate.path.clone();
path.push(PathChunk::AssocItem {
Expand Down Expand Up @@ -620,8 +622,8 @@ impl<'tcx, S: UnderOwnerState<'tcx>> SInto<S, ImplExpr>
}
}

/// `impl_did`, susbts correctly `Self` from `clause` and (1) derive a
/// `Clause` and (2) resolve an `ImplExpr`.
/// Given a clause `clause` in the context of some impl block `impl_did`, susbts correctly `Self`
/// from `clause` and (1) derive a `Clause` and (2) resolve an `ImplExpr`.
#[cfg(feature = "rustc")]
pub fn super_clause_to_clause_and_impl_expr<'tcx, S: UnderOwnerState<'tcx>>(
s: &S,
Expand Down

0 comments on commit 8dab216

Please sign in to comment.