about summary refs log tree commit diff
path: root/compiler/rustc_borrowck/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-11-09 11:16:38 +0000
committerbors <bors@rust-lang.org>2021-11-09 11:16:38 +0000
commiteee8b9c7bafade55981d155dae71657f1cc55a22 (patch)
treec080e3bab0af37d20ea68fdb20ce15c2ed3e623b /compiler/rustc_borrowck/src
parent214cd1f228a463b59f73ee46c8ae3b30f85de253 (diff)
parentd863021521c57cec83da08f361ba13a3c3a2483a (diff)
downloadrust-eee8b9c7bafade55981d155dae71657f1cc55a22.tar.gz
rust-eee8b9c7bafade55981d155dae71657f1cc55a22.zip
Auto merge of #90700 - fee1-dead:select-returns-vec, r=davidtwco
Make `select_*` methods return `Vec` for `TraitEngine`

This reduces some complexity as an empty vec means no errors and non-empty vec means errors occurred.
Diffstat (limited to 'compiler/rustc_borrowck/src')
-rw-r--r--compiler/rustc_borrowck/src/diagnostics/bound_region_errors.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_borrowck/src/diagnostics/bound_region_errors.rs b/compiler/rustc_borrowck/src/diagnostics/bound_region_errors.rs
index 15309ccd8df..1bc9f8cf3cc 100644
--- a/compiler/rustc_borrowck/src/diagnostics/bound_region_errors.rs
+++ b/compiler/rustc_borrowck/src/diagnostics/bound_region_errors.rs
@@ -339,7 +339,7 @@ fn try_extract_error_from_fulfill_cx<'tcx>(
     // We generally shouldn't have errors here because the query was
     // already run, but there's no point using `delay_span_bug`
     // when we're going to emit an error here anyway.
-    let _errors = fulfill_cx.select_all_or_error(infcx).err().unwrap_or_else(Vec::new);
+    let _errors = fulfill_cx.select_all_or_error(infcx);
 
     let (sub_region, cause) = infcx.with_region_constraints(|region_constraints| {
         debug!("{:#?}", region_constraints);