2018-08-08 07:28:26 -05:00
|
|
|
error[E0666]: nested `impl Trait` is not allowed
|
2022-07-28 15:18:32 -05:00
|
|
|
--> $DIR/where-allowed.rs:47:51
|
2018-08-08 07:28:26 -05: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
|
2022-07-28 15:18:32 -05:00
|
|
|
--> $DIR/where-allowed.rs:56:57
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | fn in_impl_Fn_parameter_in_return() -> &'static impl Fn(impl Debug) { panic!() }
|
|
|
|
| --------^^^^^^^^^^-
|
|
|
|
| | |
|
|
|
|
| | nested `impl Trait` here
|
|
|
|
| outer `impl Trait`
|
|
|
|
|
2019-07-31 18:41:54 -05:00
|
|
|
error[E0658]: `impl Trait` in type aliases is unstable
|
2022-07-28 15:18:32 -05:00
|
|
|
--> $DIR/where-allowed.rs:118:16
|
2019-07-29 18:11:58 -05:00
|
|
|
|
|
|
|
|
LL | type Out = impl Debug;
|
2019-11-07 13:12:34 -06:00
|
|
|
| ^^^^^^^^^^
|
2019-07-29 18:11:58 -05:00
|
|
|
|
|
2020-02-07 06:07:02 -06:00
|
|
|
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
|
2021-07-26 15:01:16 -05:00
|
|
|
= help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
|
2019-07-29 18:11:58 -05:00
|
|
|
|
2019-07-31 18:41:54 -05:00
|
|
|
error[E0658]: `impl Trait` in type aliases is unstable
|
2022-07-28 15:18:32 -05:00
|
|
|
--> $DIR/where-allowed.rs:153:23
|
2019-07-29 18:11:58 -05:00
|
|
|
|
|
|
|
|
LL | type InTypeAlias<R> = impl Debug;
|
2019-11-07 13:12:34 -06:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
2020-02-07 06:07:02 -06:00
|
|
|
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
|
2021-07-26 15:01:16 -05:00
|
|
|
= help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
|
2019-11-07 13:12:34 -06:00
|
|
|
|
|
|
|
error[E0658]: `impl Trait` in type aliases is unstable
|
2022-07-28 15:18:32 -05:00
|
|
|
--> $DIR/where-allowed.rs:156:39
|
2019-11-07 13:12:34 -06:00
|
|
|
|
|
|
|
|
LL | type InReturnInTypeAlias<R> = fn() -> impl Debug;
|
|
|
|
| ^^^^^^^^^^
|
2019-07-29 18:11:58 -05:00
|
|
|
|
|
2020-02-07 06:07:02 -06:00
|
|
|
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
|
2021-07-26 15:01:16 -05:00
|
|
|
= help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
|
2019-07-29 18:11:58 -05:00
|
|
|
|
2022-02-17 21:18:42 -06:00
|
|
|
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `fn` pointer param
|
2022-07-28 15:18:32 -05:00
|
|
|
--> $DIR/where-allowed.rs:16:40
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | fn in_fn_parameter_in_parameters(_: fn(impl Debug)) { panic!() }
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
2022-02-17 21:18:42 -06:00
|
|
|
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `fn` pointer return
|
2022-07-28 15:18:32 -05:00
|
|
|
--> $DIR/where-allowed.rs:20:42
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | fn in_fn_return_in_parameters(_: fn() -> impl Debug) { panic!() }
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
2022-02-17 21:18:42 -06:00
|
|
|
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `fn` pointer param
|
2022-07-28 15:18:32 -05:00
|
|
|
--> $DIR/where-allowed.rs:24:38
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | fn in_fn_parameter_in_return() -> fn(impl Debug) { panic!() }
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
2022-02-17 21:18:42 -06:00
|
|
|
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `fn` pointer return
|
2022-07-28 15:18:32 -05:00
|
|
|
--> $DIR/where-allowed.rs:28:40
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | fn in_fn_return_in_return() -> fn() -> impl Debug { panic!() }
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
2022-02-17 21:18:42 -06:00
|
|
|
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `Fn` trait param
|
2022-07-28 15:18:32 -05:00
|
|
|
--> $DIR/where-allowed.rs:32:49
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | fn in_dyn_Fn_parameter_in_parameters(_: &dyn Fn(impl Debug)) { panic!() }
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
2022-02-17 21:18:42 -06:00
|
|
|
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `Fn` trait return
|
2022-07-28 15:18:32 -05:00
|
|
|
--> $DIR/where-allowed.rs:36:51
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | fn in_dyn_Fn_return_in_parameters(_: &dyn Fn() -> impl Debug) { panic!() }
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
2022-02-17 21:18:42 -06:00
|
|
|
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `Fn` trait param
|
2022-07-28 15:18:32 -05:00
|
|
|
--> $DIR/where-allowed.rs:40:55
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | fn in_dyn_Fn_parameter_in_return() -> &'static dyn Fn(impl Debug) { panic!() }
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
2022-02-17 21:18:42 -06:00
|
|
|
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `Fn` trait param
|
2022-07-28 15:18:32 -05:00
|
|
|
--> $DIR/where-allowed.rs:47:51
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | fn in_impl_Fn_parameter_in_parameters(_: &impl Fn(impl Debug)) { panic!() }
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
2022-02-17 21:18:42 -06:00
|
|
|
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `Fn` trait return
|
2022-07-28 15:18:32 -05:00
|
|
|
--> $DIR/where-allowed.rs:52:53
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | fn in_impl_Fn_return_in_parameters(_: &impl Fn() -> impl Debug) { panic!() }
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
2022-02-17 21:18:42 -06:00
|
|
|
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `Fn` trait param
|
2022-07-28 15:18:32 -05:00
|
|
|
--> $DIR/where-allowed.rs:56:57
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | fn in_impl_Fn_parameter_in_return() -> &'static impl Fn(impl Debug) { panic!() }
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
2022-02-17 21:18:42 -06:00
|
|
|
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `Fn` trait param
|
2022-07-28 15:18:32 -05:00
|
|
|
--> $DIR/where-allowed.rs:64:38
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | fn in_Fn_parameter_in_generics<F: Fn(impl Debug)> (_: F) { panic!() }
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
2022-02-17 21:18:42 -06:00
|
|
|
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `Fn` trait return
|
2022-07-28 15:18:32 -05:00
|
|
|
--> $DIR/where-allowed.rs:68:40
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | fn in_Fn_return_in_generics<F: Fn() -> impl Debug> (_: F) { panic!() }
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
2022-02-17 21:18:42 -06:00
|
|
|
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
|
2022-07-28 15:18:32 -05:00
|
|
|
--> $DIR/where-allowed.rs:81:32
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | struct InBraceStructField { x: impl Debug }
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
2022-02-17 21:18:42 -06:00
|
|
|
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in path
|
2022-07-28 15:18:32 -05:00
|
|
|
--> $DIR/where-allowed.rs:85:41
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | struct InAdtInBraceStructField { x: Vec<impl Debug> }
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
2022-02-17 21:18:42 -06:00
|
|
|
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
|
2022-07-28 15:18:32 -05:00
|
|
|
--> $DIR/where-allowed.rs:89:27
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | struct InTupleStructField(impl Debug);
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
2022-02-17 21:18:42 -06:00
|
|
|
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
|
2022-07-28 15:18:32 -05:00
|
|
|
--> $DIR/where-allowed.rs:94:25
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | InBraceVariant { x: impl Debug },
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
2022-02-17 21:18:42 -06:00
|
|
|
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
|
2022-07-28 15:18:32 -05:00
|
|
|
--> $DIR/where-allowed.rs:96:20
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | InTupleVariant(impl Debug),
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
2022-02-17 21:18:42 -06:00
|
|
|
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in trait method return
|
2022-07-28 15:18:32 -05:00
|
|
|
--> $DIR/where-allowed.rs:107:23
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | fn in_return() -> impl Debug;
|
|
|
|
| ^^^^^^^^^^
|
2022-09-06 12:16:08 -05:00
|
|
|
|
|
|
|
|
= note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
|
|
|
|
= help: add `#![feature(return_position_impl_trait_in_trait)]` to the crate attributes to enable
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2022-02-17 21:18:42 -06:00
|
|
|
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `impl` method return
|
2022-07-28 15:18:32 -05:00
|
|
|
--> $DIR/where-allowed.rs:124:34
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | fn in_trait_impl_return() -> impl Debug { () }
|
|
|
|
| ^^^^^^^^^^
|
2022-09-06 12:16:08 -05:00
|
|
|
|
|
|
|
|
= note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
|
|
|
|
= help: add `#![feature(return_position_impl_trait_in_trait)]` to the crate attributes to enable
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2022-02-17 21:18:42 -06:00
|
|
|
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `extern fn` param
|
2022-07-28 15:18:32 -05:00
|
|
|
--> $DIR/where-allowed.rs:137:33
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | fn in_foreign_parameters(_: impl Debug);
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
2022-02-17 21:18:42 -06:00
|
|
|
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `extern fn` return
|
2022-07-28 15:18:32 -05:00
|
|
|
--> $DIR/where-allowed.rs:140:31
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | fn in_foreign_return() -> impl Debug;
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
2022-02-17 21:18:42 -06:00
|
|
|
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `fn` pointer return
|
2022-07-28 15:18:32 -05:00
|
|
|
--> $DIR/where-allowed.rs:156:39
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | type InReturnInTypeAlias<R> = fn() -> impl Debug;
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
2022-02-17 21:18:42 -06:00
|
|
|
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in trait
|
2022-07-28 15:18:32 -05:00
|
|
|
--> $DIR/where-allowed.rs:161:16
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | impl PartialEq<impl Debug> for () {
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
2022-02-17 21:18:42 -06:00
|
|
|
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
|
2022-07-28 15:18:32 -05:00
|
|
|
--> $DIR/where-allowed.rs:166:24
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | impl PartialEq<()> for impl Debug {
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
2022-02-17 21:18:42 -06:00
|
|
|
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
|
2022-07-28 15:18:32 -05:00
|
|
|
--> $DIR/where-allowed.rs:171:6
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | impl impl Debug {
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
2022-02-17 21:18:42 -06:00
|
|
|
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
|
2022-07-28 15:18:32 -05:00
|
|
|
--> $DIR/where-allowed.rs:177:24
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | impl InInherentImplAdt<impl Debug> {
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
2022-02-17 21:18:42 -06:00
|
|
|
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
|
2022-07-28 15:18:32 -05:00
|
|
|
--> $DIR/where-allowed.rs:183:11
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | where impl Debug: Debug
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
2022-02-17 21:18:42 -06:00
|
|
|
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
|
2022-07-28 15:18:32 -05:00
|
|
|
--> $DIR/where-allowed.rs:190:15
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | where Vec<impl Debug>: Debug
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
2022-02-17 21:18:42 -06:00
|
|
|
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in bound
|
2022-07-28 15:18:32 -05:00
|
|
|
--> $DIR/where-allowed.rs:197:24
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | where T: PartialEq<impl Debug>
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
2022-02-17 21:18:42 -06:00
|
|
|
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `Fn` trait param
|
2022-07-28 15:18:32 -05:00
|
|
|
--> $DIR/where-allowed.rs:204:17
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | where T: Fn(impl Debug)
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
2022-02-17 21:18:42 -06:00
|
|
|
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `Fn` trait return
|
2022-07-28 15:18:32 -05:00
|
|
|
--> $DIR/where-allowed.rs:211:22
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | where T: Fn() -> impl Debug
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
2022-02-17 21:18:42 -06:00
|
|
|
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
|
2022-07-28 15:18:32 -05:00
|
|
|
--> $DIR/where-allowed.rs:217:40
|
2021-04-06 10:21:08 -05:00
|
|
|
|
|
|
|
|
LL | struct InStructGenericParamDefault<T = impl Debug>(T);
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
2022-02-17 21:18:42 -06:00
|
|
|
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
|
2022-07-28 15:18:32 -05:00
|
|
|
--> $DIR/where-allowed.rs:221:36
|
2021-04-06 10:21:08 -05:00
|
|
|
|
|
|
|
|
LL | enum InEnumGenericParamDefault<T = impl Debug> { Variant(T) }
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
2022-02-17 21:18:42 -06:00
|
|
|
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
|
2022-07-28 15:18:32 -05:00
|
|
|
--> $DIR/where-allowed.rs:225:38
|
2021-04-06 10:21:08 -05:00
|
|
|
|
|
|
|
|
LL | trait InTraitGenericParamDefault<T = impl Debug> {}
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
2022-02-17 21:18:42 -06:00
|
|
|
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
|
2022-07-28 15:18:32 -05:00
|
|
|
--> $DIR/where-allowed.rs:229:41
|
2021-04-06 10:21:08 -05:00
|
|
|
|
|
|
|
|
LL | type InTypeAliasGenericParamDefault<T = impl Debug> = T;
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
2022-02-17 21:18:42 -06:00
|
|
|
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
|
2022-07-28 15:18:32 -05:00
|
|
|
--> $DIR/where-allowed.rs:233:11
|
2021-04-06 10:21:08 -05:00
|
|
|
|
|
|
|
|
LL | impl <T = impl Debug> T {}
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
2022-02-17 21:18:42 -06:00
|
|
|
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
|
2022-07-28 15:18:32 -05:00
|
|
|
--> $DIR/where-allowed.rs:240:40
|
2021-04-06 10:21:08 -05:00
|
|
|
|
|
|
|
|
LL | fn in_method_generic_param_default<T = impl Debug>(_: T) {}
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
2022-02-17 21:18:42 -06:00
|
|
|
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in variable binding
|
2022-07-28 15:18:32 -05:00
|
|
|
--> $DIR/where-allowed.rs:246:29
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | let _in_local_variable: impl Fn() = || {};
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
2022-02-17 21:18:42 -06:00
|
|
|
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in closure return
|
2022-07-28 15:18:32 -05:00
|
|
|
--> $DIR/where-allowed.rs:248:46
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | let _in_return_in_local_variable = || -> impl Fn() { || {} };
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
2021-04-06 10:21:08 -05:00
|
|
|
error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
|
2022-07-28 15:18:32 -05:00
|
|
|
--> $DIR/where-allowed.rs:233:7
|
2020-09-26 11:56:03 -05:00
|
|
|
|
|
2021-04-06 10:21:08 -05:00
|
|
|
LL | impl <T = impl Debug> T {}
|
2022-04-04 14:16:20 -05:00
|
|
|
| ^^^^^^^^^^^^^^
|
2020-09-26 11:56:03 -05:00
|
|
|
|
|
2021-04-06 10:21:08 -05: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 10:55:36 -05:00
|
|
|
= note: `#[deny(invalid_type_param_default)]` on by default
|
2020-09-26 11:56:03 -05:00
|
|
|
|
2021-04-06 10:21:08 -05:00
|
|
|
error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
|
2022-07-28 15:18:32 -05:00
|
|
|
--> $DIR/where-allowed.rs:240:36
|
2019-07-29 18:11:58 -05:00
|
|
|
|
|
2021-04-06 10:21:08 -05:00
|
|
|
LL | fn in_method_generic_param_default<T = impl Debug>(_: T) {}
|
2022-04-04 14:16:20 -05:00
|
|
|
| ^^^^^^^^^^^^^^
|
2019-07-29 18:11:58 -05:00
|
|
|
|
|
2021-04-06 10:21:08 -05: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 18:11:58 -05:00
|
|
|
|
2021-07-20 22:23:22 -05:00
|
|
|
error[E0118]: no nominal type found for inherent implementation
|
2022-07-28 15:18:32 -05:00
|
|
|
--> $DIR/where-allowed.rs:233:23
|
2021-07-20 22:23:22 -05:00
|
|
|
|
|
|
|
|
LL | impl <T = impl Debug> T {}
|
|
|
|
| ^ impl requires a nominal type
|
|
|
|
|
|
|
|
|
= note: either implement a trait on it or create a newtype to wrap it instead
|
|
|
|
|
2022-02-02 06:09:44 -06:00
|
|
|
error: aborting due to 47 previous errors
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2021-07-20 22:23:22 -05:00
|
|
|
Some errors have detailed explanations: E0118, E0562, E0658, E0666.
|
|
|
|
For more information about an error, try `rustc --explain E0118`.
|