suggest to limit lifetime of temporary borrow with let

This commit is contained in:
csmoe 2020-01-14 21:22:19 +08:00
parent 148c1bca0f
commit b975601167

View File

@ -2578,7 +2578,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
};
span.push_span_label(original_span, message);
err.set_span(span);
err.set_span(span.clone());
format!("is not {}", trait_name)
} else {