rust/tests/ui/impl-trait
bors 7b4d9e155f Auto merge of #115659 - compiler-errors:itp, r=cjgillot
Stabilize `impl_trait_projections`

Closes #115659

## TL;DR:

This allows us to mention `Self` and `T::Assoc` in async fn and return-position `impl Trait`, as you would expect you'd be able to.

Some examples:
```rust
#![feature(return_position_impl_trait_in_trait, async_fn_in_trait)]
// (just needed for final tests below)

// ---------------------------------------- //

struct Wrapper<'a, T>(&'a T);

impl Wrapper<'_, ()> {
    async fn async_fn() -> Self {
        //^ Previously rejected because it returns `-> Self`, not `-> Wrapper<'_, ()>`.
        Wrapper(&())
    }

    fn impl_trait() -> impl Iterator<Item = Self> {
        //^ Previously rejected because it mentions `Self`, not `Wrapper<'_, ()>`.
        std::iter::once(Wrapper(&()))
    }
}

// ---------------------------------------- //

trait Trait<'a> {
    type Assoc;
    fn new() -> Self::Assoc;
}
impl Trait<'_> for () {
    type Assoc = ();
    fn new() {}
}

impl<'a, T: Trait<'a>> Wrapper<'a, T> {
    async fn mk_assoc() -> T::Assoc {
        //^ Previously rejected because `T::Assoc` doesn't mention `'a` in the HIR,
        //  but ends up resolving to `<T as Trait<'a>>::Assoc`, which does rely on `'a`.
        // That's the important part -- the elided trait.
        T::new()
    }

    fn a_few_assocs() -> impl Iterator<Item = T::Assoc> {
        //^ Previously rejected for the same reason
        [T::new(), T::new(), T::new()].into_iter()
    }
}

// ---------------------------------------- //

trait InTrait {
    async fn async_fn() -> Self;

    fn impl_trait() -> impl Iterator<Item = Self>;
}

impl InTrait for &() {
    async fn async_fn() -> Self { &() }
    //^ Previously rejected just like inherent impls

    fn impl_trait() -> impl Iterator<Item = Self> {
        //^ Previously rejected just like inherent impls
        [&()].into_iter()
    }
}
```

## Technical:

Lifetimes in return-position `impl Trait` (and `async fn`) are duplicated as early-bound generics local to the opaque in order to make sure we are able to substitute any late-bound lifetimes from the function in the opaque's hidden type. (The [dev guide](https://rustc-dev-guide.rust-lang.org/return-position-impl-trait-in-trait.html#aside-opaque-lifetime-duplication) has a small section about why this is necessary -- this was written for RPITITs, but it applies to all RPITs)

Prior to #103491, all of the early-bound lifetimes not local to the opaque were replaced with `'static` to avoid issues where relating opaques caused their *non-captured* lifetimes to be related. This `'static` replacement led to strange and possibly unsound behaviors (https://github.com/rust-lang/rust/issues/61949#issuecomment-508836314) (https://github.com/rust-lang/rust/issues/53613) when referencing the `Self` type alias in an impl or indirectly referencing a lifetime parameter via a projection type (via a `T::Assoc` projection without an explicit trait), since lifetime resolution is performed on the HIR, when neither `T::Assoc`-style projections or `Self` in impls are expanded.

Therefore an error was implemented in #62849 to deny this subtle behavior as a known limitation of the compiler. It was attempted by `@cjgillot` to fix this in #91403, which was subsequently unlanded. Then it was re-attempted to much success (🎉) in #103491, which is where we currently are in the compiler.

The PR above (#103491) fixed this issue technically by *not* replacing the opaque's parent lifetimes with `'static`, but instead using variance to properly track which lifetimes are captured and are not. The PR gated any of the "side-effects" of the PR behind a feature gate (`impl_trait_projections`) presumably to avoid having to involve T-lang or T-types in the PR as well. `@cjgillot` can clarify this if I'm misunderstanding what their intention was with the feature gate.

