about summary refs log tree commit diff
path: root/tests/ui/impl-trait/issues/fuzzer-ice-issue-112201.rs
blob: a76ed7b0947452a373bbc13a789880e9e7d10a7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Regression test for #112201. This recursive call previously meant that
// we delay an error when checking opaques at the end of writeback but don't
// encounter that incorrect defining use during borrowck as it's in dead code.

pub fn wrap<T>(x: T) -> impl Sized {
    x
}

fn repeat_helper<T>(x: T) -> impl Sized {
    return x;
    repeat_helper(wrap(x))
    //~^ ERROR expected generic type parameter, found `impl Sized`
    //~| ERROR type parameter `T` is part of concrete type
}


fn main() {}