Skip to content

Commit d19c468

Browse files
committed
add docstrings and add issue to FIXMEs
1 parent e612f7a commit d19c468

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

Diff for: compiler/rustc_middle/src/mir/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2378,7 +2378,7 @@ impl<'tcx> Debug for Rvalue<'tcx> {
23782378
};
23792379
let mut struct_fmt = fmt.debug_struct(&name);
23802380

2381-
// FIXME: This should be a list of capture names/places
2381+
// FIXME(project-rfc-2229#48): This should be a list of capture names/places
23822382
if let Some(upvars) = tcx.upvars_mentioned(def_id) {
23832383
for (&var_id, place) in iter::zip(upvars.keys(), places) {
23842384
let var_name = tcx.hir().name(var_id);
@@ -2398,7 +2398,7 @@ impl<'tcx> Debug for Rvalue<'tcx> {
23982398
let name = format!("[generator@{:?}]", tcx.hir().span(hir_id));
23992399
let mut struct_fmt = fmt.debug_struct(&name);
24002400

2401-
// FIXME: This should be a list of capture names/places
2401+
// FIXME(project-rfc-2229#48): This should be a list of capture names/places
24022402
if let Some(upvars) = tcx.upvars_mentioned(def_id) {
24032403
for (&var_id, place) in iter::zip(upvars.keys(), places) {
24042404
let var_name = tcx.hir().name(var_id);

Diff for: compiler/rustc_mir/src/borrow_check/diagnostics/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -608,6 +608,7 @@ impl UseSpans<'_> {
608608
}
609609
}
610610

611+
/// Returns the span of `self`, in the case of a `ClosureUse` returns the `path_span`
611612
pub(super) fn var_or_use_path_span(self) -> Span {
612613
match self {
613614
UseSpans::ClosureUse { path_span: span, .. }
@@ -620,6 +621,7 @@ impl UseSpans<'_> {
620621
}
621622
}
622623

624+
/// Returns the span of `self`, in the case of a `ClosureUse` returns the `capture_kind_span`
623625
pub(super) fn var_or_use(self) -> Span {
624626
match self {
625627
UseSpans::ClosureUse { capture_kind_span: span, .. }

Diff for: compiler/rustc_mir/src/borrow_check/diagnostics/region_errors.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
385385

386386
diag.span_label(*span, message);
387387

388-
// FIXME: This should store a captured_place not a hir id
388+
// FIXME(project-rfc-2229#48): This should store a captured_place not a hir id
389389
if let ReturnConstraint::ClosureUpvar(upvar) = kind {
390390
let def_id = match self.regioncx.universal_regions().defining_ty {
391391
DefiningTy::Closure(def_id, _) => def_id,

0 commit comments

Comments
 (0)