add docstrings and add issue to FIXMEs

This commit is contained in:
Chris Pardy
2021-04-28 21:53:59 -04:00
parent e612f7abfc
commit d19c46870f
3 changed files with 5 additions and 3 deletions

View File

@@ -608,6 +608,7 @@ impl UseSpans<'_> {
}
}
/// Returns the span of `self`, in the case of a `ClosureUse` returns the `path_span`
pub(super) fn var_or_use_path_span(self) -> Span {
match self {
UseSpans::ClosureUse { path_span: span, .. }
@@ -620,6 +621,7 @@ impl UseSpans<'_> {
}
}
/// Returns the span of `self`, in the case of a `ClosureUse` returns the `capture_kind_span`
pub(super) fn var_or_use(self) -> Span {
match self {
UseSpans::ClosureUse { capture_kind_span: span, .. }

View File

@@ -385,7 +385,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
diag.span_label(*span, message);
// FIXME: This should store a captured_place not a hir id
// FIXME(project-rfc-2229#48): This should store a captured_place not a hir id
if let ReturnConstraint::ClosureUpvar(upvar) = kind {
let def_id = match self.regioncx.universal_regions().defining_ty {
DefiningTy::Closure(def_id, _) => def_id,