error: missing angle brackets in associated item path --> $DIR/bad-assoc-ty.rs:1:10 | LL | type A = [u8; 4]::AssocTy; | ^^^^^^^^^^^^^^^^ help: try: `<[u8; 4]>::AssocTy` error: missing angle brackets in associated item path --> $DIR/bad-assoc-ty.rs:5:10 | LL | type B = [u8]::AssocTy; | ^^^^^^^^^^^^^ help: try: `<[u8]>::AssocTy` error: missing angle brackets in associated item path --> $DIR/bad-assoc-ty.rs:9:10 | LL | type C = (u8)::AssocTy; | ^^^^^^^^^^^^^ help: try: `<(u8)>::AssocTy` error: missing angle brackets in associated item path --> $DIR/bad-assoc-ty.rs:13:10 | LL | type D = (u8, u8)::AssocTy; | ^^^^^^^^^^^^^^^^^ help: try: `<(u8, u8)>::AssocTy` error: missing angle brackets in associated item path --> $DIR/bad-assoc-ty.rs:17:10 | LL | type E = _::AssocTy; | ^^^^^^^^^^ help: try: `<_>::AssocTy` error: missing angle brackets in associated item path --> $DIR/bad-assoc-ty.rs:21:19 | LL | type F = &'static (u8)::AssocTy; | ^^^^^^^^^^^^^ help: try: `<(u8)>::AssocTy` error: missing angle brackets in associated item path --> $DIR/bad-assoc-ty.rs:27:10 | LL | type G = dyn 'static + (Send)::AssocTy; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `::AssocTy` error: missing angle brackets in associated item path --> $DIR/bad-assoc-ty.rs:46:10 | LL | type I = ty!()::AssocTy; | ^^^^^^^^^^^^^^ help: try: `::AssocTy` error: missing angle brackets in associated item path --> $DIR/bad-assoc-ty.rs:39:19 | LL | ($ty: ty) => ($ty::AssocTy); | ^^^^^^^^^^^^ help: try: `<$ty>::AssocTy` ... LL | type J = ty!(u8); | ------- in this macro invocation | = note: this error originates in the macro `ty` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0223]: ambiguous associated type --> $DIR/bad-assoc-ty.rs:1:10 | LL | type A = [u8; 4]::AssocTy; | ^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `<[u8; 4] as Trait>::AssocTy` error[E0223]: ambiguous associated type --> $DIR/bad-assoc-ty.rs:5:10 | LL | type B = [u8]::AssocTy; | ^^^^^^^^^^^^^ help: use fully-qualified syntax: `<[u8] as Trait>::AssocTy` error[E0223]: ambiguous associated type --> $DIR/bad-assoc-ty.rs:9:10 | LL | type C = (u8)::AssocTy; | ^^^^^^^^^^^^^ help: use fully-qualified syntax: `::AssocTy` error[E0223]: ambiguous associated type --> $DIR/bad-assoc-ty.rs:13:10 | LL | type D = (u8, u8)::AssocTy; | ^^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `<(u8, u8) as Trait>::AssocTy` error[E0121]: the placeholder `_` is not allowed within types on item signatures for type aliases --> $DIR/bad-assoc-ty.rs:17:10 | LL | type E = _::AssocTy; | ^ not allowed in type signatures error[E0223]: ambiguous associated type --> $DIR/bad-assoc-ty.rs:21:19 | LL | type F = &'static (u8)::AssocTy; | ^^^^^^^^^^^^^ help: use fully-qualified syntax: `::AssocTy` error[E0223]: ambiguous associated type --> $DIR/bad-assoc-ty.rs:27:10 | LL | type G = dyn 'static + (Send)::AssocTy; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `<(dyn Send + 'static) as Trait>::AssocTy` warning: trait objects without an explicit `dyn` are deprecated --> $DIR/bad-assoc-ty.rs:33:10 | LL | type H = Fn(u8) -> (u8)::Output; | ^^^^^^^^^^^^^^ | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see = note: `#[warn(bare_trait_objects)]` on by default help: use `dyn` | LL | type H = (u8)>::Output; | ++++ + error[E0223]: ambiguous associated type --> $DIR/bad-assoc-ty.rs:33:10 | LL | type H = Fn(u8) -> (u8)::Output; | ^^^^^^^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `<(dyn Fn(u8) -> u8 + 'static) as Trait>::Output` error[E0223]: ambiguous associated type --> $DIR/bad-assoc-ty.rs:39:19 | LL | ($ty: ty) => ($ty::AssocTy); | ^^^^^^^^^^^^ help: use fully-qualified syntax: `::AssocTy` ... LL | type J = ty!(u8); | ------- in this macro invocation | = note: this error originates in the macro `ty` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0223]: ambiguous associated type --> $DIR/bad-assoc-ty.rs:46:10 | LL | type I = ty!()::AssocTy; | ^^^^^^^^^^^^^^ help: use fully-qualified syntax: `::AssocTy` error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions --> $DIR/bad-assoc-ty.rs:51:13 | LL | fn foo>(x: X) {} | ^ ^ not allowed in type signatures | | | not allowed in type signatures | help: use type parameters instead | LL | fn foo, T>(x: X) {} | ~ ~ +++ error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions --> $DIR/bad-assoc-ty.rs:54:34 | LL | fn bar(_: F) where F: Fn() -> _ {} | ^ not allowed in type signatures | help: use type parameters instead | LL | fn bar(_: F) where F: Fn() -> T {} | +++ ~ error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions --> $DIR/bad-assoc-ty.rs:57:19 | LL | fn baz _>(_: F) {} | ^ not allowed in type signatures | help: use type parameters instead | LL | fn baz T, T>(_: F) {} | ~+++ error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs --> $DIR/bad-assoc-ty.rs:60:33 | LL | struct L(F) where F: Fn() -> _; | ^ not allowed in type signatures | help: use type parameters instead | LL | struct L(F) where F: Fn() -> T; | +++ ~ error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs --> $DIR/bad-assoc-ty.rs:62:30 | LL | struct M where F: Fn() -> _ { | ^ not allowed in type signatures | help: use type parameters instead | LL | struct M where F: Fn() -> T { | +++ ~ error[E0121]: the placeholder `_` is not allowed within types on item signatures for enums --> $DIR/bad-assoc-ty.rs:66:28 | LL | enum N where F: Fn() -> _ { | ^ not allowed in type signatures | help: use type parameters instead | LL | enum N where F: Fn() -> T { | +++ ~ error[E0121]: the placeholder `_` is not allowed within types on item signatures for unions --> $DIR/bad-assoc-ty.rs:71:29 | LL | union O where F: Fn() -> _ { | ^ not allowed in type signatures | help: use type parameters instead | LL | union O where F: Fn() -> T { | +++ ~ error[E0121]: the placeholder `_` is not allowed within types on item signatures for traits --> $DIR/bad-assoc-ty.rs:76:29 | LL | trait P where F: Fn() -> _ { | ^ not allowed in type signatures | help: use type parameters instead | LL | trait P where F: Fn() -> T { | +++ ~ error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions --> $DIR/bad-assoc-ty.rs:81:38 | LL | fn foo(_: F) where F: Fn() -> _ {} | ^ not allowed in type signatures | help: use type parameters instead | LL | fn foo(_: F) where F: Fn() -> T {} | +++ ~ error: aborting due to 28 previous errors; 1 warning emitted Some errors have detailed explanations: E0121, E0223. For more information about an error, try `rustc --explain E0121`.