diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-03-23 08:35:33 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-23 08:35:33 +0100 |
| commit | 8ab490ff366e24d5c8a9d57b9eca44b8d2d78d17 (patch) | |
| tree | 15a876f220a51e0ef536e274e12041166dd425a8 /tests/ui | |
| parent | cf811810fe8dc92b3ff25e7dd29fb3178c91d409 (diff) | |
| parent | e5189cc7e45991e1c6e9a4218c80d54441b346a9 (diff) | |
| download | rust-8ab490ff366e24d5c8a9d57b9eca44b8d2d78d17.tar.gz rust-8ab490ff366e24d5c8a9d57b9eca44b8d2d78d17.zip | |
Rollup merge of #108541 - compiler-errors:lol-nested-rpits, r=oli-obk
Suppress `opaque_hidden_inferred_bound` for nested RPITs They trigger too much, making repos like linkerd/linkerd2-proxy#2275 sad. Ideally, at least for RPITs (and probably TAITs?), specifically when we have `impl Trait<Assoc = impl ..>`, that nested opaque should have the necessary `Assoc` item bounds elaborated into its own item bounds. But that's another story. r? ```@oli-obk```
Diffstat (limited to 'tests/ui')
| -rw-r--r-- | tests/ui/impl-trait/nested-return-type2.rs | 1 | ||||
| -rw-r--r-- | tests/ui/impl-trait/nested-return-type2.stderr | 17 | ||||
| -rw-r--r-- | tests/ui/impl-trait/nested-return-type3.rs | 1 | ||||
| -rw-r--r-- | tests/ui/impl-trait/nested-return-type3.stderr | 17 |
4 files changed, 0 insertions, 36 deletions
diff --git a/tests/ui/impl-trait/nested-return-type2.rs b/tests/ui/impl-trait/nested-return-type2.rs index fe883ce6fc8..e1d5511379e 100644 --- a/tests/ui/impl-trait/nested-return-type2.rs +++ b/tests/ui/impl-trait/nested-return-type2.rs @@ -26,7 +26,6 @@ impl<R: Duh, F: FnMut() -> R> Trait for F { // Lazy TAIT would error out, but we inserted a hack to make it work again, // keeping backwards compatibility. fn foo() -> impl Trait<Assoc = impl Send> { - //~^ WARN opaque type `impl Trait<Assoc = impl Send>` does not satisfy its associated type bounds || 42 } diff --git a/tests/ui/impl-trait/nested-return-type2.stderr b/tests/ui/impl-trait/nested-return-type2.stderr deleted file mode 100644 index 09ad3bd05c1..00000000000 --- a/tests/ui/impl-trait/nested-return-type2.stderr +++ /dev/null @@ -1,17 +0,0 @@ -warning: opaque type `impl Trait<Assoc = impl Send>` does not satisfy its associated type bounds - --> $DIR/nested-return-type2.rs:28:24 - | -LL | type Assoc: Duh; - | --- this associated type bound is unsatisfied for `impl Send` -... -LL | fn foo() -> impl Trait<Assoc = impl Send> { - | ^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(opaque_hidden_inferred_bound)]` on by default -help: add this bound - | -LL | fn foo() -> impl Trait<Assoc = impl Send + Duh> { - | +++++ - -warning: 1 warning emitted - diff --git a/tests/ui/impl-trait/nested-return-type3.rs b/tests/ui/impl-trait/nested-return-type3.rs index 5a764fc4c28..74b4dae22eb 100644 --- a/tests/ui/impl-trait/nested-return-type3.rs +++ b/tests/ui/impl-trait/nested-return-type3.rs @@ -13,7 +13,6 @@ impl<F: Duh> Trait for F { } fn foo() -> impl Trait<Assoc = impl Send> { - //~^ WARN opaque type `impl Trait<Assoc = impl Send>` does not satisfy its associated type bounds 42 } diff --git a/tests/ui/impl-trait/nested-return-type3.stderr b/tests/ui/impl-trait/nested-return-type3.stderr deleted file mode 100644 index 632de71aa4c..00000000000 --- a/tests/ui/impl-trait/nested-return-type3.stderr +++ /dev/null @@ -1,17 +0,0 @@ -warning: opaque type `impl Trait<Assoc = impl Send>` does not satisfy its associated type bounds - --> $DIR/nested-return-type3.rs:15:24 - | -LL | type Assoc: Duh; - | --- this associated type bound is unsatisfied for `impl Send` -... -LL | fn foo() -> impl Trait<Assoc = impl Send> { - | ^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(opaque_hidden_inferred_bound)]` on by default -help: add this bound - | -LL | fn foo() -> impl Trait<Assoc = impl Send + Duh> { - | +++++ - -warning: 1 warning emitted - |
