blob: f5045d382aac4ed63c4be46e727c657ea6444a1c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#![feature(type_alias_impl_trait)]
use std::fmt::Debug;
fn main() {}
type OneTy<T> = impl Debug;
type OneLifetime<'a> = impl Debug;
type OneConst<const X: usize> = impl Debug;
// Not defining uses, because they doesn't define *all* possible generics.
fn concrete_ty() -> OneTy<u32> {
5u32
//~^ ERROR expected generic type parameter, found `u32`
}
fn concrete_lifetime() -> OneLifetime<'static> {
6u32
//~^ ERROR non-defining opaque type use in defining scope
}
fn concrete_const() -> OneConst<{ 123 }> {
7u32
//~^ ERROR expected generic constant parameter, found `123`
}
|