diff options
| author | Kivooeo <Kivooeo123@gmail.com> | 2025-06-13 02:30:47 +0500 |
|---|---|---|
| committer | Kivooeo <Kivooeo123@gmail.com> | 2025-07-01 16:26:57 +0500 |
| commit | 1daba456361d0bbac3d0bd9e0f11b7784d20ebe5 (patch) | |
| tree | 40d1ff4258c3d46b8f8568ee2ab35b481adaf6dc /tests/ui/async-await | |
| parent | 3b57db4d87ea589ec05e2c7543fb6ad2df41795f (diff) | |
| download | rust-1daba456361d0bbac3d0bd9e0f11b7784d20ebe5.tar.gz rust-1daba456361d0bbac3d0bd9e0f11b7784d20ebe5.zip | |
cleaned up some tests
Diffstat (limited to 'tests/ui/async-await')
| -rw-r--r-- | tests/ui/async-await/impl-future-escaping-bound-vars-ice.rs | 4 | ||||
| -rw-r--r-- | tests/ui/async-await/impl-future-escaping-bound-vars-ice.stderr | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/tests/ui/async-await/impl-future-escaping-bound-vars-ice.rs b/tests/ui/async-await/impl-future-escaping-bound-vars-ice.rs index 14b6c0f3581..ea30e8c839f 100644 --- a/tests/ui/async-await/impl-future-escaping-bound-vars-ice.rs +++ b/tests/ui/async-await/impl-future-escaping-bound-vars-ice.rs @@ -1,3 +1,7 @@ +//! Regression test for issue https://github.com/rust-lang/rust/issues/71798 +// ICE with escaping bound variables when impl Future + '_ +// returns non-Future type combined with syntax errors + fn test_ref(x: &u32) -> impl std::future::Future<Output = u32> + '_ { //~^ ERROR `u32` is not a future *x diff --git a/tests/ui/async-await/impl-future-escaping-bound-vars-ice.stderr b/tests/ui/async-await/impl-future-escaping-bound-vars-ice.stderr index 52dd14ccb0a..5beca58e13c 100644 --- a/tests/ui/async-await/impl-future-escaping-bound-vars-ice.stderr +++ b/tests/ui/async-await/impl-future-escaping-bound-vars-ice.stderr @@ -1,11 +1,11 @@ error[E0425]: cannot find value `u` in this scope - --> $DIR/issues-71798.rs:7:24 + --> $DIR/impl-future-escaping-bound-vars-ice.rs:11:24 | LL | let _ = test_ref & u; | ^ not found in this scope error[E0277]: `u32` is not a future - --> $DIR/issues-71798.rs:1:25 + --> $DIR/impl-future-escaping-bound-vars-ice.rs:5:25 | LL | fn test_ref(x: &u32) -> impl std::future::Future<Output = u32> + '_ { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `u32` is not a future |
