Comment nits
This commit is contained in:
parent
439d066bcf
commit
540afe202f
@ -510,9 +510,11 @@ fn coerce_borrowed_pointer(
|
||||
success(adjustments, ty, obligations)
|
||||
}
|
||||
|
||||
// &[T; n] or &mut [T; n] -> &[T]
|
||||
// or &mut [T; n] -> &mut [T]
|
||||
// or &Concrete -> &Trait, etc.
|
||||
/// Performs [unsized coercion] by emulating a fulfillment loop on a
|
||||
/// `CoerceUnsized` goal until all `CoerceUnsized` and `Unsize` goals
|
||||
/// are successfully selected.
|
||||
///
|
||||
/// [unsized coercion](https://doc.rust-lang.org/reference/type-coercions.html#unsized-coercions)
|
||||
#[instrument(skip(self), level = "debug")]
|
||||
fn coerce_unsized(&self, mut source: Ty<'tcx>, mut target: Ty<'tcx>) -> CoerceResult<'tcx> {
|
||||
source = self.shallow_resolve(source);
|
||||
|
@ -618,8 +618,6 @@ fn self_type_matches_expected_vid(&self, self_ty: Ty<'tcx>, expected_vid: ty::Ty
|
||||
|
||||
match *self_ty.kind() {
|
||||
ty::Infer(ty::TyVar(found_vid)) => {
|
||||
// FIXME: consider using `sub_root_var` here so we
|
||||
// can see through subtyping.
|
||||
let found_vid = self.root_var(found_vid);
|
||||
debug!("self_type_matches_expected_vid - found_vid={:?}", found_vid);
|
||||
expected_vid == found_vid
|
||||
@ -634,8 +632,6 @@ pub(in super::super) fn obligations_for_self_ty<'b>(
|
||||
self_ty: ty::TyVid,
|
||||
) -> impl DoubleEndedIterator<Item = traits::PredicateObligation<'tcx>> + Captures<'tcx> + 'b
|
||||
{
|
||||
// FIXME: consider using `sub_root_var` here so we
|
||||
// can see through subtyping.
|
||||
let ty_var_root = self.root_var(self_ty);
|
||||
trace!("pending_obligations = {:#?}", self.fulfillment_cx.borrow().pending_obligations());
|
||||
|
||||
|
@ -2394,7 +2394,7 @@ fn rematch_impl(
|
||||
Ok(args) => args,
|
||||
Err(()) => {
|
||||
// FIXME: A rematch may fail when a candidate cache hit occurs
|
||||
// on thefreshened form of the trait predicate, but the match
|
||||
// on the freshened form of the trait predicate, but the match
|
||||
// fails for some reason that is not captured in the freshened
|
||||
// cache key. For example, equating an impl trait ref against
|
||||
// the placeholder trait ref may fail due the Generalizer relation
|
||||
|
@ -200,7 +200,9 @@ pub enum TyKind<I: Interner> {
|
||||
/// A tuple type. For example, `(i32, bool)`.
|
||||
Tuple(I::ListTy),
|
||||
|
||||
/// A projection or opaque type. Both of these types
|
||||
/// A projection, opaque type, weak type alias, or inherent associated type.
|
||||
/// All of these types are represented as pairs of def-id and args, and can
|
||||
/// be normalized, so they are grouped conceptually.
|
||||
Alias(AliasKind, I::AliasTy),
|
||||
|
||||
/// A type parameter; for example, `T` in `fn f<T>(x: T) {}`.
|
||||
|
Loading…
Reference in New Issue
Block a user