From 6df2c78e1c35e5dac6589f55db1e0bea6e443700 Mon Sep 17 00:00:00 2001 From: Ben Reeves Date: Sun, 28 Nov 2021 07:05:23 -0600 Subject: [PATCH] Address PR feedback --- compiler/rustc_typeck/src/collect.rs | 2 +- .../issue-88586-hr-self-outlives-in-trait-def.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/rustc_typeck/src/collect.rs b/compiler/rustc_typeck/src/collect.rs index 856c4972700..39fac12e297 100644 --- a/compiler/rustc_typeck/src/collect.rs +++ b/compiler/rustc_typeck/src/collect.rs @@ -2438,7 +2438,7 @@ fn predicates_from_bound<'tcx>( bound_vars: &'tcx ty::List, ) -> Vec<(ty::Predicate<'tcx>, Span)> { let mut bounds = Bounds::default(); - astconv.add_bounds(param_ty, std::array::IntoIter::new([bound]), &mut bounds, bound_vars); + astconv.add_bounds(param_ty, [bound].into_iter(), &mut bounds, bound_vars); bounds.predicates(astconv.tcx(), param_ty) } diff --git a/src/test/ui/higher-rank-trait-bounds/issue-88586-hr-self-outlives-in-trait-def.rs b/src/test/ui/higher-rank-trait-bounds/issue-88586-hr-self-outlives-in-trait-def.rs index 3f5202827ad..b50f56b03d9 100644 --- a/src/test/ui/higher-rank-trait-bounds/issue-88586-hr-self-outlives-in-trait-def.rs +++ b/src/test/ui/higher-rank-trait-bounds/issue-88586-hr-self-outlives-in-trait-def.rs @@ -1,7 +1,7 @@ // Regression test for #88586: a higher-ranked outlives bound on Self in a trait // definition caused an ICE when debug_assertions were enabled. // -// The error output is incidentally unhelpful; this should be improved. +// FIXME: The error output in the absence of the ICE is unhelpful; this should be improved. trait A where for<'a> Self: 'a //~^ ERROR the parameter type `Self` may not live long enough