about summary refs log tree commit diff
path: root/tests/ui/impl-trait/recursive-in-exhaustiveness.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-05-20 15:48:56 +0000
committerbors <bors@rust-lang.org>2025-05-20 15:48:56 +0000
commit444a62712a29e14d3b6147b51fd24e623496bf58 (patch)
treea947a2d73273ff78fff8c9e97344f9dd6746551c /tests/ui/impl-trait/recursive-in-exhaustiveness.rs
parent6cab15c1aef39456d86ce51be6096088cb2ef1da (diff)
parentcc0ee34b43ffb49fe37109a1fb3ad5e85878c4b8 (diff)
downloadrust-444a62712a29e14d3b6147b51fd24e623496bf58.tar.gz
rust-444a62712a29e14d3b6147b51fd24e623496bf58.zip
Auto merge of #141292 - matthiaskrgr:rollup-9nhhk7k, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #139419 (Error on recursive opaque ty in HIR typeck)
 - #141236 (Resolved issue with mismatched types triggering ICE in certain scenarios)
 - #141253 (Warning added when dependency crate has async drop types, and the feature is disabled)
 - #141269 (rustc-dev-guide subtree update)
 - #141275 (`gather_locals`: only visit guard pattern guards when checking the guard)
 - #141279 (`lower_to_hir` cleanups)
 - #141285 (Add tick to `RePlaceholder` debug output)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'tests/ui/impl-trait/recursive-in-exhaustiveness.rs')
-rw-r--r--tests/ui/impl-trait/recursive-in-exhaustiveness.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/ui/impl-trait/recursive-in-exhaustiveness.rs b/tests/ui/impl-trait/recursive-in-exhaustiveness.rs
index 58944533686..fa8fa0e8174 100644
--- a/tests/ui/impl-trait/recursive-in-exhaustiveness.rs
+++ b/tests/ui/impl-trait/recursive-in-exhaustiveness.rs
@@ -15,7 +15,7 @@
 // We unfortunately accept this today, and due to how opaque type relating is implemented
 // in the NLL type relation, this defines `Opaque<T> = T`.
 fn build<T>(x: T) -> impl Sized {
-    //[current]~^ WARN function cannot return without recursing
+    //[current]~^ ERROR cannot resolve opaque type
     let (x,) = (build(x),);
     //[next]~^ ERROR type annotations needed
     build(x)
@@ -26,7 +26,6 @@ fn build<T>(x: T) -> impl Sized {
 // Not allowed today. Detected as recursive.
 fn build2<T>(x: T) -> impl Sized {
     //[current]~^ ERROR cannot resolve opaque type
-    //[current]~| WARN function cannot return without recursing
     let (x,) = (build2(x),);
     (build2(x),)
     //[next]~^ ERROR type mismatch resolving
@@ -38,7 +37,7 @@ fn build2<T>(x: T) -> impl Sized {
 //
 // Not allowed today. Detected as not defining.
 fn build3<T>(x: T) -> impl Sized {
-    //[current]~^ WARN function cannot return without recursing
+    //[current]~^ ERROR cannot resolve opaque type
     let (x,) = (build3((x,)),);
     //[next]~^ ERROR type mismatch resolving
     //[next]~| ERROR type mismatch resolving
@@ -47,7 +46,6 @@ fn build3<T>(x: T) -> impl Sized {
     //[next]~| ERROR the size for values of type
     //[next]~| ERROR mismatched types
     build3(x)
-    //[current]~^ ERROR expected generic type parameter, found `(T,)`
 }
 
 fn main() {}