mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
Add ConstraintLocator docs
This commit is contained in:
parent
d71410757d
commit
c79df8563b
@ -512,8 +512,15 @@ fn find_opaque_ty_constraints(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Ty<'_> {
|
||||
|
||||
struct ConstraintLocator<'tcx> {
|
||||
tcx: TyCtxt<'tcx>,
|
||||
|
||||
/// def_id of the opaque type whose defining uses are being checked
|
||||
def_id: DefId,
|
||||
// (first found type span, actual type)
|
||||
|
||||
/// as we walk the defining uses, we are checking that all of them
|
||||
/// define the same hidden type. This variable is set to `Some`
|
||||
/// with the first type that we find, and then later types are
|
||||
/// checked against it (we also carry the span of that first
|
||||
/// type).
|
||||
found: Option<(Span, Ty<'tcx>)>,
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user