]> git.proxmox.com Git - rustc.git/blame - src/test/ui/type-alias-impl-trait/issue-74244.rs
New upstream version 1.52.0~beta.3+dfsg1
[rustc.git] / src / test / ui / type-alias-impl-trait / issue-74244.rs
CommitLineData
6a06907d
XL
1// revisions: min_tait full_tait
2#![feature(min_type_alias_impl_trait)]
3#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
4//[full_tait]~^ WARN incomplete
29967ef6
XL
5
6trait Allocator {
7 type Buffer;
8}
9
10struct DefaultAllocator;
11
12impl<T> Allocator for DefaultAllocator {
13 //~^ ERROR: the type parameter `T` is not constrained
14 type Buffer = ();
15}
16
17type A = impl Fn(<DefaultAllocator as Allocator>::Buffer);
18
19fn foo() -> A {
20 |_| ()
21}
22
23fn main() {}