#![crate_type = "rlib"] #![feature(generic_arg_infer)] struct Foo; struct Bar(T); fn arr_fn() -> [u8; _] { //~^ ERROR the placeholder `_` is not allowed within types on item signatures for return types [0; 3] } fn ty_fn() -> Bar { //~^ ERROR the placeholder `_` is not allowed within types on item signatures for return types Bar::(0) } fn ty_fn_mixed() -> Bar<_, _> { //~^ ERROR the placeholder `_` is not allowed within types on item signatures for return types Bar::(0) } const ARR_CT: [u8; _] = [0; 3]; //~^ ERROR the placeholder `_` is not allowed within types on item signatures for constants static ARR_STATIC: [u8; _] = [0; 3]; //~^ ERROR the placeholder `_` is not allowed within types on item signatures for static variables const TY_CT: Bar = Bar::(0); //~^ ERROR the placeholder `_` is not allowed within types on item signatures for constants static TY_STATIC: Bar = Bar::(0); //~^ ERROR the placeholder `_` is not allowed within types on item signatures for static variables const TY_CT_MIXED: Bar<_, _> = Bar::(0); //~^ ERROR the placeholder `_` is not allowed within types on item signatures for constants static TY_STATIC_MIXED: Bar<_, _> = Bar::(0); //~^ ERROR the placeholder `_` is not allowed within types on item signatures for static variables trait ArrAssocConst { const ARR: [u8; _]; //~^ ERROR the placeholder `_` is not allowed within types on item signatures for constants } trait TyAssocConst { const ARR: Bar; //~^ ERROR the placeholder `_` is not allowed within types on item signatures for constants } trait TyAssocConstMixed { const ARR: Bar<_, _>; //~^ ERROR the placeholder `_` is not allowed within types on item signatures for constants } trait AssocTy { type Assoc; } impl AssocTy for i8 { type Assoc = [u8; _]; //~^ ERROR the placeholder `_` is not allowed within types on item signatures for associated types } impl AssocTy for i16 { type Assoc = Bar; //~^ ERROR the placeholder `_` is not allowed within types on item signatures for associated types } impl AssocTy for i32 { type Assoc = Bar<_, _>; //~^ ERROR the placeholder `_` is not allowed within types on item signatures for associated types }