// check-pass // Regression test for #37655. The problem was a false edge created by // coercion that wound up requiring that `'a` (in `split()`) outlive // `'b`, which shouldn't be necessary. #![allow(warnings)] trait SliceExt { type Item; fn get_me(&self, index: I) -> &I::Output where I: SliceIndex; } impl SliceExt for [T] { type Item = T; fn get_me(&self, index: I) -> &I::Output where I: SliceIndex { panic!() } } pub trait SliceIndex { type Output: ?Sized; } impl SliceIndex for usize { type Output = T; } fn foo<'a, 'b>(split: &'b [&'a [u8]]) -> &'a [u8] { split.get_me(0) } fn main() { }