rust/tests/ui/async-await
bors a971212545 Auto merge of #127672 - compiler-errors:precise-capturing, r=spastorino
Stabilize opaque type precise capturing (RFC 3617)

This PR partially stabilizes opaque type *precise capturing*, which was specified in [RFC 3617](https://github.com/rust-lang/rfcs/pull/3617), and whose syntax was amended by FCP in [#125836](https://github.com/rust-lang/rust/issues/125836).

This feature, as stabilized here, gives us a way to explicitly specify the generic lifetime parameters that an RPIT-like opaque type captures.  This solves the problem of overcapturing, for lifetime parameters in these opaque types, and will allow the Lifetime Capture Rules 2024 ([RFC 3498](https://github.com/rust-lang/rfcs/pull/3498)) to be fully stabilized for RPIT in Rust 2024.

### What are we stabilizing?

This PR stabilizes the use of a `use<'a, T>` bound in return-position impl Trait opaque types.  Such a bound fully specifies the set of generic parameters captured by the RPIT opaque type, entirely overriding the implicit default behavior.  E.g.:

```rust
fn does_not_capture<'a, 'b>() -> impl Sized + use<'a> {}
//                               ~~~~~~~~~~~~~~~~~~~~
//                This RPIT opaque type does not capture `'b`.
```

The way we would suggest thinking of `impl Trait` types *without* an explicit `use<..>` bound is that the `use<..>` bound has been *elided*, and that the bound is filled in automatically by the compiler according to the edition-specific capture rules.

All non-`'static` lifetime parameters, named (i.e. non-APIT) type parameters, and const parameters in scope are valid to name, including an elided lifetime if such a lifetime would also be valid in an outlives bound, e.g.:

```rust
fn elided(x: &u8) -> impl Sized + use<'_> { x }
```

Lifetimes must be listed before type and const parameters, but otherwise the ordering is not relevant to the `use<..>` bound.  Captured parameters may not be duplicated.  For now, only one `use<..>` bound may appear in a bounds list.  It may appear anywhere within the bounds list.

### How does this differ from the RFC?

This stabilization differs from the RFC in one respect: the RFC originally specified `use<'a, T>` as syntactically part of the RPIT type itself, e.g.:

```rust
fn capture<'a>() -> impl use<'a> Sized {}
```

However, settling on the final syntax was left as an open question.  T-lang later decided via FCP in [#125836](https://github.com/rust-lang/rust/issues/125836) to treat `use<..>` as a syntactic bound instead, e.g.:

```rust
fn capture<'a>() -> impl Sized + use<'a> {}
```

### What aren't we stabilizing?

The key goal of this PR is to stabilize the parts of *precise capturing* that are needed to enable the migration to Rust 2024.

There are some capabilities of *precise capturing* that the RFC specifies but that we're not stabilizing here, as these require further work on the type system.  We hope to lift these limitations later.

The limitations that are part of this PR were specified in the [RFC's stabilization strategy](https://rust-lang.github.io/rfcs/3617-precise-capturing.html#stabilization-strategy).

#### Not capturing type or const parameters

The RFC addresses the overcapturing of type and const parameters; that is, it allows for them to not be captured in opaque types.  We're not stabilizing that in this PR.  Since all in scope generic type and const parameters are implicitly captured in all editions, this is not needed for the migration to Rust 2024.

For now, when using `use<..>`, all in scope type and const parameters must be nameable (i.e., APIT cannot be used) and included as arguments.  For example, this is an error because `T` is in scope and not included as an argument:

```rust
fn test<T>() -> impl Sized + use<> {}
//~^ ERROR `impl Trait` must mention all type parameters in scope in `use<...>`
```

This is due to certain current limitations in the type system related to how generic parameters are represented as captured (i.e. bivariance) and how inference operates.

We hope to relax this in the future, and this stabilization is forward compatible with doing so.

#### Precise capturing for return-position impl Trait **in trait** (RPITIT)

The RFC specifies precise capturing for RPITIT.  We're not stabilizing that in this PR.  Since RPITIT already adheres to the Lifetime Capture Rules 2024, this isn't needed for the migration to Rust 2024.

The effect of this is that the anonymous associated types created by RPITITs must continue to capture all of the lifetime parameters in scope, e.g.:

```rust
trait Foo<'a> {
    fn test() -> impl Sized + use<Self>;
    //~^ ERROR `use<...>` precise capturing syntax is currently not allowed in return-position `impl Trait` in traits
}
```

To allow this involves a meaningful amount of type system work related to adding variance to GATs or reworking how generics are represented in RPITITs.  We plan to do this work separately from the stabilization.  See:

- https://github.com/rust-lang/rust/pull/124029

Supporting precise capturing for RPITIT will also require us to implement a new algorithm for detecting refining capture behavior.  This may involve looking through type parameters to detect cases where the impl Trait type in an implementation captures fewer lifetimes than the corresponding RPITIT in the trait definition, e.g.:

```rust
trait Foo {
    fn rpit() -> impl Sized + use<Self>;
}

impl<'a> Foo for &'a () {
    // This is "refining" due to not capturing `'a` which
    // is implied by the trait's `use<Self>`.
    fn rpit() -> impl Sized + use<>;

    // This is not "refining".
    fn rpit() -> impl Sized + use<'a>;
}
```

This stabilization is forward compatible with adding support for this later.

### The technical details

This bound is purely syntactical and does not lower to a [`Clause`](https://doc.rust-lang.org/1.79.0/nightly-rustc/rustc_middle/ty/type.ClauseKind.html) in the type system.  For the purposes of the type system (and for the types team's curiosity regarding this stabilization), we have no current need to represent this as a `ClauseKind`.

Since opaques already capture a variable set of lifetimes depending on edition and their syntactical position (e.g. RPIT vs RPITIT), a `use<..>` bound is just a way to explicitly rather than implicitly specify that set of lifetimes, and this only affects opaque type lowering from AST to HIR.

### FCP plan

While there's much discussion of the type system here, the feature in this PR is implemented internally as a transformation that happens before lowering to the type system layer.  We already support impl Trait types partially capturing the in scope lifetimes; we just currently only expose that implicitly.

So, in my (errs's) view as a types team member, there's nothing for types to weigh in on here with respect to the implementation being stabilized, and I'd suggest a lang-only proposed FCP (though we'll of course CC the team below).

### Authorship and acknowledgments

This stabilization report was coauthored by compiler-errors and TC.

TC would like to acknowledge the outstanding and speedy work that compiler-errors has done to make this feature happen.

compiler-errors thanks TC for authoring the RFC, for all of his involvement in this feature's development, and pushing the Rust 2024 edition forward.

### Open items

We're doing some things in parallel here.  In signaling the intention to stabilize, we want to uncover any latent issues so we can be sure they get addressed.  We want to give the maximum time for discussion here to happen by starting it while other remaining miscellaneous work proceeds.  That work includes:

- [x] Look into `syn` support.
  - https://github.com/dtolnay/syn/issues/1677
  - https://github.com/dtolnay/syn/pull/1707
- [x] Look into `rustfmt` support.
  - https://github.com/rust-lang/rust/pull/126754
- [x] Look into `rust-analyzer` support.
  - https://github.com/rust-lang/rust-analyzer/issues/17598
  - https://github.com/rust-lang/rust-analyzer/pull/17676
- [x] Look into `rustdoc` support.
  - https://github.com/rust-lang/rust/issues/127228
  - https://github.com/rust-lang/rust/pull/127632
  - https://github.com/rust-lang/rust/pull/127658
- [x] Suggest this feature to RfL (a known nightly user).
- [x] Add a chapter to the edition guide.
  - https://github.com/rust-lang/edition-guide/pull/316
- [x] Update the Reference.
  - https://github.com/rust-lang/reference/pull/1577

### (Selected) implementation history

* https://github.com/rust-lang/rfcs/pull/3498
* https://github.com/rust-lang/rfcs/pull/3617
* https://github.com/rust-lang/rust/pull/123468
* https://github.com/rust-lang/rust/issues/125836
* https://github.com/rust-lang/rust/pull/126049
* https://github.com/rust-lang/rust/pull/126753

Closes #123432.

cc `@rust-lang/lang` `@rust-lang/types`

`@rustbot` labels +T-lang +I-lang-nominated +A-impl-trait +F-precise_capturing

Tracking:

- https://github.com/rust-lang/rust/issues/123432

----

For the compiler reviewer, I'll leave some inline comments about diagnostics fallout :^)

r? compiler
2024-08-20 10:42:55 +00:00
..
async-closures Rollup merge of #129101 - compiler-errors:deref-on-parent-by-ref, r=lcnr 2024-08-15 19:32:37 +02:00
async-fn Fix wrong argument for get_fn_decl 2024-08-19 11:08:51 +08:00
auxiliary [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
await-keyword More accurate incorrect use of await suggestion 2024-07-12 03:02:58 +00:00
drop-order [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
future-sizes In pretty_print_type(), print async fn futures' paths instead of spans. 2024-03-25 08:01:15 -07:00
in-trait Differentiate between methods and associated functions 2024-08-10 00:54:16 +00:00
issues Tighten spans for async blocks 2024-06-27 15:19:08 -04:00
multiple-lifetimes Bless test fallout 2024-08-17 12:43:25 -04:00
return-type-notation Rollup merge of #127878 - estebank:assoc-item-removal, r=fmease 2024-07-18 08:09:01 +02:00
track-caller Tighten spans for async blocks 2024-06-27 15:19:08 -04:00
argument-patterns.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
async-assoc-fn-anon-lifetimes.rs Allow newly added non_local_definitions lint in tests 2024-02-17 13:59:45 +01:00
async-await-let-else.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
async-await-let-else.stderr Remove redundant coroutine captures note 2024-03-19 12:02:21 -04:00
async-await.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
async-block-control-flow-static-semantics.rs Update Tests 2024-05-07 16:56:54 -04:00
async-block-control-flow-static-semantics.stderr Tighten spans for async blocks 2024-06-27 15:19:08 -04:00
async-borrowck-escaping-block-error.fixed [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
async-borrowck-escaping-block-error.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
async-borrowck-escaping-block-error.stderr Tighten spans for async blocks 2024-06-27 15:19:08 -04:00
async-borrowck-escaping-closure-error.rs Make the computation of coroutine_captures_by_ref_ty more sophisticated 2024-04-10 13:39:53 -04:00
async-borrowck-escaping-closure-error.stderr Make the computation of coroutine_captures_by_ref_ty more sophisticated 2024-04-10 13:39:53 -04:00
async-closure-matches-expr.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
async-closure.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
async-drop.rs Revert miri async drop test but add warnings to each async drop test 2024-05-29 12:57:01 +03:00
async-drop.run.stdout Add simple async drop glue generation 2024-04-16 20:45:07 +03:00
async-error-span.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
async-error-span.stderr Use root obligation on E0277 for some cases 2024-03-03 18:53:35 +00:00
async-fn-elided-impl-lifetime-parameter.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
async-fn-nonsend.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
async-fn-nonsend.stderr Provide more context on derived obligation error primary label 2024-01-30 21:28:18 +00:00
async-fn-path-elision.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
async-fn-path-elision.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
async-fn-send-uses-nonsend.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
async-fn-size-moved-locals.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
async-fn-size-uninit-locals.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
async-fn-size.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
async-is-unwindsafe.rs Wrap Context.ext in AssertUnwindSafe 2024-05-21 19:05:37 -07:00
async-is-unwindsafe.stderr Tighten spans for async blocks 2024-06-27 15:19:08 -04:00
async-matches-expr.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
async-outside-of-await-issue-121096.rs Adjust error yield/await lowering 2024-02-27 03:20:10 +00:00
async-outside-of-await-issue-121096.stderr Error on using yield without also using #[coroutine] on the closure 2024-04-24 08:05:29 +00:00
async-trait-fn.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
async-unsafe-fn-call-in-safe.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
async-unsafe-fn-call-in-safe.stderr Stabilize THIR unsafeck 2024-01-05 10:00:59 +00:00
async-with-closure.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
await-into-future.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
await-sequence.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
await-unsize.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
awaiting-unsized-param.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
awaiting-unsized-param.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
bound-normalization.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
clone-suggestion.fixed [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
clone-suggestion.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
clone-suggestion.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
conditional-and-guaranteed-initialization.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
const-async-fn-in-main.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
const-async-fn-in-main.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
context-is-sorta-unwindsafe.rs Wrap Context.ext in AssertUnwindSafe 2024-05-21 19:05:37 -07:00
coroutine-desc.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
coroutine-desc.stderr Tighten spans for async blocks 2024-06-27 15:19:08 -04:00
coroutine-not-future.rs Error on using yield without also using #[coroutine] on the closure 2024-04-24 08:05:29 +00:00
coroutine-not-future.stderr Tighten spans for async blocks 2024-06-27 15:19:08 -04:00
debug-ice-attempted-to-add-with-overflow.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
debug-ice-attempted-to-add-with-overflow.stderr Provide more context on derived obligation error primary label 2024-01-30 21:28:18 +00:00
deep-futures-are-freeze.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
default-struct-update.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
dont-ice-for-type-mismatch-in-closure-in-async.rs Stop using HirId for fn-like parents 2024-04-11 11:56:47 -04:00
dont-ice-for-type-mismatch-in-closure-in-async.stderr Inline get_node_fn_decl into get_fn_decl, simplify/explain logic in report_return_mismatched_types 2024-05-20 20:16:29 -04:00
dont-print-desugared-async.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
dont-print-desugared-async.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
dont-suggest-await-on-method-return-mismatch.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
dont-suggest-await-on-method-return-mismatch.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
dont-suggest-missing-await.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
dont-suggest-missing-await.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
drop-and-assign.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
drop-track-bad-field-in-fru.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
drop-track-bad-field-in-fru.stderr Provide more context on derived obligation error primary label 2024-01-30 21:28:18 +00:00
drop-track-field-assign-nonsend.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
drop-track-field-assign-nonsend.stderr Provide more context on derived obligation error primary label 2024-01-30 21:28:18 +00:00
drop-track-field-assign.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
drop-tracking-unresolved-typeck-results.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
drop-tracking-unresolved-typeck-results.stderr Add a note to duplicate diagnostics 2023-10-05 01:04:41 +00:00
edition-deny-async-fns-2015.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
edition-deny-async-fns-2015.stderr Stabilize AFIT and RPITIT 2023-10-13 21:01:36 +00:00
expansion-in-attrs.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
feature-async-closure.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
feature-async-closure.stderr Bless tests 2024-01-13 12:46:58 -05:00
feature-async-for-loop.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
feature-async-for-loop.stderr Bless tests 2024-01-13 12:46:58 -05:00
feature-self-return-type.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
feature-self-return-type.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
field-assign-nonsend.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
field-assign-nonsend.stderr Provide more context on derived obligation error primary label 2024-01-30 21:28:18 +00:00
field-assign.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
for-await-2015.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
for-await-consumes-iter.rs stabilize const_waker 2024-07-28 22:31:13 +08:00
for-await-consumes-iter.stderr Update test outputs 2023-12-22 11:01:07 -08:00
for-await-passthrough.rs stabilize const_waker 2024-07-28 22:31:13 +08:00
for-await.rs stabilize const_waker 2024-07-28 22:31:13 +08:00
future-contains-err-issue-115188.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
future-contains-err-issue-115188.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
futures-api.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
generics-and-bounds.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
incorrect-move-async-order-issue-79694.fixed [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
incorrect-move-async-order-issue-79694.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
incorrect-move-async-order-issue-79694.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
inference_var_self_argument.rs Replace item names containing an error code with something more meaningful 2024-04-30 22:27:19 +02:00
inference_var_self_argument.stderr Replace item names containing an error code with something more meaningful 2024-04-30 22:27:19 +02:00
interior-with-const-generic-expr.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-54239-private-type-triggers-lint.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-60709.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-61076.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-61076.stderr tweak logic of "unknown field" label 2023-11-18 00:40:11 +00:00
issue-61452.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-61452.stderr Better span for "make binding mutable" suggestion 2024-07-04 02:02:21 +00:00
issue-61793.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-62658.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-63832-await-short-temporary-lifetime-1.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-63832-await-short-temporary-lifetime.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-64130-1-sync.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-64130-1-sync.stderr Provide more context on derived obligation error primary label 2024-01-30 21:28:18 +00:00
issue-64130-2-send.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-64130-2-send.stderr Provide more context on derived obligation error primary label 2024-01-30 21:28:18 +00:00
issue-64130-3-other.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-64130-3-other.stderr Provide more context on derived obligation error primary label 2024-01-30 21:28:18 +00:00
issue-64130-4-async-move.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-64130-non-send-future-diags.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-64130-non-send-future-diags.stderr Provide more context on derived obligation error primary label 2024-01-30 21:28:18 +00:00
issue-64391.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-65634-raw-ident-suggestion.edition2015.stderr Move some tests 2024-02-09 15:43:08 -03:00
issue-65634-raw-ident-suggestion.edition2018.stderr Move some tests 2024-02-09 15:43:08 -03:00
issue-65634-raw-ident-suggestion.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-66312.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-66312.stderr Replace item names containing an error code with something more meaningful 2024-04-30 22:27:19 +02:00
issue-66387-if-without-else.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-66387-if-without-else.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-67252-unnamed-future.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-67252-unnamed-future.stderr Tighten spans for async blocks 2024-06-27 15:19:08 -04:00
issue-67651.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-67651.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-67765-async-diagnostic.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-67765-async-diagnostic.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-68112.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-68112.stderr Tighten spans for async blocks 2024-06-27 15:19:08 -04:00
issue-68523-start.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-68523-start.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-68523.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-68523.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-69446-fnmut-capture.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-69446-fnmut-capture.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-70594.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-70594.stderr Fix spans for bad await in inline const 2023-11-28 19:29:56 +00:00
issue-70818.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-70818.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-70935-complex-spans.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-70935-complex-spans.stderr Tighten spans for async blocks 2024-06-27 15:19:08 -04:00
issue-71137.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-71137.stderr Provide more context on derived obligation error primary label 2024-01-30 21:28:18 +00:00
issue-72442.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-72442.stderr Detect when method call on argument could be removed to fulfill failed trait bound 2024-02-16 04:28:05 +00:00
issue-72470-llvm-dominate.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-72590-type-error-sized.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-72590-type-error-sized.stderr Provide more context on derived obligation error primary label 2024-01-30 21:28:18 +00:00
issue-73050.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-73137.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-73541-1.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-73541-1.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-73541-2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-73541-2.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-73541-3.rs
issue-73541-3.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-73541.rs
issue-73541.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-73741-type-err.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-73741-type-err.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-74047.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-74047.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-74072-lifetime-name-annotations.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-74072-lifetime-name-annotations.stderr Tighten spans for async blocks 2024-06-27 15:19:08 -04:00
issue-74497-lifetime-in-opaque.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-74497-lifetime-in-opaque.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-75785-confusing-named-region.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-75785-confusing-named-region.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-76547.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-76547.stderr
issue-77993-2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-77993-2.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-78115.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-84841.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-84841.stderr
issue-86507.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-86507.stderr Tighten spans for async blocks 2024-06-27 15:19:08 -04:00
issue-93197.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-93648.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-98634.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-98634.stderr Tweak await span 2023-04-27 17:18:11 +00:00
issue-101715.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-101715.stderr Provide more context on derived obligation error primary label 2024-01-30 21:28:18 +00:00
issue-105501.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-107036.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-108572.fixed [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-108572.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-108572.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
missed-capture-issue-107414.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
missing-return-in-async-block.fixed [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
missing-return-in-async-block.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
missing-return-in-async-block.stderr Properly handle async blocks and fns in if exprs without else 2024-02-12 20:26:34 +00:00
move-part-await-return-rest-struct.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
move-part-await-return-rest-tuple.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
mutually-recursive-async-impl-trait-type.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
mutually-recursive-async-impl-trait-type.stderr Make cycle error more resilient to where it starts 2024-01-08 20:30:24 +00:00
nested-in-impl.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
no-async-const.rs Handle safety keyword for extern block inner items 2024-06-04 14:19:42 -03:00
no-async-const.stderr Handle safety keyword for extern block inner items 2024-06-04 14:19:42 -03:00
no-const-async.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
no-const-async.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
no-move-across-await-struct.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
no-move-across-await-struct.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
no-move-across-await-tuple.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
no-move-across-await-tuple.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
no-non-guaranteed-initialization.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
no-non-guaranteed-initialization.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
no-params-non-move-async-closure.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
no-std.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
no-unsafe-async.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
no-unsafe-async.stderr Recover from incorrectly ordered/duplicated function keywords 2023-10-27 18:29:43 +00:00
non-trivial-drop.rs Error on using yield without also using #[coroutine] on the closure 2024-04-24 08:05:29 +00:00
normalize-output-in-signature-deduction.rs Ignore tests w/ current/next revisions from compare-mode=next-solver 2024-03-10 21:18:41 -04:00
partial-drop-partial-reinit.rs Remove redundant coroutine captures note 2024-03-19 12:02:21 -04:00
partial-drop-partial-reinit.stderr Remove redundant coroutine captures note 2024-03-19 12:02:21 -04:00
partial-initialization-across-await.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
partial-initialization-across-await.stderr
pin-needed-to-poll-2.rs
pin-needed-to-poll-2.stderr Provide more context on derived obligation error primary label 2024-01-30 21:28:18 +00:00
pin-needed-to-poll-3.rs Add test for incorrect pinning suggestion 2024-05-28 20:05:01 +00:00
pin-needed-to-poll-3.stderr Account for existing bindings when suggesting pinning 2024-05-28 20:48:35 +00:00
pin-needed-to-poll.rs
pin-needed-to-poll.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
proper-span-for-type-error.fixed [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
proper-span-for-type-error.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
proper-span-for-type-error.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
recursive-async-impl-trait-type.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
recursive-async-impl-trait-type.stderr Make cycle error more resilient to where it starts 2024-01-08 20:30:24 +00:00
repeat_count_const_in_async_fn.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
return-ty-raw-ptr-coercion.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
return-ty-unsize-coercion.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
send-bound-async-closure.rs Don't ICE when encountering bound regions in generator interior type 2024-03-19 11:30:12 -04:00
suggest-missing-await-closure.fixed [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
suggest-missing-await-closure.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
suggest-missing-await-closure.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
suggest-missing-await.rs don't suggest awaiting type expr patterns 2024-06-24 16:20:22 -05:00
suggest-missing-await.stderr don't suggest awaiting type expr patterns 2024-06-24 16:20:22 -05:00
suggest-switching-edition-on-await-cargo.rs Use better heuristic for printing Cargo specific diagnostics 2024-02-17 16:49:01 +01:00
suggest-switching-edition-on-await-cargo.stderr recover primary span label 2023-11-16 17:00:23 +00:00
suggest-switching-edition-on-await.rs recover primary span label 2023-11-16 17:00:23 +00:00
suggest-switching-edition-on-await.stderr recover primary span label 2023-11-16 17:00:23 +00:00
task-context-arg.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
try-on-option-in-async.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
try-on-option-in-async.stderr Tighten spans for async blocks 2024-06-27 15:19:08 -04:00
type-parameter-send.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
unnecessary-await.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
unnecessary-await.stderr Provide more context on derived obligation error primary label 2024-01-30 21:28:18 +00:00
unreachable-lint-1.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
unreachable-lint-1.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
unreachable-lint-2.rs Properly mark loop as diverging if it has no breaks 2024-07-31 12:24:26 -04:00
unreachable-lint-2.stderr Properly mark loop as diverging if it has no breaks 2024-07-31 12:24:26 -04:00
unreachable-lint.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
unresolved_type_param.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
unresolved_type_param.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
unsized-across-await.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
unsized-across-await.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
unused-lifetime.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
unused-lifetime.stderr