diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2023-08-14 13:09:53 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2023-10-04 02:04:14 +0000 |
| commit | 91b9ffeab0f8c491c81cd976c0d23d947cd6d12f (patch) | |
| tree | 6b205f2c64d77221af8600edb9343968e05a49a4 /compiler/rustc_trait_selection/src/traits/mod.rs | |
| parent | 2817ece19c67a182c0b0aae402c0e57c8ed22dab (diff) | |
| download | rust-91b9ffeab0f8c491c81cd976c0d23d947cd6d12f.tar.gz rust-91b9ffeab0f8c491c81cd976c0d23d947cd6d12f.zip | |
Reorder fullfillment errors to keep more interesting ones first
In `report_fullfillment_errors` push back `T: Sized`, `T: WellFormed` and coercion errors to the end of the list. The pre-existing deduplication logic eliminates redundant errors better that way, keeping the resulting output with fewer errors than before, while also having more detail.
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits/mod.rs')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/mod.rs b/compiler/rustc_trait_selection/src/traits/mod.rs index 956f8e047d7..ab81d77a268 100644 --- a/compiler/rustc_trait_selection/src/traits/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/mod.rs @@ -204,7 +204,7 @@ fn do_normalize_predicates<'tcx>( let predicates = match fully_normalize(&infcx, cause, elaborated_env, predicates) { Ok(predicates) => predicates, Err(errors) => { - let reported = infcx.err_ctxt().report_fulfillment_errors(&errors); + let reported = infcx.err_ctxt().report_fulfillment_errors(errors); return Err(reported); } }; |