Since we're not replacing (possibly *invariant*!) lifetimes with `'static` anymore, there are no more soundness concerns here. Therefore, this PR removes the feature gate.

Tests:
* `tests/ui/async-await/feature-self-return-type.rs`
* `tests/ui/impl-trait/feature-self-return-type.rs`
* `tests/ui/async-await/issues/issue-78600.rs`
* `tests/ui/impl-trait/capture-lifetime-not-in-hir.rs`

---

r? cjgillot on the impl (not much, just removing the feature gate)

I'm gonna mark this as FCP for T-lang and T-types.
2023-09-28 21:35:18 +00:00
..
auxiliary Move /src/test to /tests 2023-01-11 09:32:08 +00:00
diagnostics Move /src/test to /tests 2023-01-11 09:32:08 +00:00
explicit-generic-args-with-impl-trait diagnostics: remove inconsistent English article "this" from E0107 2023-02-23 10:27:06 -07:00
in-trait Anonymize binders for refining_impl_trait check 2023-09-26 18:11:12 +00:00
issues adjust how closure/generator types and rvalues are printed 2023-09-21 22:20:58 +02:00
multiple-lifetimes Rename tests to ensure they don't have overlapping names. 2023-03-22 21:12:40 -07:00
rpit check for non-defining uses of RPIT 2023-08-14 15:25:20 +02:00
arg-position-impl-trait-too-long.rs Don't print newlines in APITs 2023-05-25 02:45:14 +00:00
arg-position-impl-trait-too-long.stderr Don't print newlines in APITs 2023-05-25 02:45:14 +00:00
associated-impl-trait-type-generic-trait.rs Split out a separate feature gate for impl trait in associated types 2023-04-12 16:17:31 +00:00
associated-impl-trait-type-trivial.rs Split out a separate feature gate for impl trait in associated types 2023-04-12 16:17:31 +00:00
associated-impl-trait-type.rs Split out a separate feature gate for impl trait in associated types 2023-04-12 16:17:31 +00:00
async_scope_creep.rs Bubble up opaque <eq> opaque operations instead of picking an order 2023-09-11 16:53:39 +00:00
async_scope_creep.tait.stderr Bubble up opaque <eq> opaque operations instead of picking an order 2023-09-11 16:53:39 +00:00
auto-trait-leak-rpass.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
auto-trait-leak.rs More precisely detect cycle errors from type_of on opaque 2023-08-27 22:03:16 +00:00
auto-trait-leak.stderr More precisely detect cycle errors from type_of on opaque 2023-08-27 22:03:16 +00:00
auto-trait-leak2.rs Revert "Suggest using `Arc` on `!Send`/`!Sync` types" 2023-08-28 03:16:48 -07:00
auto-trait-leak2.stderr Revert "Suggest using `Arc` on `!Send`/`!Sync` types" 2023-08-28 03:16:48 -07:00
auto-trait.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
auto-trait.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
autoderef.rs Consider a goal as NOT changed if its response is identity modulo regions 2023-07-27 04:00:49 +00:00
bound-normalization-fail.rs Stabilize impl_trait_projections 2023-09-08 03:45:36 +00:00
bound-normalization-fail.stderr Stabilize impl_trait_projections 2023-09-08 03:45:36 +00:00
bound-normalization-pass.rs Remove save-analysis. 2023-02-16 15:14:45 +11:00
bounds_regression.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
can-return-unconstrained-closure.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
capture-lifetime-not-in-hir.rs Stabilize impl_trait_projections 2023-09-08 03:45:36 +00:00
capture-lifetime-not-in-hir.stderr Stabilize impl_trait_projections 2023-09-08 03:45:36 +00:00
closure-calling-parent-fn.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure-in-impl-trait-arg.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure-in-impl-trait.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
coherence-treats-tait-ambig.current.stderr Treat TAIT equation as always ambiguous in coherence 2023-06-18 22:52:30 +00:00
coherence-treats-tait-ambig.rs update tests 2023-09-21 08:17:58 +02:00
coherence-treats-tait-ambig.stderr update tests 2023-09-21 08:17:58 +02:00
cross-return-site-inference.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
cross-return-site-inference.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
deduce-signature-from-supertrait.rs Require TAITs to be mentioned in the signatures of functions that register hidden types for them 2023-07-07 13:13:18 +00:00
defined-by-trait-resolution.rs allow opaques to be defined by trait queries 2023-07-14 12:35:33 +00:00
deprecated_annotation.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
divergence.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
does-not-live-long-enough.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
does-not-live-long-enough.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
dont-suggest-box-on-empty-else-arm.rs Don't suggest boxing an empty if/else arm 2023-06-11 00:19:56 +00:00
dont-suggest-box-on-empty-else-arm.stderr Don't suggest boxing an empty if/else arm 2023-06-11 00:19:56 +00:00
dyn-trait-elided-two-inputs-assoc.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
dyn-trait-elided-two-inputs-param.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
dyn-trait-elided-two-inputs-ref-assoc.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
dyn-trait-elided-two-inputs-ref-param.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
dyn-trait-return-should-be-impl-trait.rs Remove return type sized check hack from hir typeck 2023-05-18 01:53:01 +00:00
dyn-trait-return-should-be-impl-trait.stderr Remove return type sized check hack from hir typeck 2023-05-18 01:53:01 +00:00
equal-hidden-lifetimes.rs Convert a hard-warning about named static lifetimes into lint "unused_lifetimes" 2023-02-22 09:44:26 +08:00
equality-rpass.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
equality-rpass.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
equality.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
equality.stderr Don't sort strings right after we just sorted by types 2023-06-27 23:31:06 +00:00
equality2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
equality2.stderr Mention fn coercion rules (needs to be expanded) 2023-01-30 21:51:33 +00:00
example-calendar.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
example-st.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
extra-impl-in-trait-impl.fixed improve error for `impl<..> impl Trait for Type` 2023-05-13 10:51:21 +02:00
extra-impl-in-trait-impl.rs improve error for `impl<..> impl Trait for Type` 2023-05-13 10:51:21 +02:00
extra-impl-in-trait-impl.stderr improve error for `impl<..> impl Trait for Type` 2023-05-13 10:51:21 +02:00
extra-item.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
extra-item.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
fallback.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
fallback_inference.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
fallback_inference.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
feature-self-return-type.rs Stabilize impl_trait_projections 2023-09-08 03:45:36 +00:00
feature-self-return-type.stderr Stabilize impl_trait_projections 2023-09-08 03:45:36 +00:00
fresh-lifetime-from-bare-trait-obj-114664.rs Record binder for bare trait object in LifetimeCollectVisitor 2023-08-11 03:15:41 +00:00
fresh-lifetime-from-bare-trait-obj-114664.stderr Record binder for bare trait object in LifetimeCollectVisitor 2023-08-11 03:15:41 +00:00
generic-with-implicit-hrtb-without-dyn.edition2015.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
generic-with-implicit-hrtb-without-dyn.edition2021.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
generic-with-implicit-hrtb-without-dyn.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
hidden-lifetimes.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
hidden-lifetimes.stderr Label opaque type for 'captures lifetime' error message 2023-03-03 05:02:34 +00:00
hidden-type-is-opaque-2.rs Fix invalid suggestion for mismatched types in closure arguments 2023-07-30 17:15:55 +02:00
hidden-type-is-opaque-2.stderr Fix invalid suggestion for mismatched types in closure arguments 2023-07-30 17:15:55 +02:00
hidden-type-is-opaque.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
impl-fn-hrtb-bounds-2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
impl-fn-hrtb-bounds-2.stderr Remove index from BrAnon 2023-04-06 23:01:40 -04:00
impl-fn-hrtb-bounds.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
impl-fn-hrtb-bounds.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
impl-fn-parsing-ambiguities.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
impl-fn-parsing-ambiguities.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
impl-fn-predefined-lifetimes.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
impl-fn-predefined-lifetimes.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
impl-generic-mismatch-ab.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
impl-generic-mismatch-ab.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
impl-generic-mismatch.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
impl-generic-mismatch.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
impl-trait-in-macro.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
impl-trait-in-macro.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
impl-trait-plus-priority.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
impl-trait-plus-priority.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
impl_fn_associativity.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
impl_trait_projections.rs When suggesting writing a fully qualified path probe for appropriate types 2023-01-11 21:30:10 +00:00
impl_trait_projections.stderr When suggesting writing a fully qualified path probe for appropriate types 2023-01-11 21:30:10 +00:00
in-assoc-type-unconstrained.rs Use the opaque_types_defined_by query to cheaply check for whether a hidden type may be registered for an opaque type 2023-05-12 10:26:50 +00:00
in-assoc-type-unconstrained.stderr Point to argument/return type instead of the whole function header 2023-06-22 15:00:12 +00:00
in-assoc-type.rs Require TAITs to be mentioned in the signatures of functions that register hidden types for them 2023-07-07 13:13:18 +00:00
in-assoc-type.stderr Require TAITs to be mentioned in the signatures of functions that register hidden types for them 2023-07-07 13:13:18 +00:00
issue-35668.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-35668.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-36792.rs Move test files 2023-04-20 15:06:17 -03:00
issue-46959.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-49556.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-49579.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-49685.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-51185.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-54966.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-54966.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-55872-1.rs Split out a separate feature gate for impl trait in associated types 2023-04-12 16:17:31 +00:00
issue-55872-1.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-55872-2.rs Bless tests. 2023-09-23 13:47:30 +00:00
issue-55872-2.stderr Bless tests. 2023-09-23 13:47:30 +00:00
issue-55872-3.rs Remove compare mode 2023-07-03 21:40:04 +00:00
issue-55872-3.stderr adjust how closure/generator types and rvalues are printed 2023-09-21 22:20:58 +02:00
issue-55872.rs Split out a separate feature gate for impl trait in associated types 2023-04-12 16:17:31 +00:00
issue-55872.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-56445.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-68532.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-72911.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-72911.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-86465.rs Revert "Auto merge of #102417 - oli-obk:opaque_lifetimes2, r=jackh726" 2023-08-30 11:06:46 +00:00
issue-86465.stderr Revert "Auto merge of #102417 - oli-obk:opaque_lifetimes2, r=jackh726" 2023-08-30 11:06:46 +00:00
issue-87450.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-87450.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-99073-2.rs check for non-defining uses of RPIT 2023-08-14 15:25:20 +02:00
issue-99073-2.stderr check for non-defining uses of RPIT 2023-08-14 15:25:20 +02:00
issue-99073.rs check for non-defining uses of RPIT 2023-08-14 15:25:20 +02:00
issue-99073.stderr adjust how closure/generator types and rvalues are printed 2023-09-21 22:20:58 +02:00
issue-99642-2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-99642.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-99914.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-99914.stderr fix: improve the suggestion on future not awaited 2023-02-13 16:23:23 +01:00
issue-100075-2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-100075-2.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-100075.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-100075.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-100187.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-102605.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-102605.stderr Check entry type as part of item type checking. 2023-07-15 22:02:16 +00:00
issue-103181-1.current.stderr Use error term if missing associated item in new solver 2023-05-16 16:02:17 +00:00
issue-103181-1.next.stderr Use error term if missing associated item in new solver 2023-05-16 16:02:17 +00:00
issue-103181-1.rs Use error term if missing associated item in new solver 2023-05-16 16:02:17 +00:00
issue-103181-2.rs More precisely detect cycle errors from type_of on opaque 2023-08-27 22:03:16 +00:00
issue-103181-2.stderr More precisely detect cycle errors from type_of on opaque 2023-08-27 22:03:16 +00:00
issue-103599.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-103599.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-108591.rs Revert "Auto merge of #102417 - oli-obk:opaque_lifetimes2, r=jackh726" 2023-08-30 11:06:46 +00:00
issue-108592.rs Revert "Auto merge of #102417 - oli-obk:opaque_lifetimes2, r=jackh726" 2023-08-30 11:06:46 +00:00
lifetime-ambiguity-regression.rs Paper over an accidental regression 2023-09-14 15:16:48 +00:00
lifetimes.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
lifetimes2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
mapping-duplicated-lifetimes-issue-114597.rs add'l test 2023-08-08 09:39:59 +00:00
method-suggestion-no-duplication.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
method-suggestion-no-duplication.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
multiple-defining-usages-in-body.rs Check that RPITs are compatible with the opaques inferred during HIR typeck too 2023-05-31 17:45:45 +00:00
multiple-defining-usages-in-body.stderr Check that RPITs are compatible with the opaques inferred during HIR typeck too 2023-05-31 17:45:45 +00:00
must_outlive_least_region_or_bound.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
must_outlive_least_region_or_bound.stderr adjust how closure/generator types and rvalues are printed 2023-09-21 22:20:58 +02:00
needs_least_region_or_bound.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
negative-reasoning.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
negative-reasoning.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
nested-return-type.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
nested-return-type2-tait.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
nested-return-type2-tait.stderr Add `AliasKind::Weak` for type aliases. 2023-06-16 19:39:48 +00:00
nested-return-type2-tait2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
nested-return-type2-tait2.stderr adjust how closure/generator types and rvalues are printed 2023-09-21 22:20:58 +02:00
nested-return-type2-tait3.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
nested-return-type2-tait3.stderr adjust how closure/generator types and rvalues are printed 2023-09-21 22:20:58 +02:00
nested-return-type2.rs Nested impl traits trigger opaque_hidden_inferred_bound too much 2023-03-23 06:19:52 +00:00
nested-return-type3-tait.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
nested-return-type3-tait.stderr Add `AliasKind::Weak` for type aliases. 2023-06-16 19:39:48 +00:00
nested-return-type3-tait2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
nested-return-type3-tait2.stderr Add `AliasKind::Weak` for type aliases. 2023-06-16 19:39:48 +00:00
nested-return-type3-tait3.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
nested-return-type3-tait3.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
nested-return-type3.rs Nested impl traits trigger opaque_hidden_inferred_bound too much 2023-03-23 06:19:52 +00:00
nested-return-type4.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
nested-return-type4.stderr adjust how closure/generator types and rvalues are printed 2023-09-21 22:20:58 +02:00
nested-rpit-hrtb-2.rs don't ICE on higher ranked hidden types 2023-08-04 15:11:09 +00:00
nested-rpit-hrtb-2.stderr don't ICE on higher ranked hidden types 2023-08-04 15:11:09 +00:00
nested-rpit-hrtb.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
nested-rpit-hrtb.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
nested-rpit-with-anonymous-lifetimes.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
nested_impl_trait.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
nested_impl_trait.stderr pluralize stuff 2023-02-22 21:52:26 +00:00
nesting.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
no-method-suggested-traits.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
no-method-suggested-traits.stderr Special-case item attributes in the suggestion output 2023-04-12 22:50:10 +00:00
no-trait.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
no-trait.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
normalize-opaque-with-bound-vars.rs More tests 2023-06-27 21:36:15 +00:00
normalize-tait-in-const.rs update tests, adding known-bug 2023-07-27 15:51:02 +00:00
normalize-tait-in-const.stderr bless the known-bug tests 2023-09-20 03:02:14 +00:00
object-unsafe-trait-in-return-position-dyn-trait.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
object-unsafe-trait-in-return-position-dyn-trait.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
object-unsafe-trait-in-return-position-impl-trait.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
object-unsafe-trait-in-return-position-impl-trait.stderr Modify primary span label for E0308 2023-01-30 20:12:19 +00:00
opaque-cast-field-access-in-future.rs Only prevent field projections into opaque types, not types containing opaque types 2023-09-25 17:41:08 +00:00
opaque-cast-field-access-in-future.stderr Only prevent field projections into opaque types, not types containing opaque types 2023-09-25 17:41:08 +00:00
point-to-type-err-cause-on-impl-trait-return.rs Remove return type sized check hack from hir typeck 2023-05-18 01:53:01 +00:00
point-to-type-err-cause-on-impl-trait-return.stderr Remove return type sized check hack from hir typeck 2023-05-18 01:53:01 +00:00
printing-binder.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
printing-binder.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
private_unused.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
projection-mismatch-in-impl-where-clause.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
projection-mismatch-in-impl-where-clause.stderr Note predicate span on ImplDerivedObligation 2023-01-11 19:46:45 +00:00
projection.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
question_mark.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
recursive-auto-trait.rs deal with opaque types without cycling 2023-07-06 11:37:21 +02:00
recursive-generator.rs Bless tests. 2023-09-23 13:47:30 +00:00
recursive-generator.stderr Bless tests. 2023-09-23 13:47:30 +00:00
recursive-impl-trait-type-direct.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
recursive-impl-trait-type-indirect.rs Revert duplication of tests. 2023-09-23 13:34:07 +00:00
recursive-impl-trait-type-indirect.stderr Bless tests. 2023-09-23 13:47:30 +00:00
recursive-impl-trait-type-through-non-recursive.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
recursive-impl-trait-type-through-non-recursive.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
recursive-type-alias-impl-trait-declaration-too-subtle-2.rs Add `AliasKind::Weak` for type aliases. 2023-06-16 19:39:48 +00:00
recursive-type-alias-impl-trait-declaration-too-subtle.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
recursive-type-alias-impl-trait-declaration-too-subtle.stderr Handle weak type aliases by immediately resolving them to their aliased type 2023-06-22 15:51:19 +00:00
recursive-type-alias-impl-trait-declaration.rs Add `AliasKind::Weak` for type aliases. 2023-06-16 19:39:48 +00:00
recursive-type-alias-impl-trait-declaration.stderr Add `AliasKind::Weak` for type aliases. 2023-06-16 19:39:48 +00:00
region-escape-via-bound-contravariant-closure.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
region-escape-via-bound-contravariant.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
region-escape-via-bound.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
region-escape-via-bound.stderr Label opaque type for 'captures lifetime' error message 2023-03-03 05:02:34 +00:00
return-position-impl-trait-minimal.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
reveal-during-codegen.rs Normalize opaques during codegen in new solver 2023-07-07 16:02:25 +00:00
rpit-assoc-pair-with-lifetime.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
rpit-not-sized.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
rpit-not-sized.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
static-lifetime-return-position-impl-trait.rs accept `ReStatic` for RPITIT 2023-06-26 01:11:44 +09:00
static-return-lifetime-infered.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
static-return-lifetime-infered.stderr adjust how closure/generator types and rvalues are printed 2023-09-21 22:20:58 +02:00
suggest-calling-rpit-closure.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
suggest-calling-rpit-closure.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
trait_resolution.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
trait_type.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
trait_type.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
two_tait_defining_each_other.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
two_tait_defining_each_other.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
two_tait_defining_each_other2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
two_tait_defining_each_other2.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
two_tait_defining_each_other3.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
two_tait_defining_each_other3.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
type-alias-generic-param.rs Split out a separate feature gate for impl trait in associated types 2023-04-12 16:17:31 +00:00
type-alias-impl-trait-in-fn-body.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
type-arg-mismatch-due-to-impl-trait.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
type-arg-mismatch-due-to-impl-trait.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
type_parameters_captured.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
type_parameters_captured.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unactionable_diagnostic.fixed Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unactionable_diagnostic.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unactionable_diagnostic.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
universal-mismatched-type.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
universal-mismatched-type.stderr Modify primary span label for E0308 2023-01-30 20:12:19 +00:00
universal-two-impl-traits.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
universal-two-impl-traits.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
universal_hrtb_anon.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
universal_hrtb_named.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
universal_in_adt_in_parameters.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
universal_in_impl_trait_in_parameters.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
universal_in_trait_defn_parameters.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
universal_multiple_bounds.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
universal_wrong_bounds.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
universal_wrong_bounds.stderr Special-case item attributes in the suggestion output 2023-04-12 22:50:10 +00:00
universal_wrong_hrtb.rs migrate lifetime too 2023-06-26 19:14:49 +00:00
universal_wrong_hrtb.stderr migrate lifetime too 2023-06-26 19:14:49 +00:00
unsafety-checking-cycle.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
variance.rs Test variances of opaque captures 2023-08-28 01:05:34 +00:00
variance.stderr Test variances of opaque captures 2023-08-28 01:05:34 +00:00
wf-eval-order.rs vars are ? 2023-04-25 19:53:09 +00:00
where-allowed-2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
where-allowed-2.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
where-allowed.rs Split out a separate feature gate for impl trait in associated types 2023-04-12 16:17:31 +00:00
where-allowed.stderr Split out a separate feature gate for impl trait in associated types 2023-04-12 16:17:31 +00:00
xcrate.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
xcrate_simple.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00