2017-12-16 16:53:11 -06:00
error: missing angle brackets in associated item path
2018-12-25 09:56:47 -06:00
--> $DIR/bad-assoc-ty.rs:1:10
2017-12-16 16:53:11 -06:00
|
2018-02-22 18:42:32 -06:00
LL | type A = [u8; 4]::AssocTy;
2023-09-27 19:37:20 -05:00
| ^^^^^^^
|
help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
|
LL | type A = <[u8; 4]>::AssocTy;
| + +
2017-12-16 16:53:11 -06:00
error: missing angle brackets in associated item path
2018-12-25 09:56:47 -06:00
--> $DIR/bad-assoc-ty.rs:5:10
2017-12-16 16:53:11 -06:00
|
2018-02-22 18:42:32 -06:00
LL | type B = [u8]::AssocTy;
2023-09-27 19:37:20 -05:00
| ^^^^
|
help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
|
LL | type B = <[u8]>::AssocTy;
| + +
2017-12-16 16:53:11 -06:00
error: missing angle brackets in associated item path
2018-12-25 09:56:47 -06:00
--> $DIR/bad-assoc-ty.rs:9:10
2017-12-16 16:53:11 -06:00
|
2018-02-22 18:42:32 -06:00
LL | type C = (u8)::AssocTy;
2023-09-27 19:37:20 -05:00
| ^^^^
|
help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
|
LL | type C = <(u8)>::AssocTy;
| + +
2017-12-16 16:53:11 -06:00
error: missing angle brackets in associated item path
2018-12-25 09:56:47 -06:00
--> $DIR/bad-assoc-ty.rs:13:10
2017-12-16 16:53:11 -06:00
|
2018-02-22 18:42:32 -06:00
LL | type D = (u8, u8)::AssocTy;
2023-09-27 19:37:20 -05:00
| ^^^^^^^^
|
help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
|
LL | type D = <(u8, u8)>::AssocTy;
| + +
2017-12-16 16:53:11 -06:00
error: missing angle brackets in associated item path
2018-12-25 09:56:47 -06:00
--> $DIR/bad-assoc-ty.rs:17:10
2017-12-16 16:53:11 -06:00
|
2018-02-22 18:42:32 -06:00
LL | type E = _::AssocTy;
2023-09-27 19:37:20 -05:00
| ^
|
help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
|
LL | type E = <_>::AssocTy;
| + +
2017-12-16 16:53:11 -06:00
2017-12-18 14:42:58 -06:00
error: missing angle brackets in associated item path
2020-02-27 17:59:08 -06:00
--> $DIR/bad-assoc-ty.rs:21:19
2017-12-18 14:42:58 -06:00
|
2018-02-22 18:42:32 -06:00
LL | type F = &'static (u8)::AssocTy;
2023-09-27 19:37:20 -05:00
| ^^^^
|
help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
|
LL | type F = &'static <(u8)>::AssocTy;
| + +
2017-12-18 14:42:58 -06:00
error: missing angle brackets in associated item path
2020-02-27 17:59:08 -06:00
--> $DIR/bad-assoc-ty.rs:27:10
2017-12-18 14:42:58 -06:00
|
2019-05-28 13:46:13 -05:00
LL | type G = dyn 'static + (Send)::AssocTy;
2023-09-27 19:37:20 -05:00
| ^^^^^^^^^^^^^^^^^^^^
|
help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
|
LL | type G = <dyn 'static + (Send)>::AssocTy;
| + +
2019-03-09 08:41:01 -06:00
error: missing angle brackets in associated item path
2021-07-10 03:00:54 -05:00
--> $DIR/bad-assoc-ty.rs:46:10
2019-03-09 08:41:01 -06:00
|
LL | type I = ty!()::AssocTy;
2023-09-27 19:37:20 -05:00
| ^^^^^
|
help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
|
LL | type I = <ty!()>::AssocTy;
| + +
2019-03-09 08:41:01 -06:00
error: missing angle brackets in associated item path
2021-07-10 03:00:54 -05:00
--> $DIR/bad-assoc-ty.rs:39:19
2019-03-09 08:41:01 -06:00
|
LL | ($ty: ty) => ($ty::AssocTy);
2023-09-27 19:37:20 -05:00
| ^^^
2019-03-09 08:41:01 -06:00
...
LL | type J = ty!(u8);
| ------- in this macro invocation
2019-12-16 07:56:47 -06:00
|
2021-02-13 13:52:25 -06:00
= note: this error originates in the macro `ty` (in Nightly builds, run with -Z macro-backtrace for more info)
2023-09-27 19:37:20 -05:00
help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
|
LL | ($ty: ty) => (<$ty>::AssocTy);
| + +
2017-12-18 14:42:58 -06:00
2017-12-16 16:53:11 -06:00
error[E0223]: ambiguous associated type
2018-12-25 09:56:47 -06:00
--> $DIR/bad-assoc-ty.rs:1:10
2017-12-16 16:53:11 -06:00
|
2018-02-22 18:42:32 -06:00
LL | type A = [u8; 4]::AssocTy;
2023-01-08 00:54:52 -06:00
| ^^^^^^^^^^^^^^^^
|
help: if there were a trait named `Example` with associated type `AssocTy` implemented for `[u8; 4]`, you could use the fully-qualified path
|
LL | type A = <[u8; 4] as Example>::AssocTy;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2017-12-16 16:53:11 -06:00
error[E0223]: ambiguous associated type
2018-12-25 09:56:47 -06:00
--> $DIR/bad-assoc-ty.rs:5:10
2017-12-16 16:53:11 -06:00
|
2018-02-22 18:42:32 -06:00
LL | type B = [u8]::AssocTy;
2023-01-08 00:54:52 -06:00
| ^^^^^^^^^^^^^
|
help: if there were a trait named `Example` with associated type `AssocTy` implemented for `[u8]`, you could use the fully-qualified path
|
LL | type B = <[u8] as Example>::AssocTy;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
2017-12-16 16:53:11 -06:00
error[E0223]: ambiguous associated type
2018-12-25 09:56:47 -06:00
--> $DIR/bad-assoc-ty.rs:9:10
2017-12-16 16:53:11 -06:00
|
2018-02-22 18:42:32 -06:00
LL | type C = (u8)::AssocTy;
2023-01-08 00:54:52 -06:00
| ^^^^^^^^^^^^^
|
help: if there were a trait named `Example` with associated type `AssocTy` implemented for `u8`, you could use the fully-qualified path
|
LL | type C = <u8 as Example>::AssocTy;
| ~~~~~~~~~~~~~~~~~~~~~~~~
2017-12-16 16:53:11 -06:00
error[E0223]: ambiguous associated type
2018-12-25 09:56:47 -06:00
--> $DIR/bad-assoc-ty.rs:13:10
2017-12-16 16:53:11 -06:00
|
2018-02-22 18:42:32 -06:00
LL | type D = (u8, u8)::AssocTy;
2023-01-08 00:54:52 -06:00
| ^^^^^^^^^^^^^^^^^
|
help: if there were a trait named `Example` with associated type `AssocTy` implemented for `(u8, u8)`, you could use the fully-qualified path
|
LL | type D = <(u8, u8) as Example>::AssocTy;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2017-12-16 16:53:11 -06:00
2022-01-05 04:43:21 -06:00
error[E0121]: the placeholder `_` is not allowed within types on item signatures for type aliases
2018-12-25 09:56:47 -06:00
--> $DIR/bad-assoc-ty.rs:17:10
2017-12-16 16:53:11 -06:00
|
2018-02-22 18:42:32 -06:00
LL | type E = _::AssocTy;
2017-12-16 16:53:11 -06:00
| ^ not allowed in type signatures
2017-12-18 14:42:58 -06:00
error[E0223]: ambiguous associated type
2020-02-27 17:59:08 -06:00
--> $DIR/bad-assoc-ty.rs:21:19
2017-12-18 14:42:58 -06:00
|
2018-02-22 18:42:32 -06:00
LL | type F = &'static (u8)::AssocTy;
2023-01-08 00:54:52 -06:00
| ^^^^^^^^^^^^^
|
help: if there were a trait named `Example` with associated type `AssocTy` implemented for `u8`, you could use the fully-qualified path
|
LL | type F = &'static <u8 as Example>::AssocTy;
| ~~~~~~~~~~~~~~~~~~~~~~~~
2017-12-18 14:42:58 -06:00
error[E0223]: ambiguous associated type
2020-02-27 17:59:08 -06:00
--> $DIR/bad-assoc-ty.rs:27:10
2017-12-18 14:42:58 -06:00
|
2019-05-28 13:46:13 -05:00
LL | type G = dyn 'static + (Send)::AssocTy;
2023-01-08 00:54:52 -06:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: if there were a trait named `Example` with associated type `AssocTy` implemented for `(dyn Send + 'static)`, you could use the fully-qualified path
|
LL | type G = <(dyn Send + 'static) as Example>::AssocTy;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2017-12-18 14:42:58 -06:00
2021-07-10 03:00:54 -05:00
warning: trait objects without an explicit `dyn` are deprecated
--> $DIR/bad-assoc-ty.rs:33:10
|
LL | type H = Fn(u8) -> (u8)::Output;
2021-11-01 04:01:42 -05:00
| ^^^^^^^^^^^^^^
2021-07-10 03:00:54 -05:00
|
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
2022-09-18 10:55:36 -05:00
= note: `#[warn(bare_trait_objects)]` on by default
2024-09-25 03:38:40 -05:00
help: if this is a dyn-compatible trait, use `dyn`
2021-11-01 04:01:42 -05:00
|
LL | type H = <dyn Fn(u8) -> (u8)>::Output;
| ++++ +
2021-07-10 03:00:54 -05:00
2017-12-18 14:42:58 -06:00
error[E0223]: ambiguous associated type
2020-02-27 17:59:08 -06:00
--> $DIR/bad-assoc-ty.rs:33:10
2017-12-18 14:42:58 -06:00
|
2018-02-22 18:42:32 -06:00
LL | type H = Fn(u8) -> (u8)::Output;
2024-02-16 18:45:15 -06:00
| ^^^^^^^^^^^^^^^^^^^^^^
|
help: use fully-qualified syntax
|
LL | type H = <(dyn Fn(u8) -> u8 + 'static) as BitOr>::Output;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LL | type H = <(dyn Fn(u8) -> u8 + 'static) as IntoFuture>::Output;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2017-12-18 14:42:58 -06:00
2019-03-09 08:41:01 -06:00
error[E0223]: ambiguous associated type
2021-07-10 03:00:54 -05:00
--> $DIR/bad-assoc-ty.rs:39:19
2019-03-09 08:41:01 -06:00
|
LL | ($ty: ty) => ($ty::AssocTy);
2023-01-08 00:54:52 -06:00
| ^^^^^^^^^^^^
2019-03-09 08:41:01 -06:00
...
LL | type J = ty!(u8);
| ------- in this macro invocation
2019-12-16 07:56:47 -06:00
|
2021-02-13 13:52:25 -06:00
= note: this error originates in the macro `ty` (in Nightly builds, run with -Z macro-backtrace for more info)
2023-01-08 00:54:52 -06:00
help: if there were a trait named `Example` with associated type `AssocTy` implemented for `u8`, you could use the fully-qualified path
|
LL | ($ty: ty) => (<u8 as Example>::AssocTy);
| ~~~~~~~~~~~~~~~~~~~~~~~~
2019-03-09 08:41:01 -06:00
error[E0223]: ambiguous associated type
2021-07-10 03:00:54 -05:00
--> $DIR/bad-assoc-ty.rs:46:10
2019-03-09 08:41:01 -06:00
|
LL | type I = ty!()::AssocTy;
2023-01-08 00:54:52 -06:00
| ^^^^^^^^^^^^^^
|
help: if there were a trait named `Example` with associated type `AssocTy` implemented for `u8`, you could use the fully-qualified path
|
LL | type I = <u8 as Example>::AssocTy;
| ~~~~~~~~~~~~~~~~~~~~~~~~
2019-03-09 08:41:01 -06:00
2022-01-05 04:43:21 -06:00
error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
2021-07-10 03:00:54 -05:00
--> $DIR/bad-assoc-ty.rs:51:13
2020-02-13 15:34:00 -06:00
|
LL | fn foo<X: K<_, _>>(x: X) {}
| ^ ^ not allowed in type signatures
| |
| not allowed in type signatures
2020-03-22 20:50:30 -05:00
|
help: use type parameters instead
|
2020-03-23 20:46:09 -05:00
LL | fn foo<X: K<T, T>, T>(x: X) {}
2021-06-21 21:07:19 -05:00
| ~ ~ +++
2020-03-22 20:50:30 -05:00
2022-01-05 04:43:21 -06:00
error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
2021-07-10 03:00:54 -05:00
--> $DIR/bad-assoc-ty.rs:54:34
2020-03-22 20:50:30 -05:00
|
LL | fn bar<F>(_: F) where F: Fn() -> _ {}
| ^ not allowed in type signatures
|
help: use type parameters instead
|
LL | fn bar<F, T>(_: F) where F: Fn() -> T {}
2021-06-21 21:07:19 -05:00
| +++ ~
2020-03-22 20:50:30 -05:00
2022-01-05 04:43:21 -06:00
error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
2021-07-10 03:00:54 -05:00
--> $DIR/bad-assoc-ty.rs:57:19
2020-03-22 20:50:30 -05:00
|
LL | fn baz<F: Fn() -> _>(_: F) {}
| ^ not allowed in type signatures
|
help: use type parameters instead
|
2020-03-23 20:46:09 -05:00
LL | fn baz<F: Fn() -> T, T>(_: F) {}
2021-06-21 21:07:19 -05:00
| ~+++
2020-03-22 20:50:30 -05:00
2022-01-05 04:43:21 -06:00
error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
2021-07-10 03:00:54 -05:00
--> $DIR/bad-assoc-ty.rs:60:33
2020-03-22 20:50:30 -05:00
|
LL | struct L<F>(F) where F: Fn() -> _;
| ^ not allowed in type signatures
|
help: use type parameters instead
|
LL | struct L<F, T>(F) where F: Fn() -> T;
2021-06-21 21:07:19 -05:00
| +++ ~
2020-03-22 20:50:30 -05:00
2024-02-23 05:45:44 -06:00
error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
--> $DIR/bad-assoc-ty.rs:82:38
|
LL | fn foo<F>(_: F) where F: Fn() -> _ {}
| ^ not allowed in type signatures
|
help: use type parameters instead
|
LL | fn foo<F, T>(_: F) where F: Fn() -> T {}
| +++ ~
2022-01-05 04:43:21 -06:00
error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
2021-07-10 03:00:54 -05:00
--> $DIR/bad-assoc-ty.rs:62:30
2020-03-22 20:50:30 -05:00
|
LL | struct M<F> where F: Fn() -> _ {
| ^ not allowed in type signatures
|
help: use type parameters instead
|
LL | struct M<F, T> where F: Fn() -> T {
2021-06-21 21:07:19 -05:00
| +++ ~
2020-03-22 20:50:30 -05:00
2022-01-05 04:43:21 -06:00
error[E0121]: the placeholder `_` is not allowed within types on item signatures for enums
2021-07-10 03:00:54 -05:00
--> $DIR/bad-assoc-ty.rs:66:28
2020-03-22 20:50:30 -05:00
|
LL | enum N<F> where F: Fn() -> _ {
| ^ not allowed in type signatures
|
help: use type parameters instead
|
LL | enum N<F, T> where F: Fn() -> T {
2021-06-21 21:07:19 -05:00
| +++ ~
2020-03-22 20:50:30 -05:00
2022-01-05 04:43:21 -06:00
error[E0121]: the placeholder `_` is not allowed within types on item signatures for unions
2021-07-10 03:00:54 -05:00
--> $DIR/bad-assoc-ty.rs:71:29
2020-03-22 20:50:30 -05:00
|
LL | union O<F> where F: Fn() -> _ {
| ^ not allowed in type signatures
|
help: use type parameters instead
|
LL | union O<F, T> where F: Fn() -> T {
2021-06-21 21:07:19 -05:00
| +++ ~
2020-03-22 20:50:30 -05:00
2023-10-31 08:45:26 -05:00
error[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union
--> $DIR/bad-assoc-ty.rs:73:5
|
LL | foo: F,
| ^^^^^^
|
= note: union fields must not have drop side-effects, which is currently enforced via either `Copy` or `ManuallyDrop<...>`
help: wrap the field type in `ManuallyDrop<...>`
|
LL | foo: std::mem::ManuallyDrop<F>,
| +++++++++++++++++++++++ +
2024-02-23 05:45:44 -06:00
error[E0121]: the placeholder `_` is not allowed within types on item signatures for traits
--> $DIR/bad-assoc-ty.rs:77:29
|
LL | trait P<F> where F: Fn() -> _ {
| ^ not allowed in type signatures
|
help: use type parameters instead
|
LL | trait P<F, T> where F: Fn() -> T {
| +++ ~
2023-10-31 08:45:26 -05:00
error: aborting due to 29 previous errors; 1 warning emitted
2017-12-16 16:53:11 -06:00
2023-10-31 08:45:26 -05:00
Some errors have detailed explanations: E0121, E0223, E0740.
2018-03-03 08:59:40 -06:00
For more information about an error, try `rustc --explain E0121`.