Cleanup: Rename 'db' variable to 'diag'

This commit is contained in:
Philipp Hansch
2020-04-17 08:08:00 +02:00
parent 8ae143fcd0
commit 870ae36f85
54 changed files with 302 additions and 299 deletions

View File

@@ -45,8 +45,8 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EmptyEnum {
let ty = cx.tcx.type_of(did);
let adt = ty.ty_adt_def().expect("already checked whether this is an enum");
if adt.variants.is_empty() {
span_lint_and_then(cx, EMPTY_ENUM, item.span, "enum with no variants", |db| {
db.span_help(
span_lint_and_then(cx, EMPTY_ENUM, item.span, "enum with no variants", |diag| {
diag.span_help(
item.span,
"consider using the uninhabited type `!` (never type) or a wrapper \
around it to introduce a type which can't be instantiated",