]> git.proxmox.com Git - rustc.git/blame - src/test/ui/type-alias-impl-trait/generic_underconstrained2.rs
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / type-alias-impl-trait / generic_underconstrained2.rs
CommitLineData
94222f64 1#![feature(type_alias_impl_trait)]
8faf50e0
XL
2
3fn main() {}
4
94222f64 5type Underconstrained<T: std::fmt::Debug> = impl Send;
8faf50e0
XL
6
7// not a defining use, because it doesn't define *all* possible generics
8fn underconstrained<U>(_: U) -> Underconstrained<U> {
1b1a35ee 9 //~^ ERROR `U` doesn't implement `Debug`
8faf50e0
XL
10 5u32
11}
12
94222f64 13type Underconstrained2<T: std::fmt::Debug> = impl Send;
8faf50e0
XL
14
15// not a defining use, because it doesn't define *all* possible generics
16fn underconstrained2<U, V>(_: U, _: V) -> Underconstrained2<V> {
1b1a35ee 17 //~^ ERROR `V` doesn't implement `Debug`
8faf50e0
XL
18 5u32
19}