]> git.proxmox.com Git - rustc.git/blame - src/test/ui/type-alias-impl-trait/issue-52843.rs
New upstream version 1.67.1+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;
29967ef6
XL
4
5#[allow(unused)]
6fn foo<T: Default>(t: T) -> Foo<T> {
7 t
04454e1e 8 //~^ ERROR: the trait bound `T: Default` is not satisfied
29967ef6
XL
9}
10
11struct NotDefault;
12
13fn main() {
14 let _ = Foo::<NotDefault>::default();
15}