Add context to compiler error message

Changed `creates a temporary which is freed while still in use` to
`creates a temporary value which is freed while still in use`
This commit is contained in:
b4den 2022-10-20 15:44:25 +01:00
parent 53728ff751
commit c87567cbfa

View File

@ -1549,7 +1549,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
}
let mut err = self.temporary_value_borrowed_for_too_long(proper_span);
err.span_label(proper_span, "creates a temporary which is freed while still in use");
err.span_label(proper_span, "creates a temporary value which is freed while still in use");
err.span_label(drop_span, "temporary value is freed at the end of this statement");
match explanation {