taint fcx on selection errors during unsizing
This commit is contained in:
parent
bf6f8a4d32
commit
93bb639ad6
5 changed files with 119 additions and 14 deletions
|
@ -666,7 +666,12 @@ impl<'f, 'tcx> Coerce<'f, 'tcx> {
|
|||
|
||||
// Dyn-compatibility violations or miscellaneous.
|
||||
Err(err) => {
|
||||
self.err_ctxt().report_selection_error(obligation.clone(), &obligation, &err);
|
||||
let guar = self.err_ctxt().report_selection_error(
|
||||
obligation.clone(),
|
||||
&obligation,
|
||||
&err,
|
||||
);
|
||||
self.fcx.set_tainted_by_errors(guar);
|
||||
// Treat this like an obligation and follow through
|
||||
// with the unsizing - the lack of a coercion should
|
||||
// be silent, as it causes a type mismatch later.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue