summaryrefslogtreecommitdiffstats
path: root/tests/ui/impl-trait/arg-position-impl-trait-too-long.rs
blob: 8ef9281c9d3d76d0df0b5e006c1f4355a406bfdc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
struct Header;
struct EntryMetadata;
struct Entry<A, B>(A, B);

trait Tr {
    type EncodedKey;
    type EncodedValue;
}

fn test<C: Tr, R>(
    // This APIT is long, however we shouldn't render the type name with a newline in it.
    y: impl FnOnce(
        &mut Header,
        &mut [EntryMetadata],
        &mut [Entry<C::EncodedKey, C::EncodedValue>]
    ) -> R,
) {
    let () = y;
    //~^ ERROR mismatched types
}

fn main() {}