about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src/traits
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2023-11-25 17:40:52 +0000
committerMichael Goulet <michael@errs.io>2023-11-25 17:40:52 +0000
commit1279f70bf43c7f807abdedf818ca9680f0e9676f (patch)
treeef6b02c72086cb88ed1552d2239833f33b8af42e /compiler/rustc_trait_selection/src/traits
parentfe3038f263349190f02491d7467198e17ffb0858 (diff)
downloadrust-1279f70bf43c7f807abdedf818ca9680f0e9676f.tar.gz
rust-1279f70bf43c7f807abdedf818ca9680f0e9676f.zip
Don't ICE when encountering placeholders in implied bounds computation
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits')
-rw-r--r--compiler/rustc_trait_selection/src/traits/query/type_op/implied_outlives_bounds.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/query/type_op/implied_outlives_bounds.rs b/compiler/rustc_trait_selection/src/traits/query/type_op/implied_outlives_bounds.rs
index 94d6b15fe43..56844f39478 100644
--- a/compiler/rustc_trait_selection/src/traits/query/type_op/implied_outlives_bounds.rs
+++ b/compiler/rustc_trait_selection/src/traits/query/type_op/implied_outlives_bounds.rs
@@ -207,8 +207,10 @@ fn implied_bounds_from_components<'tcx>(
                 Component::Region(r) => Some(OutlivesBound::RegionSubRegion(sub_region, r)),
                 Component::Param(p) => Some(OutlivesBound::RegionSubParam(sub_region, p)),
                 Component::Alias(p) => Some(OutlivesBound::RegionSubAlias(sub_region, p)),
-                Component::Placeholder(_) => {
-                    unimplemented!("Shouldn't expect a placeholder type in implied bounds (yet)")
+                Component::Placeholder(_p) => {
+                    // FIXME(non_lifetime_binders): Placeholders don't currently
+                    // imply anything for outlives, though they could easily.
+                    None
                 }
                 Component::EscapingAlias(_) =>
                 // If the projection has escaping regions, don't