blob: 3e4825d83b1fe6f1c76d6f630d9ad8d7f59fc4ae (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
// compile-flags: -Znormalize-docs
#![feature(type_alias_impl_trait)]
trait Allocator {
type Buffer;
}
struct DefaultAllocator;
// This unconstrained impl parameter causes the normalization of
// `<DefaultAllocator as Allocator>::Buffer` to be ambiguous,
// which caused an ICE with `-Znormalize-docs`.
impl<T> Allocator for DefaultAllocator {
//~^ ERROR: type annotations needed
type Buffer = ();
}
type A = impl Fn(<DefaultAllocator as Allocator>::Buffer);
fn foo() -> A {
|_| ()
}
fn main() {}
|