2018-08-08 12:28:26 +00:00
|
|
|
error[E0666]: nested `impl Trait` is not allowed
|
2023-04-12 13:32:15 +00:00
|
|
|
--> $DIR/where-allowed.rs:49:51
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | fn in_impl_Fn_parameter_in_parameters(_: &impl Fn(impl Debug)) { panic!() }
|
|
|
|
| --------^^^^^^^^^^-
|
|
|
|
| | |
|
|
|
|
| | nested `impl Trait` here
|
|
|
|
| outer `impl Trait`
|
|
|
|
|
|
|
|
error[E0666]: nested `impl Trait` is not allowed
|
2023-04-12 13:32:15 +00:00
|
|
|
--> $DIR/where-allowed.rs:58:57
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | fn in_impl_Fn_parameter_in_return() -> &'static impl Fn(impl Debug) { panic!() }
|
|
|
|
| --------^^^^^^^^^^-
|
|
|
|
| | |
|
|
|
|
| | nested `impl Trait` here
|
|
|
|
| outer `impl Trait`
|
|
|
|
|
2023-04-12 13:32:15 +00:00
|
|
|
error[E0658]: `impl Trait` in associated types is unstable
|
2023-09-13 16:04:42 +00:00
|
|
|
--> $DIR/where-allowed.rs:119:16
|
2019-07-29 23:11:58 +00:00
|
|
|
|
|
|
|
|
LL | type Out = impl Debug;
|
2019-11-07 19:12:34 +00:00
|
|
|
| ^^^^^^^^^^
|
2019-07-29 23:11:58 +00:00
|
|
|
|
|
2020-02-07 12:07:02 +00:00
|
|
|
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
|
2023-04-12 13:32:15 +00:00
|
|
|
= help: add `#![feature(impl_trait_in_assoc_type)]` to the crate attributes to enable
|
2024-01-10 06:39:02 +00:00
|
|
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
2019-07-29 23:11:58 +00:00
|
|
|
|
2019-07-31 23:41:54 +00:00
|
|
|
error[E0658]: `impl Trait` in type aliases is unstable
|
2023-09-13 16:04:42 +00:00
|
|
|
--> $DIR/where-allowed.rs:154:23
|
2019-07-29 23:11:58 +00:00
|
|
|
|
|
|
|
|
LL | type InTypeAlias<R> = impl Debug;
|
2019-11-07 19:12:34 +00:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
2020-02-07 12:07:02 +00:00
|
|
|
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
|
2021-07-26 20:01:16 +00:00
|
|
|
= help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
|
2024-01-10 06:39:02 +00:00
|
|
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
2019-11-07 19:12:34 +00:00
|
|
|
|
|
|
|
error[E0658]: `impl Trait` in type aliases is unstable
|
2023-09-13 16:04:42 +00:00
|
|
|
--> $DIR/where-allowed.rs:157:39
|
2019-11-07 19:12:34 +00:00
|
|
|
|
|
|
|
|
LL | type InReturnInTypeAlias<R> = fn() -> impl Debug;
|
|
|
|
| ^^^^^^^^^^
|
2019-07-29 23:11:58 +00:00
|
|
|
|
|
2020-02-07 12:07:02 +00:00
|
|
|
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
|
2021-07-26 20:01:16 +00:00
|
|
|
= help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
|
2024-01-10 06:39:02 +00:00
|
|
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
2019-07-29 23:11:58 +00:00
|
|
|
|
2024-01-07 17:11:48 +00:00
|
|
|
error[E0562]: `impl Trait` is not allowed in `fn` pointer parameters
|
2023-04-12 13:32:15 +00:00
|
|
|
--> $DIR/where-allowed.rs:18:40
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | fn in_fn_parameter_in_parameters(_: fn(impl Debug)) { panic!() }
|
|
|
|
| ^^^^^^^^^^
|
2024-01-07 17:11:48 +00:00
|
|
|
|
|
|
|
|
= note: `impl Trait` is only allowed in arguments and return types of functions and methods
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2024-01-07 17:11:48 +00:00
|
|
|
error[E0562]: `impl Trait` is not allowed in `fn` pointer return types
|
2023-04-12 13:32:15 +00:00
|
|
|
--> $DIR/where-allowed.rs:22:42
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | fn in_fn_return_in_parameters(_: fn() -> impl Debug) { panic!() }
|
|
|
|
| ^^^^^^^^^^
|
2024-01-07 17:11:48 +00:00
|
|
|
|
|
|
|
|
= note: `impl Trait` is only allowed in arguments and return types of functions and methods
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2024-01-07 17:11:48 +00:00
|
|
|
error[E0562]: `impl Trait` is not allowed in `fn` pointer parameters
|
2023-04-12 13:32:15 +00:00
|
|
|
--> $DIR/where-allowed.rs:26:38
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | fn in_fn_parameter_in_return() -> fn(impl Debug) { panic!() }
|
|
|
|
| ^^^^^^^^^^
|
2024-01-07 17:11:48 +00:00
|
|
|
|
|
|
|
|
= note: `impl Trait` is only allowed in arguments and return types of functions and methods
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2024-01-07 17:11:48 +00:00
|
|
|
error[E0562]: `impl Trait` is not allowed in `fn` pointer return types
|
2023-04-12 13:32:15 +00:00
|
|
|
--> $DIR/where-allowed.rs:30:40
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | fn in_fn_return_in_return() -> fn() -> impl Debug { panic!() }
|
|
|
|
| ^^^^^^^^^^
|
2024-01-07 17:11:48 +00:00
|
|
|
|
|
|
|
|
= note: `impl Trait` is only allowed in arguments and return types of functions and methods
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2024-01-07 17:11:48 +00:00
|
|
|
error[E0562]: `impl Trait` is not allowed in the parameters of `Fn` trait bounds
|
2023-04-12 13:32:15 +00:00
|
|
|
--> $DIR/where-allowed.rs:34:49
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | fn in_dyn_Fn_parameter_in_parameters(_: &dyn Fn(impl Debug)) { panic!() }
|
|
|
|
| ^^^^^^^^^^
|
2024-01-07 17:11:48 +00:00
|
|
|
|
|
|
|
|
= note: `impl Trait` is only allowed in arguments and return types of functions and methods
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2024-01-07 17:11:48 +00:00
|
|
|
error[E0562]: `impl Trait` is not allowed in the return type of `Fn` trait bounds
|
2023-04-12 13:32:15 +00:00
|
|
|
--> $DIR/where-allowed.rs:38:51
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | fn in_dyn_Fn_return_in_parameters(_: &dyn Fn() -> impl Debug) { panic!() }
|
|
|
|
| ^^^^^^^^^^
|
2024-01-07 17:11:48 +00:00
|
|
|
|
|
|
|
|
= note: `impl Trait` is only allowed in arguments and return types of functions and methods
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2024-01-07 17:11:48 +00:00
|
|
|
error[E0562]: `impl Trait` is not allowed in the parameters of `Fn` trait bounds
|
2023-04-12 13:32:15 +00:00
|
|
|
--> $DIR/where-allowed.rs:42:55
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | fn in_dyn_Fn_parameter_in_return() -> &'static dyn Fn(impl Debug) { panic!() }
|
|
|
|
| ^^^^^^^^^^
|
2024-01-07 17:11:48 +00:00
|
|
|
|
|
|
|
|
= note: `impl Trait` is only allowed in arguments and return types of functions and methods
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2024-01-07 17:11:48 +00:00
|
|
|
error[E0562]: `impl Trait` is not allowed in the parameters of `Fn` trait bounds
|
2023-04-12 13:32:15 +00:00
|
|
|
--> $DIR/where-allowed.rs:49:51
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | fn in_impl_Fn_parameter_in_parameters(_: &impl Fn(impl Debug)) { panic!() }
|
|
|
|
| ^^^^^^^^^^
|
2024-01-07 17:11:48 +00:00
|
|
|
|
|
|
|
|
= note: `impl Trait` is only allowed in arguments and return types of functions and methods
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2024-01-07 17:11:48 +00:00
|
|
|
error[E0562]: `impl Trait` is not allowed in the return type of `Fn` trait bounds
|
2023-04-12 13:32:15 +00:00
|
|
|
--> $DIR/where-allowed.rs:54:53
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | fn in_impl_Fn_return_in_parameters(_: &impl Fn() -> impl Debug) { panic!() }
|
|
|
|
| ^^^^^^^^^^
|
2024-01-07 17:11:48 +00:00
|
|
|
|
|
|
|
|
= note: `impl Trait` is only allowed in arguments and return types of functions and methods
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2024-01-07 17:11:48 +00:00
|
|
|
error[E0562]: `impl Trait` is not allowed in the parameters of `Fn` trait bounds
|
2023-04-12 13:32:15 +00:00
|
|
|
--> $DIR/where-allowed.rs:58:57
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | fn in_impl_Fn_parameter_in_return() -> &'static impl Fn(impl Debug) { panic!() }
|
|
|
|
| ^^^^^^^^^^
|
2024-01-07 17:11:48 +00:00
|
|
|
|
|
|
|
|
= note: `impl Trait` is only allowed in arguments and return types of functions and methods
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2024-01-07 17:11:48 +00:00
|
|
|
error[E0562]: `impl Trait` is not allowed in the parameters of `Fn` trait bounds
|
2023-04-12 13:32:15 +00:00
|
|
|
--> $DIR/where-allowed.rs:66:38
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | fn in_Fn_parameter_in_generics<F: Fn(impl Debug)> (_: F) { panic!() }
|
|
|
|
| ^^^^^^^^^^
|
2024-01-07 17:11:48 +00:00
|
|
|
|
|
|
|
|
= note: `impl Trait` is only allowed in arguments and return types of functions and methods
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2024-01-07 17:11:48 +00:00
|
|
|
error[E0562]: `impl Trait` is not allowed in the return type of `Fn` trait bounds
|
2023-04-12 13:32:15 +00:00
|
|
|
--> $DIR/where-allowed.rs:70:40
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | fn in_Fn_return_in_generics<F: Fn() -> impl Debug> (_: F) { panic!() }
|
|
|
|
| ^^^^^^^^^^
|
2024-01-07 17:11:48 +00:00
|
|
|
|
|
|
|
|
= note: `impl Trait` is only allowed in arguments and return types of functions and methods
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2024-01-07 17:11:48 +00:00
|
|
|
error[E0562]: `impl Trait` is not allowed in field types
|
2023-04-12 13:32:15 +00:00
|
|
|
--> $DIR/where-allowed.rs:83:32
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | struct InBraceStructField { x: impl Debug }
|
|
|
|
| ^^^^^^^^^^
|
2024-01-07 17:11:48 +00:00
|
|
|
|
|
|
|
|
= note: `impl Trait` is only allowed in arguments and return types of functions and methods
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2024-01-07 17:11:48 +00:00
|
|
|
error[E0562]: `impl Trait` is not allowed in field types
|
2023-04-12 13:32:15 +00:00
|
|
|
--> $DIR/where-allowed.rs:87:41
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | struct InAdtInBraceStructField { x: Vec<impl Debug> }
|
|
|
|
| ^^^^^^^^^^
|
2024-01-07 17:11:48 +00:00
|
|
|
|
|
|
|
|
= note: `impl Trait` is only allowed in arguments and return types of functions and methods
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2024-01-07 17:11:48 +00:00
|
|
|
error[E0562]: `impl Trait` is not allowed in field types
|
2023-04-12 13:32:15 +00:00
|
|
|
--> $DIR/where-allowed.rs:91:27
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | struct InTupleStructField(impl Debug);
|
|
|
|
| ^^^^^^^^^^
|
2024-01-07 17:11:48 +00:00
|
|
|
|
|
|
|
|
= note: `impl Trait` is only allowed in arguments and return types of functions and methods
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2024-01-07 17:11:48 +00:00
|
|
|
error[E0562]: `impl Trait` is not allowed in field types
|
2023-04-12 13:32:15 +00:00
|
|
|
--> $DIR/where-allowed.rs:96:25
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | InBraceVariant { x: impl Debug },
|
|
|
|
| ^^^^^^^^^^
|
2024-01-07 17:11:48 +00:00
|
|
|
|
|
|
|
|
= note: `impl Trait` is only allowed in arguments and return types of functions and methods
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2024-01-07 17:11:48 +00:00
|
|
|
error[E0562]: `impl Trait` is not allowed in field types
|
2023-04-12 13:32:15 +00:00
|
|
|
--> $DIR/where-allowed.rs:98:20
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | InTupleVariant(impl Debug),
|
|
|
|
| ^^^^^^^^^^
|
2024-01-07 17:11:48 +00:00
|
|
|
|
|
|
|
|
= note: `impl Trait` is only allowed in arguments and return types of functions and methods
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2024-01-07 17:11:48 +00:00
|
|
|
error[E0562]: `impl Trait` is not allowed in `extern fn` parameters
|
2023-09-13 16:04:42 +00:00
|
|
|
--> $DIR/where-allowed.rs:138:33
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | fn in_foreign_parameters(_: impl Debug);
|
|
|
|
| ^^^^^^^^^^
|
2024-01-07 17:11:48 +00:00
|
|
|
|
|
|
|
|
= note: `impl Trait` is only allowed in arguments and return types of functions and methods
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2024-01-07 17:11:48 +00:00
|
|
|
error[E0562]: `impl Trait` is not allowed in `extern fn` return types
|
2023-09-13 16:04:42 +00:00
|
|
|
--> $DIR/where-allowed.rs:141:31
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | fn in_foreign_return() -> impl Debug;
|
|
|
|
| ^^^^^^^^^^
|
2024-01-07 17:11:48 +00:00
|
|
|
|
|
|
|
|
= note: `impl Trait` is only allowed in arguments and return types of functions and methods
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2024-01-07 17:11:48 +00:00
|
|
|
error[E0562]: `impl Trait` is not allowed in `fn` pointer return types
|
2023-09-13 16:04:42 +00:00
|
|
|
--> $DIR/where-allowed.rs:157:39
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | type InReturnInTypeAlias<R> = fn() -> impl Debug;
|
|
|
|
| ^^^^^^^^^^
|
2024-01-07 17:11:48 +00:00
|
|
|
|
|
|
|
|
= note: `impl Trait` is only allowed in arguments and return types of functions and methods
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2024-01-07 17:11:48 +00:00
|
|
|
error[E0562]: `impl Trait` is not allowed in traits
|
2023-09-13 16:04:42 +00:00
|
|
|
--> $DIR/where-allowed.rs:162:16
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | impl PartialEq<impl Debug> for () {
|
|
|
|
| ^^^^^^^^^^
|
2024-01-07 17:11:48 +00:00
|
|
|
|
|
|
|
|
= note: `impl Trait` is only allowed in arguments and return types of functions and methods
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2024-01-07 17:11:48 +00:00
|
|
|
error[E0562]: `impl Trait` is not allowed in impl headers
|
2023-09-13 16:04:42 +00:00
|
|
|
--> $DIR/where-allowed.rs:167:24
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | impl PartialEq<()> for impl Debug {
|
|
|
|
| ^^^^^^^^^^
|
2024-01-07 17:11:48 +00:00
|
|
|
|
|
|
|
|
= note: `impl Trait` is only allowed in arguments and return types of functions and methods
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2024-01-07 17:11:48 +00:00
|
|
|
error[E0562]: `impl Trait` is not allowed in impl headers
|
2023-09-13 16:04:42 +00:00
|
|
|
--> $DIR/where-allowed.rs:172:6
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | impl impl Debug {
|
|
|
|
| ^^^^^^^^^^
|
2024-01-07 17:11:48 +00:00
|
|
|
|
|
|
|
|
= note: `impl Trait` is only allowed in arguments and return types of functions and methods
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2024-01-07 17:11:48 +00:00
|
|
|
error[E0562]: `impl Trait` is not allowed in impl headers
|
2023-09-13 16:04:42 +00:00
|
|
|
--> $DIR/where-allowed.rs:178:24
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | impl InInherentImplAdt<impl Debug> {
|
|
|
|
| ^^^^^^^^^^
|
2024-01-07 17:11:48 +00:00
|
|
|
|
|
|
|
|
= note: `impl Trait` is only allowed in arguments and return types of functions and methods
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2024-01-07 17:11:48 +00:00
|
|
|
error[E0562]: `impl Trait` is not allowed in bounds
|
2023-09-13 16:04:42 +00:00
|
|
|
--> $DIR/where-allowed.rs:184:11
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | where impl Debug: Debug
|
|
|
|
| ^^^^^^^^^^
|
2024-01-07 17:11:48 +00:00
|
|
|
|
|
|
|
|
= note: `impl Trait` is only allowed in arguments and return types of functions and methods
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2024-01-07 17:11:48 +00:00
|
|
|
error[E0562]: `impl Trait` is not allowed in bounds
|
2023-09-13 16:04:42 +00:00
|
|
|
--> $DIR/where-allowed.rs:191:15
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | where Vec<impl Debug>: Debug
|
|
|
|
| ^^^^^^^^^^
|
2024-01-07 17:11:48 +00:00
|
|
|
|
|
|
|
|
= note: `impl Trait` is only allowed in arguments and return types of functions and methods
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2024-01-07 17:11:48 +00:00
|
|
|
error[E0562]: `impl Trait` is not allowed in bounds
|
2023-09-13 16:04:42 +00:00
|
|
|
--> $DIR/where-allowed.rs:198:24
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | where T: PartialEq<impl Debug>
|
|
|
|
| ^^^^^^^^^^
|
2024-01-07 17:11:48 +00:00
|
|
|
|
|
|
|
|
= note: `impl Trait` is only allowed in arguments and return types of functions and methods
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2024-01-07 17:11:48 +00:00
|
|
|
error[E0562]: `impl Trait` is not allowed in the parameters of `Fn` trait bounds
|
2023-09-13 16:04:42 +00:00
|
|
|
--> $DIR/where-allowed.rs:205:17
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | where T: Fn(impl Debug)
|
|
|
|
| ^^^^^^^^^^
|
2024-01-07 17:11:48 +00:00
|
|
|
|
|
|
|
|
= note: `impl Trait` is only allowed in arguments and return types of functions and methods
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2024-01-07 17:11:48 +00:00
|
|
|
error[E0562]: `impl Trait` is not allowed in the return type of `Fn` trait bounds
|
2023-09-13 16:04:42 +00:00
|
|
|
--> $DIR/where-allowed.rs:212:22
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | where T: Fn() -> impl Debug
|
|
|
|
| ^^^^^^^^^^
|
2024-01-07 17:11:48 +00:00
|
|
|
|
|
|
|
|
= note: `impl Trait` is only allowed in arguments and return types of functions and methods
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2024-01-07 17:11:48 +00:00
|
|
|
error[E0562]: `impl Trait` is not allowed in generic parameter defaults
|
2023-09-13 16:04:42 +00:00
|
|
|
--> $DIR/where-allowed.rs:218:40
|
2021-04-06 15:21:08 +00:00
|
|
|
|
|
|
|
|
LL | struct InStructGenericParamDefault<T = impl Debug>(T);
|
|
|
|
| ^^^^^^^^^^
|
2024-01-07 17:11:48 +00:00
|
|
|
|
|
|
|
|
= note: `impl Trait` is only allowed in arguments and return types of functions and methods
|
2021-04-06 15:21:08 +00:00
|
|
|
|
2024-01-07 17:11:48 +00:00
|
|
|
error[E0562]: `impl Trait` is not allowed in generic parameter defaults
|
2023-09-13 16:04:42 +00:00
|
|
|
--> $DIR/where-allowed.rs:222:36
|
2021-04-06 15:21:08 +00:00
|
|
|
|
|
|
|
|
LL | enum InEnumGenericParamDefault<T = impl Debug> { Variant(T) }
|
|
|
|
| ^^^^^^^^^^
|
2024-01-07 17:11:48 +00:00
|
|
|
|
|
|
|
|
= note: `impl Trait` is only allowed in arguments and return types of functions and methods
|
2021-04-06 15:21:08 +00:00
|
|
|
|
2024-01-07 17:11:48 +00:00
|
|
|
error[E0562]: `impl Trait` is not allowed in generic parameter defaults
|
2023-09-13 16:04:42 +00:00
|
|
|
--> $DIR/where-allowed.rs:226:38
|
2021-04-06 15:21:08 +00:00
|
|
|
|
|
|
|
|
LL | trait InTraitGenericParamDefault<T = impl Debug> {}
|
|
|
|
| ^^^^^^^^^^
|
2024-01-07 17:11:48 +00:00
|
|
|
|
|
|
|
|
= note: `impl Trait` is only allowed in arguments and return types of functions and methods
|
2021-04-06 15:21:08 +00:00
|
|
|
|
2024-01-07 17:11:48 +00:00
|
|
|
error[E0562]: `impl Trait` is not allowed in generic parameter defaults
|
2023-09-13 16:04:42 +00:00
|
|
|
--> $DIR/where-allowed.rs:230:41
|
2021-04-06 15:21:08 +00:00
|
|
|
|
|
|
|
|
LL | type InTypeAliasGenericParamDefault<T = impl Debug> = T;
|
|
|
|
| ^^^^^^^^^^
|
2024-01-07 17:11:48 +00:00
|
|
|
|
|
|
|
|
= note: `impl Trait` is only allowed in arguments and return types of functions and methods
|
2021-04-06 15:21:08 +00:00
|
|
|
|
2024-01-07 17:11:48 +00:00
|
|
|
error[E0562]: `impl Trait` is not allowed in generic parameter defaults
|
2023-09-13 16:04:42 +00:00
|
|
|
--> $DIR/where-allowed.rs:234:11
|
2021-04-06 15:21:08 +00:00
|
|
|
|
|
|
|
|
LL | impl <T = impl Debug> T {}
|
|
|
|
| ^^^^^^^^^^
|
2024-01-07 17:11:48 +00:00
|
|
|
|
|
|
|
|
= note: `impl Trait` is only allowed in arguments and return types of functions and methods
|
2021-04-06 15:21:08 +00:00
|
|
|
|
2024-01-07 17:11:48 +00:00
|
|
|
error[E0562]: `impl Trait` is not allowed in generic parameter defaults
|
2023-09-13 16:04:42 +00:00
|
|
|
--> $DIR/where-allowed.rs:241:40
|
2021-04-06 15:21:08 +00:00
|
|
|
|
|
|
|
|
LL | fn in_method_generic_param_default<T = impl Debug>(_: T) {}
|
|
|
|
| ^^^^^^^^^^
|
2024-01-07 17:11:48 +00:00
|
|
|
|
|
|
|
|
= note: `impl Trait` is only allowed in arguments and return types of functions and methods
|
2021-04-06 15:21:08 +00:00
|
|
|
|
2024-01-07 17:11:48 +00:00
|
|
|
error[E0562]: `impl Trait` is not allowed in the type of variable bindings
|
2023-09-13 16:04:42 +00:00
|
|
|
--> $DIR/where-allowed.rs:247:29
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | let _in_local_variable: impl Fn() = || {};
|
|
|
|
| ^^^^^^^^^
|
2024-01-07 17:11:48 +00:00
|
|
|
|
|
|
|
|
= note: `impl Trait` is only allowed in arguments and return types of functions and methods
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2024-01-07 17:11:48 +00:00
|
|
|
error[E0562]: `impl Trait` is not allowed in closure return types
|
2023-09-13 16:04:42 +00:00
|
|
|
--> $DIR/where-allowed.rs:249:46
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | let _in_return_in_local_variable = || -> impl Fn() { || {} };
|
|
|
|
| ^^^^^^^^^
|
2024-01-07 17:11:48 +00:00
|
|
|
|
|
|
|
|
= note: `impl Trait` is only allowed in arguments and return types of functions and methods
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2021-04-06 15:21:08 +00:00
|
|
|
error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
|
2023-09-13 16:04:42 +00:00
|
|
|
--> $DIR/where-allowed.rs:234:7
|
2020-09-26 16:56:03 +00:00
|
|
|
|
|
2021-04-06 15:21:08 +00:00
|
|
|
LL | impl <T = impl Debug> T {}
|
2022-04-04 19:16:20 +00:00
|
|
|
| ^^^^^^^^^^^^^^
|
2020-09-26 16:56:03 +00:00
|
|
|
|
|
2021-04-06 15:21:08 +00:00
|
|
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
|
|
|
= note: for more information, see issue #36887 <https://github.com/rust-lang/rust/issues/36887>
|
2022-09-18 15:55:36 +00:00
|
|
|
= note: `#[deny(invalid_type_param_default)]` on by default
|
2020-09-26 16:56:03 +00:00
|
|
|
|
2021-04-06 15:21:08 +00:00
|
|
|
error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
|
2023-09-13 16:04:42 +00:00
|
|
|
--> $DIR/where-allowed.rs:241:36
|
2019-07-29 23:11:58 +00:00
|
|
|
|
|
2021-04-06 15:21:08 +00:00
|
|
|
LL | fn in_method_generic_param_default<T = impl Debug>(_: T) {}
|
2022-04-04 19:16:20 +00:00
|
|
|
| ^^^^^^^^^^^^^^
|
2019-07-29 23:11:58 +00:00
|
|
|
|
|
2021-04-06 15:21:08 +00:00
|
|
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
|
|
|
= note: for more information, see issue #36887 <https://github.com/rust-lang/rust/issues/36887>
|
2019-07-29 23:11:58 +00:00
|
|
|
|
2021-07-21 03:23:22 +00:00
|
|
|
error[E0118]: no nominal type found for inherent implementation
|
2023-09-13 16:04:42 +00:00
|
|
|
--> $DIR/where-allowed.rs:234:1
|
2021-07-21 03:23:22 +00:00
|
|
|
|
|
|
|
|
LL | impl <T = impl Debug> T {}
|
2023-02-11 23:17:38 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ impl requires a nominal type
|
2021-07-21 03:23:22 +00:00
|
|
|
|
|
|
|
|
= note: either implement a trait on it or create a newtype to wrap it instead
|
|
|
|
|
2023-09-13 16:04:42 +00:00
|
|
|
error: aborting due to 45 previous errors
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2021-07-21 03:23:22 +00:00
|
|
|
Some errors have detailed explanations: E0118, E0562, E0658, E0666.
|
|
|
|
For more information about an error, try `rustc --explain E0118`.
|