]> git.proxmox.com Git - rustc.git/blame - src/test/ui/type-alias-impl-trait/issue-52843.rs
New upstream version 1.56.0~beta.4+dfsg1
[rustc.git] / src / test / ui / type-alias-impl-trait / issue-52843.rs
CommitLineData
94222f64 1#![feature(type_alias_impl_trait)]
29967ef6
XL
2
3type Foo<T> = impl Default;
4//~^ ERROR: the trait bound `T: Default` is not satisfied
5
6#[allow(unused)]
7fn foo<T: Default>(t: T) -> Foo<T> {
8 t
9}
10
11struct NotDefault;
12
13fn main() {
14 let _ = Foo::<NotDefault>::default();
15}