]>
Commit | Line | Data |
---|---|---|
94222f64 | 1 | #![feature(type_alias_impl_trait)] |
0531ce1d | 2 | |
9fa01778 XL |
3 | use std::fmt::Debug; |
4 | ||
5bcae85e | 5 | fn main() {} |
8faf50e0 | 6 | |
9fa01778 | 7 | // test that unused generic parameters are ok |
ba9703b0 | 8 | type TwoTys<T, U> = impl Debug; |
c295e0f8 | 9 | //~^ ERROR could not find defining uses |
ba9703b0 | 10 | type TwoLifetimes<'a, 'b> = impl Debug; |
c295e0f8 | 11 | //~^ ERROR could not find defining uses |
ba9703b0 | 12 | type TwoConsts<const X: usize, const Y: usize> = impl Debug; |
c295e0f8 | 13 | //~^ ERROR could not find defining uses |
8faf50e0 | 14 | |
ba9703b0 | 15 | fn one_ty<T: Debug>(t: T) -> TwoTys<T, T> { |
94222f64 | 16 | //~^ ERROR non-defining opaque type use in defining scope |
ba9703b0 XL |
17 | t |
18 | } | |
19 | ||
20 | fn one_lifetime<'a>(t: &'a u32) -> TwoLifetimes<'a, 'a> { | |
94222f64 | 21 | //~^ ERROR non-defining opaque type use in defining scope |
ba9703b0 XL |
22 | t |
23 | } | |
24 | ||
25 | fn one_const<const N: usize>(t: *mut [u8; N]) -> TwoConsts<N, N> { | |
94222f64 | 26 | //~^ ERROR non-defining opaque type use in defining scope |
8faf50e0 XL |
27 | t |
28 | } |