diff options
| author | Nicholas Nethercote <nnethercote@mozilla.com> | 2018-06-07 08:31:57 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <nnethercote@mozilla.com> | 2018-06-07 20:25:05 +1000 |
| commit | cdfd9ca08800f7a69fb2a740ac31dbff13b94bce (patch) | |
| tree | 0d1138c259146a95665519c08e346037a619d775 /src/test/incremental/thinlto | |
| parent | c131bdcaff68d35f96e954baac4340206779335f (diff) | |
| download | rust-cdfd9ca08800f7a69fb2a740ac31dbff13b94bce.tar.gz rust-cdfd9ca08800f7a69fb2a740ac31dbff13b94bce.zip | |
Simplify `process_obligation`.
`process_predicates` returns a `Result<Option<Vec<PredicateObligation>>>`. `process_obligation` calls it and then fiddles with the output (using `map`, `map`, `into_iter`, `collect`) to produce a a `Result<Option<Vec<PendingPredicateObligation>>>`. This function is sufficiently hot that the fiddling is expensive. It's much better for `process_predicate` to directly return a `Result<Option<Vec<PendingPredicateObligation>>>` because `Ok(None)` accounts for ~90% of the results, and `Ok(vec![])` accounts for another ~5%.
Diffstat (limited to 'src/test/incremental/thinlto')
0 files changed, 0 insertions, 0 deletions
