diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2022-02-10 14:53:50 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2022-03-28 16:29:54 +0000 |
| commit | 1c5bfb17703975ff9952243c24c46cf54fe0d49c (patch) | |
| tree | 97957c637ce3e87550fe69caf11dad04134fd9eb /src/test/ui/impl-trait/nested_impl_trait.rs | |
| parent | f42a6793ce3d32a8d414519b8ec82141f7996479 (diff) | |
| download | rust-1c5bfb17703975ff9952243c24c46cf54fe0d49c.tar.gz rust-1c5bfb17703975ff9952243c24c46cf54fe0d49c.zip | |
Don't bind hidden types when searching for matching impls
Diffstat (limited to 'src/test/ui/impl-trait/nested_impl_trait.rs')
| -rw-r--r-- | src/test/ui/impl-trait/nested_impl_trait.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/ui/impl-trait/nested_impl_trait.rs b/src/test/ui/impl-trait/nested_impl_trait.rs index ec2d49d9367..85c6f8c462c 100644 --- a/src/test/ui/impl-trait/nested_impl_trait.rs +++ b/src/test/ui/impl-trait/nested_impl_trait.rs @@ -4,7 +4,7 @@ fn fine(x: impl Into<u32>) -> impl Into<u32> { x } fn bad_in_ret_position(x: impl Into<u32>) -> impl Into<impl Debug> { x } //~^ ERROR nested `impl Trait` is not allowed -//~| ERROR `impl Into<u32>` doesn't implement `Debug` +//~| ERROR the trait bound `impl Debug: From<impl Into<u32>>` is not satisfied fn bad_in_fn_syntax(x: fn() -> impl Into<impl Debug>) {} //~^ ERROR nested `impl Trait` is not allowed @@ -17,7 +17,7 @@ struct X; impl X { fn bad(x: impl Into<u32>) -> impl Into<impl Debug> { x } //~^ ERROR nested `impl Trait` is not allowed - //~| ERROR `impl Into<u32>` doesn't implement `Debug` + //~| ERROR the trait bound `impl Debug: From<impl Into<u32>>` is not satisfied } fn allowed_in_assoc_type() -> impl Iterator<Item=impl Fn()> { |
