about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorJonas Schievink <jonasschievink@gmail.com>2020-10-24 22:39:47 +0200
committerGitHub <noreply@github.com>2020-10-24 22:39:47 +0200
commit7428de1583b5ebee2e8b35f79ecdcf3590f0b9ea (patch)
tree4ab1c0c552a31c0db4fd6b5577e0279689788862 /compiler
parent4d72939af14b20a79232dbe4533875b15d264003 (diff)
parentf71e9ed7f1b88f303519dcd7c2cc69117ff95094 (diff)
downloadrust-7428de1583b5ebee2e8b35f79ecdcf3590f0b9ea.tar.gz
rust-7428de1583b5ebee2e8b35f79ecdcf3590f0b9ea.zip
Rollup merge of #77930 - estebank:ice-77919, r=eddyb
Do not ICE with TraitPredicates containing [type error]

Fix #77919.
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_trait_selection/src/traits/codegen.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/codegen.rs b/compiler/rustc_trait_selection/src/traits/codegen.rs
index 05e6c4804ff..3cb6ec86261 100644
--- a/compiler/rustc_trait_selection/src/traits/codegen.rs
+++ b/compiler/rustc_trait_selection/src/traits/codegen.rs
@@ -121,7 +121,10 @@ where
     // contains unbound type parameters. It could be a slight
     // optimization to stop iterating early.
     if let Err(errors) = fulfill_cx.select_all_or_error(infcx) {
-        bug!("Encountered errors `{:?}` resolving bounds after type-checking", errors);
+        infcx.tcx.sess.delay_span_bug(
+            rustc_span::DUMMY_SP,
+            &format!("Encountered errors `{:?}` resolving bounds after type-checking", errors),
+        );
     }
 
     let result = infcx.resolve_vars_if_possible(result);