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