1
Fork 0

Prefer doc comments over //-comments in compiler

This commit is contained in:
Maybe Waffle 2022-11-27 11:15:06 +00:00
parent 0e9eee6811
commit 1d42936b18
83 changed files with 400 additions and 387 deletions

View file

@ -590,7 +590,7 @@ impl UseSpans<'_> {
}
}
// Add a span label to the arguments of the closure, if it exists.
/// Add a span label to the arguments of the closure, if it exists.
pub(super) fn args_span_label(self, err: &mut Diagnostic, message: impl Into<String>) {
if let UseSpans::ClosureUse { args_span, .. } = self {
err.span_label(args_span, message);
@ -628,7 +628,7 @@ impl UseSpans<'_> {
}
}
// Add a span label to the use of the captured variable, if it exists.
/// Add a span label to the use of the captured variable, if it exists.
pub(super) fn var_span_label(
self,
err: &mut Diagnostic,

View file

@ -83,7 +83,7 @@ mod type_check;
mod universal_regions;
mod used_muts;
// A public API provided for the Rust compiler consumers.
/// A public API provided for the Rust compiler consumers.
pub mod consumers;
use borrow_set::{BorrowData, BorrowSet};

View file

@ -121,8 +121,8 @@ pub(super) fn populate_access_facts<'a, 'tcx>(
}
}
// For every potentially drop()-touched region `region` in `local`'s type
// (`kind`), emit a Polonius `use_of_var_derefs_origin(local, origin)` fact.
/// For every potentially drop()-touched region `region` in `local`'s type
/// (`kind`), emit a Polonius `use_of_var_derefs_origin(local, origin)` fact.
pub(super) fn add_drop_of_var_derefs_origin<'tcx>(
typeck: &mut TypeChecker<'_, 'tcx>,
local: Local,