]>
Commit | Line | Data |
---|---|---|
94222f64 | 1 | #![feature(type_alias_impl_trait)] |
ba9703b0 XL |
2 | |
3 | use std::fmt::Debug; | |
2c00a5a8 | 4 | |
8faf50e0 | 5 | fn main() {} |
3157f602 | 6 | |
ba9703b0 XL |
7 | type OneTy<T> = impl Debug; |
8 | type OneLifetime<'a> = impl Debug; | |
9 | type OneConst<const X: usize> = impl Debug; | |
48663c56 | 10 | |
ba9703b0 | 11 | // Not defining uses, because they doesn't define *all* possible generics. |
a7813a04 | 12 | |
ba9703b0 | 13 | fn concrete_ty() -> OneTy<u32> { |
94222f64 | 14 | //~^ ERROR non-defining opaque type use in defining scope |
8faf50e0 XL |
15 | 5u32 |
16 | } | |
ba9703b0 XL |
17 | |
18 | fn concrete_lifetime() -> OneLifetime<'static> { | |
94222f64 | 19 | //~^ ERROR non-defining opaque type use in defining scope |
ba9703b0 XL |
20 | 6u32 |
21 | } | |
22 | ||
94222f64 XL |
23 | fn concrete_const() -> OneConst<{ 123 }> { |
24 | //~^ ERROR non-defining opaque type use in defining scope | |
ba9703b0 XL |
25 | 7u32 |
26 | } |