Add a protector test that demonstrates the base tag diagnostic

This commit is contained in:
Ben Kimock 2022-08-31 08:45:26 -04:00
parent 0da5f76a92
commit 3cfb9915fc
3 changed files with 46 additions and 1 deletions

View file

@ -332,7 +332,7 @@ impl<'span, 'history, 'ecx, 'mir, 'tcx> DiagnosticCx<'span, 'history, 'ecx, 'mir
// this allocation.
if self.history.base.0.tag() == tag {
Some((
format!("{:?} was created here, as a base tag for {:?}", tag, self.history.id),
format!("{:?} was created here, as the base tag for {:?}", tag, self.history.id),
self.history.base.1.data()
))
} else {