summaryrefslogtreecommitdiffstats
path: root/src/test/ui/impl-trait/nested_impl_trait.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/impl-trait/nested_impl_trait.stderr')
-rw-r--r--src/test/ui/impl-trait/nested_impl_trait.stderr22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/test/ui/impl-trait/nested_impl_trait.stderr b/src/test/ui/impl-trait/nested_impl_trait.stderr
index 3291cad68..9a8f5a340 100644
--- a/src/test/ui/impl-trait/nested_impl_trait.stderr
+++ b/src/test/ui/impl-trait/nested_impl_trait.stderr
@@ -1,5 +1,5 @@
error[E0666]: nested `impl Trait` is not allowed
- --> $DIR/nested_impl_trait.rs:5:56
+ --> $DIR/nested_impl_trait.rs:6:56
|
LL | fn bad_in_ret_position(x: impl Into<u32>) -> impl Into<impl Debug> { x }
| ----------^^^^^^^^^^-
@@ -8,7 +8,7 @@ LL | fn bad_in_ret_position(x: impl Into<u32>) -> impl Into<impl Debug> { x }
| outer `impl Trait`
error[E0666]: nested `impl Trait` is not allowed
- --> $DIR/nested_impl_trait.rs:9:42
+ --> $DIR/nested_impl_trait.rs:10:42
|
LL | fn bad_in_fn_syntax(x: fn() -> impl Into<impl Debug>) {}
| ----------^^^^^^^^^^-
@@ -17,7 +17,7 @@ LL | fn bad_in_fn_syntax(x: fn() -> impl Into<impl Debug>) {}
| outer `impl Trait`
error[E0666]: nested `impl Trait` is not allowed
- --> $DIR/nested_impl_trait.rs:13:37
+ --> $DIR/nested_impl_trait.rs:14:37
|
LL | fn bad_in_arg_position(_: impl Into<impl Debug>) { }
| ----------^^^^^^^^^^-
@@ -26,7 +26,7 @@ LL | fn bad_in_arg_position(_: impl Into<impl Debug>) { }
| outer `impl Trait`
error[E0666]: nested `impl Trait` is not allowed
- --> $DIR/nested_impl_trait.rs:18:44
+ --> $DIR/nested_impl_trait.rs:19:44
|
LL | fn bad(x: impl Into<u32>) -> impl Into<impl Debug> { x }
| ----------^^^^^^^^^^-
@@ -35,19 +35,13 @@ LL | fn bad(x: impl Into<u32>) -> impl Into<impl Debug> { x }
| outer `impl Trait`
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `fn` pointer return
- --> $DIR/nested_impl_trait.rs:9:32
+ --> $DIR/nested_impl_trait.rs:10:32
|
LL | fn bad_in_fn_syntax(x: fn() -> impl Into<impl Debug>) {}
| ^^^^^^^^^^^^^^^^^^^^^
-error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `Fn` trait return
- --> $DIR/nested_impl_trait.rs:27:42
- |
-LL | fn allowed_in_ret_type() -> impl Fn() -> impl Into<u32> {
- | ^^^^^^^^^^^^^^
-
error[E0277]: the trait bound `impl Debug: From<impl Into<u32>>` is not satisfied
- --> $DIR/nested_impl_trait.rs:5:46
+ --> $DIR/nested_impl_trait.rs:6:46
|
LL | fn bad_in_ret_position(x: impl Into<u32>) -> impl Into<impl Debug> { x }
| ^^^^^^^^^^^^^^^^^^^^^ the trait `From<impl Into<u32>>` is not implemented for `impl Debug`
@@ -56,7 +50,7 @@ LL | fn bad_in_ret_position(x: impl Into<u32>) -> impl Into<impl Debug> { x }
= note: required for `impl Into<u32>` to implement `Into<impl Debug>`
error[E0277]: the trait bound `impl Debug: From<impl Into<u32>>` is not satisfied
- --> $DIR/nested_impl_trait.rs:18:34
+ --> $DIR/nested_impl_trait.rs:19:34
|
LL | fn bad(x: impl Into<u32>) -> impl Into<impl Debug> { x }
| ^^^^^^^^^^^^^^^^^^^^^ the trait `From<impl Into<u32>>` is not implemented for `impl Debug`
@@ -64,7 +58,7 @@ LL | fn bad(x: impl Into<u32>) -> impl Into<impl Debug> { x }
= help: the trait `Into<U>` is implemented for `T`
= note: required for `impl Into<u32>` to implement `Into<impl Debug>`
-error: aborting due to 8 previous errors
+error: aborting due to 7 previous errors
Some errors have detailed explanations: E0277, E0562, E0666.
For more information about an error, try `rustc --explain E0277`.