summaryrefslogtreecommitdiffstats
path: root/src/test/ui/impl-trait/where-allowed.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/impl-trait/where-allowed.stderr')
-rw-r--r--src/test/ui/impl-trait/where-allowed.stderr98
1 files changed, 43 insertions, 55 deletions
diff --git a/src/test/ui/impl-trait/where-allowed.stderr b/src/test/ui/impl-trait/where-allowed.stderr
index 2e7c7ca40..3ad0a9f9d 100644
--- a/src/test/ui/impl-trait/where-allowed.stderr
+++ b/src/test/ui/impl-trait/where-allowed.stderr
@@ -17,7 +17,7 @@ LL | fn in_impl_Fn_parameter_in_return() -> &'static impl Fn(impl Debug) { panic
| outer `impl Trait`
error[E0658]: `impl Trait` in type aliases is unstable
- --> $DIR/where-allowed.rs:119:16
+ --> $DIR/where-allowed.rs:118:16
|
LL | type Out = impl Debug;
| ^^^^^^^^^^
@@ -26,7 +26,7 @@ LL | type Out = impl Debug;
= help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
error[E0658]: `impl Trait` in type aliases is unstable
- --> $DIR/where-allowed.rs:154:23
+ --> $DIR/where-allowed.rs:153:23
|
LL | type InTypeAlias<R> = impl Debug;
| ^^^^^^^^^^
@@ -35,7 +35,7 @@ LL | type InTypeAlias<R> = impl Debug;
= help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
error[E0658]: `impl Trait` in type aliases is unstable
- --> $DIR/where-allowed.rs:157:39
+ --> $DIR/where-allowed.rs:156:39
|
LL | type InReturnInTypeAlias<R> = fn() -> impl Debug;
| ^^^^^^^^^^
@@ -44,53 +44,47 @@ LL | type InReturnInTypeAlias<R> = fn() -> impl Debug;
= help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `fn` pointer param
- --> $DIR/where-allowed.rs:15:40
+ --> $DIR/where-allowed.rs:16:40
|
LL | fn in_fn_parameter_in_parameters(_: fn(impl Debug)) { panic!() }
| ^^^^^^^^^^
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `fn` pointer return
- --> $DIR/where-allowed.rs:19:42
+ --> $DIR/where-allowed.rs:20:42
|
LL | fn in_fn_return_in_parameters(_: fn() -> impl Debug) { panic!() }
| ^^^^^^^^^^
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `fn` pointer param
- --> $DIR/where-allowed.rs:23:38
+ --> $DIR/where-allowed.rs:24:38
|
LL | fn in_fn_parameter_in_return() -> fn(impl Debug) { panic!() }
| ^^^^^^^^^^
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `fn` pointer return
- --> $DIR/where-allowed.rs:27:40
+ --> $DIR/where-allowed.rs:28:40
|
LL | fn in_fn_return_in_return() -> fn() -> impl Debug { panic!() }
| ^^^^^^^^^^
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `Fn` trait param
- --> $DIR/where-allowed.rs:31:49
+ --> $DIR/where-allowed.rs:32:49
|
LL | fn in_dyn_Fn_parameter_in_parameters(_: &dyn Fn(impl Debug)) { panic!() }
| ^^^^^^^^^^
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `Fn` trait return
- --> $DIR/where-allowed.rs:35:51
+ --> $DIR/where-allowed.rs:36:51
|
LL | fn in_dyn_Fn_return_in_parameters(_: &dyn Fn() -> impl Debug) { panic!() }
| ^^^^^^^^^^
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `Fn` trait param
- --> $DIR/where-allowed.rs:39:55
+ --> $DIR/where-allowed.rs:40:55
|
LL | fn in_dyn_Fn_parameter_in_return() -> &'static dyn Fn(impl Debug) { panic!() }
| ^^^^^^^^^^
-error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `Fn` trait return
- --> $DIR/where-allowed.rs:43:57
- |
-LL | fn in_dyn_Fn_return_in_return() -> &'static dyn Fn() -> impl Debug { panic!() }
- | ^^^^^^^^^^
-
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `Fn` trait param
--> $DIR/where-allowed.rs:47:51
|
@@ -109,56 +103,50 @@ error[E0562]: `impl Trait` only allowed in function and inherent method return t
LL | fn in_impl_Fn_parameter_in_return() -> &'static impl Fn(impl Debug) { panic!() }
| ^^^^^^^^^^
-error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `Fn` trait return
- --> $DIR/where-allowed.rs:61:59
- |
-LL | fn in_impl_Fn_return_in_return() -> &'static impl Fn() -> impl Debug { panic!() }
- | ^^^^^^^^^^
-
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `Fn` trait param
- --> $DIR/where-allowed.rs:65:38
+ --> $DIR/where-allowed.rs:64:38
|
LL | fn in_Fn_parameter_in_generics<F: Fn(impl Debug)> (_: F) { panic!() }
| ^^^^^^^^^^
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `Fn` trait return
- --> $DIR/where-allowed.rs:69:40
+ --> $DIR/where-allowed.rs:68:40
|
LL | fn in_Fn_return_in_generics<F: Fn() -> impl Debug> (_: F) { panic!() }
| ^^^^^^^^^^
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
- --> $DIR/where-allowed.rs:82:32
+ --> $DIR/where-allowed.rs:81:32
|
LL | struct InBraceStructField { x: impl Debug }
| ^^^^^^^^^^
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in path
- --> $DIR/where-allowed.rs:86:41
+ --> $DIR/where-allowed.rs:85:41
|
LL | struct InAdtInBraceStructField { x: Vec<impl Debug> }
| ^^^^^^^^^^
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
- --> $DIR/where-allowed.rs:90:27
+ --> $DIR/where-allowed.rs:89:27
|
LL | struct InTupleStructField(impl Debug);
| ^^^^^^^^^^
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
- --> $DIR/where-allowed.rs:95:25
+ --> $DIR/where-allowed.rs:94:25
|
LL | InBraceVariant { x: impl Debug },
| ^^^^^^^^^^
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
- --> $DIR/where-allowed.rs:97:20
+ --> $DIR/where-allowed.rs:96:20
|
LL | InTupleVariant(impl Debug),
| ^^^^^^^^^^
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in trait method return
- --> $DIR/where-allowed.rs:108:23
+ --> $DIR/where-allowed.rs:107:23
|
LL | fn in_return() -> impl Debug;
| ^^^^^^^^^^
@@ -167,7 +155,7 @@ LL | fn in_return() -> impl Debug;
= help: add `#![feature(return_position_impl_trait_in_trait)]` to the crate attributes to enable
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `impl` method return
- --> $DIR/where-allowed.rs:125:34
+ --> $DIR/where-allowed.rs:124:34
|
LL | fn in_trait_impl_return() -> impl Debug { () }
| ^^^^^^^^^^
@@ -176,127 +164,127 @@ LL | fn in_trait_impl_return() -> impl Debug { () }
= help: add `#![feature(return_position_impl_trait_in_trait)]` to the crate attributes to enable
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `extern fn` param
- --> $DIR/where-allowed.rs:138:33
+ --> $DIR/where-allowed.rs:137:33
|
LL | fn in_foreign_parameters(_: impl Debug);
| ^^^^^^^^^^
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `extern fn` return
- --> $DIR/where-allowed.rs:141:31
+ --> $DIR/where-allowed.rs:140:31
|
LL | fn in_foreign_return() -> impl Debug;
| ^^^^^^^^^^
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `fn` pointer return
- --> $DIR/where-allowed.rs:157:39
+ --> $DIR/where-allowed.rs:156:39
|
LL | type InReturnInTypeAlias<R> = fn() -> impl Debug;
| ^^^^^^^^^^
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in trait
- --> $DIR/where-allowed.rs:162:16
+ --> $DIR/where-allowed.rs:161:16
|
LL | impl PartialEq<impl Debug> for () {
| ^^^^^^^^^^
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
- --> $DIR/where-allowed.rs:167:24
+ --> $DIR/where-allowed.rs:166:24
|
LL | impl PartialEq<()> for impl Debug {
| ^^^^^^^^^^
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
- --> $DIR/where-allowed.rs:172:6
+ --> $DIR/where-allowed.rs:171:6
|
LL | impl impl Debug {
| ^^^^^^^^^^
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
- --> $DIR/where-allowed.rs:178:24
+ --> $DIR/where-allowed.rs:177:24
|
LL | impl InInherentImplAdt<impl Debug> {
| ^^^^^^^^^^
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
- --> $DIR/where-allowed.rs:184:11
+ --> $DIR/where-allowed.rs:183:11
|
LL | where impl Debug: Debug
| ^^^^^^^^^^
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
- --> $DIR/where-allowed.rs:191:15
+ --> $DIR/where-allowed.rs:190:15
|
LL | where Vec<impl Debug>: Debug
| ^^^^^^^^^^
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in bound
- --> $DIR/where-allowed.rs:198:24
+ --> $DIR/where-allowed.rs:197:24
|
LL | where T: PartialEq<impl Debug>
| ^^^^^^^^^^
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `Fn` trait param
- --> $DIR/where-allowed.rs:205:17
+ --> $DIR/where-allowed.rs:204:17
|
LL | where T: Fn(impl Debug)
| ^^^^^^^^^^
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `Fn` trait return
- --> $DIR/where-allowed.rs:212:22
+ --> $DIR/where-allowed.rs:211:22
|
LL | where T: Fn() -> impl Debug
| ^^^^^^^^^^
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
- --> $DIR/where-allowed.rs:218:40
+ --> $DIR/where-allowed.rs:217:40
|
LL | struct InStructGenericParamDefault<T = impl Debug>(T);
| ^^^^^^^^^^
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
- --> $DIR/where-allowed.rs:222:36
+ --> $DIR/where-allowed.rs:221:36
|
LL | enum InEnumGenericParamDefault<T = impl Debug> { Variant(T) }
| ^^^^^^^^^^
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
- --> $DIR/where-allowed.rs:226:38
+ --> $DIR/where-allowed.rs:225:38
|
LL | trait InTraitGenericParamDefault<T = impl Debug> {}
| ^^^^^^^^^^
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
- --> $DIR/where-allowed.rs:230:41
+ --> $DIR/where-allowed.rs:229:41
|
LL | type InTypeAliasGenericParamDefault<T = impl Debug> = T;
| ^^^^^^^^^^
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
- --> $DIR/where-allowed.rs:234:11
+ --> $DIR/where-allowed.rs:233:11
|
LL | impl <T = impl Debug> T {}
| ^^^^^^^^^^
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
- --> $DIR/where-allowed.rs:241:40
+ --> $DIR/where-allowed.rs:240:40
|
LL | fn in_method_generic_param_default<T = impl Debug>(_: T) {}
| ^^^^^^^^^^
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in variable binding
- --> $DIR/where-allowed.rs:247:29
+ --> $DIR/where-allowed.rs:246:29
|
LL | let _in_local_variable: impl Fn() = || {};
| ^^^^^^^^^
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in closure return
- --> $DIR/where-allowed.rs:249:46
+ --> $DIR/where-allowed.rs:248:46
|
LL | let _in_return_in_local_variable = || -> impl Fn() { || {} };
| ^^^^^^^^^
error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
- --> $DIR/where-allowed.rs:234:7
+ --> $DIR/where-allowed.rs:233:7
|
LL | impl <T = impl Debug> T {}
| ^^^^^^^^^^^^^^
@@ -306,7 +294,7 @@ LL | impl <T = impl Debug> T {}
= note: `#[deny(invalid_type_param_default)]` on by default
error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
- --> $DIR/where-allowed.rs:241:36
+ --> $DIR/where-allowed.rs:240:36
|
LL | fn in_method_generic_param_default<T = impl Debug>(_: T) {}
| ^^^^^^^^^^^^^^
@@ -315,14 +303,14 @@ LL | fn in_method_generic_param_default<T = impl Debug>(_: T) {}
= note: for more information, see issue #36887 <https://github.com/rust-lang/rust/issues/36887>
error[E0118]: no nominal type found for inherent implementation
- --> $DIR/where-allowed.rs:234:23
+ --> $DIR/where-allowed.rs:233:23
|
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
-error: aborting due to 49 previous errors
+error: aborting due to 47 previous errors
Some errors have detailed explanations: E0118, E0562, E0658, E0666.
For more information about an error, try `rustc --explain E0118`.