| error: expected identifier, found reserved identifier `_` |
| --> $DIR/typeck_type_placeholder_item.rs:158:18 |
| | |
| LL | struct BadStruct<_>(_); |
| | ^ expected identifier, found reserved identifier |
| |
| error: expected identifier, found reserved identifier `_` |
| --> $DIR/typeck_type_placeholder_item.rs:161:16 |
| | |
| LL | trait BadTrait<_> {} |
| | ^ expected identifier, found reserved identifier |
| |
| error: expected identifier, found reserved identifier `_` |
| --> $DIR/typeck_type_placeholder_item.rs:171:19 |
| | |
| LL | struct BadStruct1<_, _>(_); |
| | ^ expected identifier, found reserved identifier |
| |
| error: expected identifier, found reserved identifier `_` |
| --> $DIR/typeck_type_placeholder_item.rs:171:22 |
| | |
| LL | struct BadStruct1<_, _>(_); |
| | ^ expected identifier, found reserved identifier |
| |
| error: expected identifier, found reserved identifier `_` |
| --> $DIR/typeck_type_placeholder_item.rs:176:19 |
| | |
| LL | struct BadStruct2<_, T>(_, T); |
| | ^ expected identifier, found reserved identifier |
| |
| error: associated constant in `impl` without body |
| --> $DIR/typeck_type_placeholder_item.rs:209:5 |
| | |
| LL | const C: _; |
| | ^^^^^^^^^^- |
| | | |
| | help: provide a definition for the constant: `= <expr>;` |
| |
| error[E0403]: the name `_` is already used for a generic parameter in this item's generic parameters |
| --> $DIR/typeck_type_placeholder_item.rs:171:22 |
| | |
| LL | struct BadStruct1<_, _>(_); |
| | - ^ already used |
| | | |
| | first use of `_` |
| |
| warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes |
| --> $DIR/typeck_type_placeholder_item.rs:5:32 |
| | |
| LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] |
| | ^^^^^^^^^^^^^^^^^^^^^ |
| | |
| = note: `#[warn(incomplete_features)]` on by default |
| = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:10:14 |
| | |
| LL | fn test() -> _ { 5 } |
| | ^ |
| | | |
| | not allowed in type signatures |
| | help: replace with the correct return type: `i32` |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:13:16 |
| | |
| LL | fn test2() -> (_, _) { (5, 5) } |
| | -^--^- |
| | || | |
| | || not allowed in type signatures |
| | |not allowed in type signatures |
| | help: replace with the correct return type: `(i32, i32)` |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:16:15 |
| | |
| LL | static TEST3: _ = "test"; |
| | ^ |
| | | |
| | not allowed in type signatures |
| | help: replace `_` with the correct type: `&str` |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:19:15 |
| | |
| LL | static TEST4: _ = 145; |
| | ^ |
| | | |
| | not allowed in type signatures |
| | help: replace `_` with the correct type: `i32` |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:22:15 |
| | |
| LL | static TEST5: (_, _) = (1, 2); |
| | ^^^^^^ not allowed in type signatures |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:25:13 |
| | |
| LL | fn test6(_: _) { } |
| | ^ not allowed in type signatures |
| | |
| help: use type parameters instead |
| | |
| LL | fn test6<T>(_: T) { } |
| | ^^^ ^ |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:28:18 |
| | |
| LL | fn test6_b<T>(_: _, _: T) { } |
| | ^ not allowed in type signatures |
| | |
| help: use type parameters instead |
| | |
| LL | fn test6_b<T, U>(_: U, _: T) { } |
| | ^^^ ^ |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:31:30 |
| | |
| LL | fn test6_c<T, K, L, A, B>(_: _, _: (T, K, L, A, B)) { } |
| | ^ not allowed in type signatures |
| | |
| help: use type parameters instead |
| | |
| LL | fn test6_c<T, K, L, A, B, U>(_: U, _: (T, K, L, A, B)) { } |
| | ^^^ ^ |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:34:13 |
| | |
| LL | fn test7(x: _) { let _x: usize = x; } |
| | ^ not allowed in type signatures |
| | |
| help: use type parameters instead |
| | |
| LL | fn test7<T>(x: T) { let _x: usize = x; } |
| | ^^^ ^ |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:37:22 |
| | |
| LL | fn test8(_f: fn() -> _) { } |
| | ^ |
| | | |
| | not allowed in type signatures |
| | help: use type parameters instead: `T` |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:37:22 |
| | |
| LL | fn test8(_f: fn() -> _) { } |
| | ^ not allowed in type signatures |
| | |
| help: use type parameters instead |
| | |
| LL | fn test8<T>(_f: fn() -> T) { } |
| | ^^^ ^ |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:51:26 |
| | |
| LL | fn test11(x: &usize) -> &_ { |
| | -^ |
| | || |
| | |not allowed in type signatures |
| | help: replace with the correct return type: `&'static &'static usize` |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:56:52 |
| | |
| LL | unsafe fn test12(x: *const usize) -> *const *const _ { |
| | --------------^ |
| | | | |
| | | not allowed in type signatures |
| | help: replace with the correct return type: `*const *const usize` |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:70:8 |
| | |
| LL | a: _, |
| | ^ not allowed in type signatures |
| LL | |
| LL | b: (_, _), |
| | ^ ^ not allowed in type signatures |
| | | |
| | not allowed in type signatures |
| | |
| help: use type parameters instead |
| | |
| LL | struct Test10<T> { |
| LL | a: T, |
| LL | |
| LL | b: (T, T), |
| | |
| |
| error: missing type for `static` item |
| --> $DIR/typeck_type_placeholder_item.rs:76:12 |
| | |
| LL | static A = 42; |
| | ^ help: provide a type for the item: `A: i32` |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:78:15 |
| | |
| LL | static B: _ = 42; |
| | ^ |
| | | |
| | not allowed in type signatures |
| | help: replace `_` with the correct type: `i32` |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:80:15 |
| | |
| LL | static C: Option<_> = Some(42); |
| | ^^^^^^^^^ not allowed in type signatures |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:83:21 |
| | |
| LL | fn fn_test() -> _ { 5 } |
| | ^ |
| | | |
| | not allowed in type signatures |
| | help: replace with the correct return type: `i32` |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:86:23 |
| | |
| LL | fn fn_test2() -> (_, _) { (5, 5) } |
| | -^--^- |
| | || | |
| | || not allowed in type signatures |
| | |not allowed in type signatures |
| | help: replace with the correct return type: `(i32, i32)` |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:89:22 |
| | |
| LL | static FN_TEST3: _ = "test"; |
| | ^ |
| | | |
| | not allowed in type signatures |
| | help: replace `_` with the correct type: `&str` |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:92:22 |
| | |
| LL | static FN_TEST4: _ = 145; |
| | ^ |
| | | |
| | not allowed in type signatures |
| | help: replace `_` with the correct type: `i32` |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:95:22 |
| | |
| LL | static FN_TEST5: (_, _) = (1, 2); |
| | ^^^^^^ not allowed in type signatures |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:98:20 |
| | |
| LL | fn fn_test6(_: _) { } |
| | ^ not allowed in type signatures |
| | |
| help: use type parameters instead |
| | |
| LL | fn fn_test6<T>(_: T) { } |
| | ^^^ ^ |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:101:20 |
| | |
| LL | fn fn_test7(x: _) { let _x: usize = x; } |
| | ^ not allowed in type signatures |
| | |
| help: use type parameters instead |
| | |
| LL | fn fn_test7<T>(x: T) { let _x: usize = x; } |
| | ^^^ ^ |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:104:29 |
| | |
| LL | fn fn_test8(_f: fn() -> _) { } |
| | ^ |
| | | |
| | not allowed in type signatures |
| | help: use type parameters instead: `T` |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:104:29 |
| | |
| LL | fn fn_test8(_f: fn() -> _) { } |
| | ^ not allowed in type signatures |
| | |
| help: use type parameters instead |
| | |
| LL | fn fn_test8<T>(_f: fn() -> T) { } |
| | ^^^ ^ |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:127:12 |
| | |
| LL | a: _, |
| | ^ not allowed in type signatures |
| LL | |
| LL | b: (_, _), |
| | ^ ^ not allowed in type signatures |
| | | |
| | not allowed in type signatures |
| | |
| help: use type parameters instead |
| | |
| LL | struct FnTest10<T> { |
| LL | a: T, |
| LL | |
| LL | b: (T, T), |
| | |
| |
| error[E0282]: type annotations needed |
| --> $DIR/typeck_type_placeholder_item.rs:132:18 |
| | |
| LL | fn fn_test11(_: _) -> (_, _) { panic!() } |
| | ^ cannot infer type |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:132:28 |
| | |
| LL | fn fn_test11(_: _) -> (_, _) { panic!() } |
| | ^ ^ not allowed in type signatures |
| | | |
| | not allowed in type signatures |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:136:30 |
| | |
| LL | fn fn_test12(x: i32) -> (_, _) { (x, x) } |
| | -^--^- |
| | || | |
| | || not allowed in type signatures |
| | |not allowed in type signatures |
| | help: replace with the correct return type: `(i32, i32)` |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:139:33 |
| | |
| LL | fn fn_test13(x: _) -> (i32, _) { (x, x) } |
| | ------^- |
| | | | |
| | | not allowed in type signatures |
| | help: replace with the correct return type: `(i32, i32)` |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:158:21 |
| | |
| LL | struct BadStruct<_>(_); |
| | ^ not allowed in type signatures |
| | |
| help: use type parameters instead |
| | |
| LL | struct BadStruct<T>(T); |
| | ^ ^ |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:163:15 |
| | |
| LL | impl BadTrait<_> for BadStruct<_> {} |
| | ^ ^ not allowed in type signatures |
| | | |
| | not allowed in type signatures |
| | |
| help: use type parameters instead |
| | |
| LL | impl<T> BadTrait<T> for BadStruct<T> {} |
| | ^^^ ^ ^ |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:166:34 |
| | |
| LL | fn impl_trait() -> impl BadTrait<_> { |
| | ^ not allowed in type signatures |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:171:25 |
| | |
| LL | struct BadStruct1<_, _>(_); |
| | ^ not allowed in type signatures |
| | |
| help: use type parameters instead |
| | |
| LL | struct BadStruct1<T, _>(T); |
| | ^ ^ |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:176:25 |
| | |
| LL | struct BadStruct2<_, T>(_, T); |
| | ^ not allowed in type signatures |
| | |
| help: use type parameters instead |
| | |
| LL | struct BadStruct2<U, T>(U, T); |
| | ^ ^ |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:180:14 |
| | |
| LL | type X = Box<_>; |
| | ^ not allowed in type signatures |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:186:21 |
| | |
| LL | type Y = impl Trait<_>; |
| | ^ not allowed in type signatures |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:220:31 |
| | |
| LL | fn value() -> Option<&'static _> { |
| | ----------------^- |
| | | | |
| | | not allowed in type signatures |
| | help: replace with the correct return type: `Option<&'static u8>` |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:225:10 |
| | |
| LL | const _: Option<_> = map(value); |
| | ^^^^^^^^^ |
| | | |
| | not allowed in type signatures |
| | help: replace `_` with the correct type: `Option<u8>` |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:144:31 |
| | |
| LL | fn method_test1(&self, x: _); |
| | ^ not allowed in type signatures |
| | |
| help: use type parameters instead |
| | |
| LL | fn method_test1<T>(&self, x: T); |
| | ^^^ ^ |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:146:31 |
| | |
| LL | fn method_test2(&self, x: _) -> _; |
| | ^ ^ not allowed in type signatures |
| | | |
| | not allowed in type signatures |
| | |
| help: use type parameters instead |
| | |
| LL | fn method_test2<T>(&self, x: T) -> T; |
| | ^^^ ^ ^ |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:148:31 |
| | |
| LL | fn method_test3(&self) -> _; |
| | ^ not allowed in type signatures |
| | |
| help: use type parameters instead |
| | |
| LL | fn method_test3<T>(&self) -> T; |
| | ^^^ ^ |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:150:26 |
| | |
| LL | fn assoc_fn_test1(x: _); |
| | ^ not allowed in type signatures |
| | |
| help: use type parameters instead |
| | |
| LL | fn assoc_fn_test1<T>(x: T); |
| | ^^^ ^ |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:152:26 |
| | |
| LL | fn assoc_fn_test2(x: _) -> _; |
| | ^ ^ not allowed in type signatures |
| | | |
| | not allowed in type signatures |
| | |
| help: use type parameters instead |
| | |
| LL | fn assoc_fn_test2<T>(x: T) -> T; |
| | ^^^ ^ ^ |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:154:28 |
| | |
| LL | fn assoc_fn_test3() -> _; |
| | ^ not allowed in type signatures |
| | |
| help: use type parameters instead |
| | |
| LL | fn assoc_fn_test3<T>() -> T; |
| | ^^^ ^ |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:194:14 |
| | |
| LL | type B = _; |
| | ^ not allowed in type signatures |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:196:14 |
| | |
| LL | const C: _; |
| | ^ not allowed in type signatures |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:198:14 |
| | |
| LL | const D: _ = 42; |
| | ^ |
| | | |
| | not allowed in type signatures |
| | help: replace `_` with the correct type: `i32` |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:201:26 |
| | |
| LL | type F: std::ops::Fn(_); |
| | ^ not allowed in type signatures |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:44:24 |
| | |
| LL | fn test9(&self) -> _ { () } |
| | ^ |
| | | |
| | not allowed in type signatures |
| | help: replace with the correct return type: `()` |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:47:27 |
| | |
| LL | fn test10(&self, _x : _) { } |
| | ^ not allowed in type signatures |
| | |
| help: use type parameters instead |
| | |
| LL | fn test10<T>(&self, _x : T) { } |
| | ^^^ ^ |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:62:24 |
| | |
| LL | fn clone(&self) -> _ { Test9 } |
| | ^ |
| | | |
| | not allowed in type signatures |
| | help: replace with the correct return type: `Test9` |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:65:37 |
| | |
| LL | fn clone_from(&mut self, other: _) { *self = Test9; } |
| | ^ not allowed in type signatures |
| | |
| help: use type parameters instead |
| | |
| LL | fn clone_from<T>(&mut self, other: T) { *self = Test9; } |
| | ^^^ ^ |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:111:31 |
| | |
| LL | fn fn_test9(&self) -> _ { () } |
| | ^ |
| | | |
| | not allowed in type signatures |
| | help: replace with the correct return type: `()` |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:114:34 |
| | |
| LL | fn fn_test10(&self, _x : _) { } |
| | ^ not allowed in type signatures |
| | |
| help: use type parameters instead |
| | |
| LL | fn fn_test10<T>(&self, _x : T) { } |
| | ^^^ ^ |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:119:28 |
| | |
| LL | fn clone(&self) -> _ { FnTest9 } |
| | ^ |
| | | |
| | not allowed in type signatures |
| | help: replace with the correct return type: `FnTest9` |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:122:41 |
| | |
| LL | fn clone_from(&mut self, other: _) { *self = FnTest9; } |
| | ^ not allowed in type signatures |
| | |
| help: use type parameters instead |
| | |
| LL | fn clone_from<T>(&mut self, other: T) { *self = FnTest9; } |
| | ^^^ ^ |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:205:14 |
| | |
| LL | type A = _; |
| | ^ not allowed in type signatures |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:207:14 |
| | |
| LL | type B = _; |
| | ^ not allowed in type signatures |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:209:14 |
| | |
| LL | const C: _; |
| | ^ not allowed in type signatures |
| |
| error[E0121]: the type placeholder `_` is not allowed within types on item signatures |
| --> $DIR/typeck_type_placeholder_item.rs:212:14 |
| | |
| LL | const D: _ = 42; |
| | ^ |
| | | |
| | not allowed in type signatures |
| | help: replace `_` with the correct type: `i32` |
| |
| error: aborting due to 69 previous errors; 1 warning emitted |
| |
| Some errors have detailed explanations: E0121, E0282, E0403. |
| For more information about an error, try `rustc --explain E0121`. |