diff options
| author | Trevor Gross <tmgross@umich.edu> | 2025-07-01 06:59:49 +0000 |
|---|---|---|
| committer | Kivooeo <Kivooeo123@gmail.com> | 2025-07-01 16:26:56 +0500 |
| commit | 3b57db4d87ea589ec05e2c7543fb6ad2df41795f (patch) | |
| tree | d48c0ffe9e45a1c09922d3a59382363afb8667ea /tests/ui/async-await | |
| parent | f46ce66fcc3d6058f90ac5bf0930f940f1e7b0ca (diff) | |
| download | rust-3b57db4d87ea589ec05e2c7543fb6ad2df41795f.tar.gz rust-3b57db4d87ea589ec05e2c7543fb6ad2df41795f.zip | |
Give some UI tests more apropriate names
Prepare for rework done by the rest of RUST-142440. Co-authored-by: Kivooeo <Kivooeo123@gmail.com>
Diffstat (limited to 'tests/ui/async-await')
| -rw-r--r-- | tests/ui/async-await/impl-future-escaping-bound-vars-ice.rs | 8 | ||||
| -rw-r--r-- | tests/ui/async-await/impl-future-escaping-bound-vars-ice.stderr | 21 |
2 files changed, 29 insertions, 0 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 new file mode 100644 index 00000000000..14b6c0f3581 --- /dev/null +++ b/tests/ui/async-await/impl-future-escaping-bound-vars-ice.rs @@ -0,0 +1,8 @@ +fn test_ref(x: &u32) -> impl std::future::Future<Output = u32> + '_ { + //~^ ERROR `u32` is not a future + *x +} + +fn main() { + let _ = test_ref & u; //~ ERROR cannot find value `u` in this scope +} 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 new file mode 100644 index 00000000000..52dd14ccb0a --- /dev/null +++ b/tests/ui/async-await/impl-future-escaping-bound-vars-ice.stderr @@ -0,0 +1,21 @@ +error[E0425]: cannot find value `u` in this scope + --> $DIR/issues-71798.rs:7:24 + | +LL | let _ = test_ref & u; + | ^ not found in this scope + +error[E0277]: `u32` is not a future + --> $DIR/issues-71798.rs:1:25 + | +LL | fn test_ref(x: &u32) -> impl std::future::Future<Output = u32> + '_ { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `u32` is not a future +LL | +LL | *x + | -- return type was inferred to be `u32` here + | + = help: the trait `Future` is not implemented for `u32` + +error: aborting due to 2 previous errors + +Some errors have detailed explanations: E0277, E0425. +For more information about an error, try `rustc --explain E0277`. |
