]> git.proxmox.com Git - rustc.git/blame - src/test/ui/type-alias-impl-trait/generic_nondefining_use.rs
Merge tag 'debian/1.52.1+dfsg1-1_exp2' into proxmox/buster
[rustc.git] / src / test / ui / type-alias-impl-trait / generic_nondefining_use.rs
CommitLineData
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
7use std::fmt::Debug;
2c00a5a8 8
8faf50e0 9fn main() {}
3157f602 10
ba9703b0
XL
11type OneTy<T> = impl Debug;
12type OneLifetime<'a> = impl Debug;
13type 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
17fn concrete_ty() -> OneTy<u32> {
18//~^ ERROR non-defining opaque type use in defining scope
8faf50e0
XL
19 5u32
20}
ba9703b0
XL
21
22fn concrete_lifetime() -> OneLifetime<'static> {
23//~^ ERROR non-defining opaque type use in defining scope
24 6u32
25}
26
27fn concrete_const() -> OneConst<{123}> {
28//~^ ERROR non-defining opaque type use in defining scope
29 7u32
30}