rust/tests/ui/impl-trait/arg-position-impl-trait-too-long.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
435 B
Rust
Raw Normal View History

2023-05-24 20:41:13 -05:00
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() {}