mirror of https://github.com/rust-lang/rust.git
nit: docs
This commit is contained in:
parent
4b19a2c119
commit
0f9e414092
|
@ -1148,14 +1148,23 @@ impl<'tcx, T: IntoIterator> Binder<'tcx, T> {
|
|||
#[derive(HashStable, TypeFoldable, TypeVisitable, Lift)]
|
||||
pub struct AliasTy<'tcx> {
|
||||
/// The parameters of the associated or opaque item.
|
||||
///
|
||||
/// For a projection, these are the substitutions for the trait and the
|
||||
/// GAT substitutions, if there are any.
|
||||
///
|
||||
/// For RPIT the substitutions are for the generics of the function,
|
||||
/// while for TAIT it is used for the generic parameters of the alias.
|
||||
pub substs: SubstsRef<'tcx>,
|
||||
|
||||
/// The `DefId` of the `TraitItem` for the associated type `N` if this is a projection,
|
||||
/// or the `OpaqueType` item if this is an opaque.
|
||||
///
|
||||
/// Note that this is not the `DefId` of the `TraitRef` containing this
|
||||
/// associated type, which is in `tcx.associated_item(item_def_id).container`,
|
||||
/// aka. `tcx.parent(item_def_id).unwrap()`.
|
||||
/// During codegen, `tcx.type_of(def_id)` can be used to get the type of the
|
||||
/// underlying type if the type is an opaque.
|
||||
///
|
||||
/// Note that if this is an associated type, this is not the `DefId` of the
|
||||
/// `TraitRef` containing this associated type, which is in `tcx.associated_item(def_id).container`,
|
||||
/// aka. `tcx.parent(def_id)`.
|
||||
pub def_id: DefId,
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue