1 #![crate_type = "rlib"]
2 #![feature(generic_arg_infer)]
4 struct Foo<const N: usize>;
5 struct Bar<T, const N: usize>(T);
7 fn arr_fn() -> [u8; _] {
8 //~^ ERROR the placeholder `_` is not allowed within types on item signatures for return types
12 fn ty_fn() -> Bar<i32, _> {
13 //~^ ERROR the placeholder `_` is not allowed within types on item signatures for return types
17 fn ty_fn_mixed() -> Bar<_, _> {
18 //~^ ERROR the placeholder `_` is not allowed within types on item signatures for return types
22 const ARR_CT: [u8; _] = [0; 3];
23 //~^ ERROR the placeholder `_` is not allowed within types on item signatures for constants
24 static ARR_STATIC: [u8; _] = [0; 3];
25 //~^ ERROR the placeholder `_` is not allowed within types on item signatures for static variables
26 const TY_CT: Bar<i32, _> = Bar::<i32, 3>(0);
27 //~^ ERROR the placeholder `_` is not allowed within types on item signatures for constants
28 static TY_STATIC: Bar<i32, _> = Bar::<i32, 3>(0);
29 //~^ ERROR the placeholder `_` is not allowed within types on item signatures for static variables
30 const TY_CT_MIXED: Bar<_, _> = Bar::<i32, 3>(0);
31 //~^ ERROR the placeholder `_` is not allowed within types on item signatures for constants
32 static TY_STATIC_MIXED: Bar<_, _> = Bar::<i32, 3>(0);
33 //~^ ERROR the placeholder `_` is not allowed within types on item signatures for static variables
36 //~^ ERROR the placeholder `_` is not allowed within types on item signatures for constants
39 const ARR: Bar<i32, _>;
40 //~^ ERROR the placeholder `_` is not allowed within types on item signatures for constants
42 trait TyAssocConstMixed {
44 //~^ ERROR the placeholder `_` is not allowed within types on item signatures for constants
52 //~^ ERROR the placeholder `_` is not allowed within types on item signatures for associated types
54 impl AssocTy for i16 {
55 type Assoc = Bar<i32, _>;
56 //~^ ERROR the placeholder `_` is not allowed within types on item signatures for associated types
58 impl AssocTy for i32 {
59 type Assoc = Bar<_, _>;
60 //~^ ERROR the placeholder `_` is not allowed within types on item signatures for associated types