Commit Graph

179 Commits

Author SHA1 Message Date
Michael Goulet
1feef44daf rename RPITIT from opaque to synthetic 2024-02-27 17:43:40 +00:00
Matthias Krüger
b10ef3c6bc
Rollup merge of #121435 - estebank:rpitit-static-119773, r=compiler-errors
Account for RPITIT in E0310 explicit lifetime constraint suggestion

When given

```rust
trait Original {
    fn f() -> impl Fn();
}

trait Erased {
    fn f(&self) -> Box<dyn Fn()>;
}

impl<T: Original> Erased for T {
    fn f(&self) -> Box<dyn Fn()> {
        Box::new(<T as Original>::f())
    }
}
```

emit do not emit an invalid suggestion restricting the `Trait::{opaque}` type in a `where` clause:

```
error[E0310]: the associated type `<T as Original>::{opaque#0}` may not live long enough
  --> $DIR/missing-static-bound-from-impl.rs:11:9
   |
LL |         Box::new(<T as Original>::f())
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |         |
   |         the associated type `<T as Original>::{opaque#0}` must be valid for the static lifetime...
   |         ...so that the type `impl Fn()` will meet its required lifetime bounds
```

Partially address #119773. Ideally we'd suggest modifying `Erased::f` instead.

r? `@compiler-errors`
2024-02-24 15:35:12 +01:00
Nicholas Nethercote
109321ac47 Revert some span_bugs to span_delayed_bug.
Fixes #121445.
Fixes #121457.
2024-02-23 10:04:32 +11:00
Esteban Küber
5e6da720f6 Account for RPITIT in E0310 explicit lifetime constraint suggestion
When given

```rust
trait Original {
    fn f() -> impl Fn();
}

trait Erased {
    fn f(&self) -> Box<dyn Fn()>;
}

impl<T: Original> Erased for T {
    fn f(&self) -> Box<dyn Fn()> {
        Box::new(<T as Original>::f())
    }
}
```

avoid suggestion to restrict the `Trait::{opaque}` type in a `where` clause:

```
error[E0310]: the associated type `<T as Original>::{opaque#0}` may not live long enough
  --> $DIR/missing-static-bound-from-impl.rs:11:9
   |
LL |         Box::new(<T as Original>::f())
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |         |
   |         the associated type `<T as Original>::{opaque#0}` must be valid for the static lifetime...
   |         ...so that the type `impl Fn()` will meet its required lifetime bounds
```

CC #119773.
2024-02-22 18:56:07 +00:00
许杰友 Jieyou Xu (Joe)
ec2cc761bc
[AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
Matthias Krüger
020e84652d
Rollup merge of #120696 - estebank:issue-115405, r=oli-obk
Properly handle `async` block and `async fn` in `if` exprs without `else`

When encountering a tail expression in the then arm of an `if` expression without an `else` arm, account for `async fn` and `async` blocks to suggest `return`ing the value and pointing at the return type of the `async fn`.

We now also account for AFIT when looking for the return type to point at.

Fix #115405.
2024-02-13 06:27:37 +01:00
Esteban Küber
37d2ea2fa0 Properly handle async blocks and fns in if exprs without else
When encountering a tail expression in the then arm of an `if` expression
without an `else` arm, account for `async fn` and `async` blocks to
suggest `return`ing the value and pointing at the return type of the
`async fn`.

We now also account for AFIT when looking for the return type to point at.

Fix #115405.
2024-02-12 20:26:34 +00:00
Michael Goulet
5461fd4250 Gracefully handle non-WF alias in assemble_alias_bound_candidates_recur 2024-02-10 23:49:21 +00:00
r0cky
c7519d42c2 Update tests 2024-02-07 10:42:01 +08:00
Esteban Küber
8b0ab54ffe review comment: change wording 2024-02-01 03:31:03 +00:00
Esteban Küber
c4c22b0d52 On E0277 be clearer about implicit Sized bounds on type params and assoc types
```
error[E0277]: the size for values of type `[i32]` cannot be known at compilation time
   --> f100.rs:2:33
    |
2   |     let _ = std::mem::size_of::<[i32]>();
    |                                 ^^^^^ doesn't have a size known at compile-time
    |
    = help: the trait `Sized` is not implemented for `[i32]`
note: required by an implicit `Sized` bound in `std::mem::size_of`
   --> /home/gh-estebank/rust/library/core/src/mem/mod.rs:312:22
    |
312 | pub const fn size_of<T>() -> usize {
    |                      ^ required by the implicit `Sized` requirement on this bound in `size_of`
```

Fix #120178.
2024-02-01 03:30:26 +00:00
Esteban Küber
a9841936fe Deduplicate more sized errors on call exprs
Change the implicit `Sized` `Obligation` `Span` for call expressions to
include the whole expression. This aids the existing deduplication
machinery to reduce the number of errors caused by a single unsized
expression.
2024-01-24 02:53:15 +00:00
Oli Scherer
b1ce8a4ecd Move check_mod_impl_wf query call out of track_errors and bubble errors up instead. 2024-01-17 10:02:19 +00:00
Michael Goulet
6a2bd5acd6 Use resolutions(()).effective_visiblities to avoid cycle errors 2024-01-05 14:48:53 +00:00
lcnr
11d16c4082 update use of feature flags 2023-12-14 15:22:37 +01:00
jyn
eb53721a34 recurse into refs when comparing tys for diagnostics 2023-12-07 23:00:46 -05:00
Michael Goulet
1279f70bf4 Don't ICE when encountering placeholders in implied bounds computation 2023-11-25 17:40:52 +00:00
Nilstrieb
41e8d152dc Show number in error message even for one error
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-11-24 19:15:52 +01:00
bohan
a4768fea35 fallback for construct_generic_bound_failure 2023-11-04 22:15:22 +08:00
Michael Goulet
dd571e472a Add all RPITITs when augmenting param-env with GAT bounds in check_type_bounds 2023-11-02 20:47:10 +00:00
Esteban Küber
8c04999226 On object safety error, mention new enum as alternative
When we encounter a `dyn Trait` that isn't object safe, look for its
implementors. If there's one, mention using it directly If there are
less than 9, mention the possibility of creating a new enum and using
that instead.

Account for object unsafe `impl Trait on dyn Trait {}`.  Make a
distinction between public and sealed traits.

Fix #80194.
2023-10-29 23:55:46 +00:00
Michael Goulet
90e3aaeca2 Remove incomplete features from RPITIT/AFIT tests 2023-10-24 15:27:06 +00:00
Esteban Küber
bd8b46800d Tweak wording of type errors involving type params
Fix #78206.
2023-10-18 23:53:18 +00:00
Michael Goulet
17ec3cd5bf Fix outlives suggestion for GAT in RPITIT 2023-10-16 15:42:26 +00:00
Michael Goulet
3f2574e8ba Test that RPITITs have RPIT scope and not impl-wide scope 2023-10-13 21:01:36 +00:00
Michael Goulet
59315b8a63 Stabilize AFIT and RPITIT 2023-10-13 21:01:36 +00:00
Matthias Krüger
8ddc0df1f1
Rollup merge of #116219 - compiler-errors:relate-alias-ty-with-variance, r=lcnr
Relate alias ty with variance

In the new solver, turns out that the subst-relate branch of the alias-relate predicate was relating args invariantly even for opaques, which have variance 💀.

This change is a bit more invasive, but I'd rather not special-case it [here](aeaa5c30e5/compiler/rustc_trait_selection/src/solve/alias_relate.rs (L171-L190)) and then have it break elsewhere. I'm doing a perf run to see if the extra call to `def_kind` is that expensive, if it is, I'll reconsider.

r? ``@lcnr``
2023-10-11 20:08:20 +02:00
Jubilee
cfce3a919d
Rollup merge of #116296 - compiler-errors:default-return, r=estebank
More accurately point to where default return type should go

When getting the "default return type" span, instead of pointing to the low span of the next token, point to the high span of the previous token. This:

1. Makes forming return type suggestions more uniform, since we expect them all in the same place.
2. Arguably makes labels easier to understand, since we're pointing to where the implicit `-> ()` would've gone, rather than the starting brace or the semicolon.

r? ```@estebank```
2023-10-05 00:56:29 -07:00
bors
5236c8e1fa Auto merge of #116273 - compiler-errors:refine2, r=tmandry
Only trigger `refining_impl_trait` lint on reachable traits

Public but unreachable traits don't matter 😸

r? `@tmandry`
2023-10-05 03:00:30 +00:00
Michael Goulet
137b6d0b01 Point to where missing return type should go 2023-10-04 21:09:54 +00:00
Michael Goulet
5087bb1046 Relate AliasTy considering variance 2023-10-04 04:22:04 +00:00
Michael Goulet
28d58f6524 Bless tests 2023-10-03 00:37:18 +00:00
Michael Goulet
06d9602d33 Only trigger refine lint on reachable traits 2023-09-29 18:36:41 +00:00
Michael Goulet
305524d1d6 Anonymize binders for refining_impl_trait check 2023-09-26 18:11:12 +00:00
Michael Goulet
8568121996 Need to use hybrid param-env to make sure implication is not circular 2023-09-22 19:04:37 +00:00
Michael Goulet
b5a904a9d4 Use placeholders to prevent using inferred RPITIT types to imply their own WF-ness 2023-09-22 18:55:44 +00:00
Michael Goulet
7714db873e Add note 2023-09-07 01:31:33 +00:00
Michael Goulet
4d05da46e7 Don't emit refining_impl_trait for private items 2023-09-07 01:31:32 +00:00
Michael Goulet
4745d34bc3 Use self instead of the actual self ty 2023-09-07 00:49:09 +00:00
Michael Goulet
e10262ca0a Implement refinement lint for RPITIT 2023-09-07 00:49:09 +00:00
Michael Goulet
07fc644132 Do not require associated types with Self: Sized to uphold bounds when confirming object candidate 2023-09-02 05:08:38 +00:00
Michael Goulet
7a6b52bf0d RPITITs are considered object-safe, they're always on Self:Sized methods 2023-09-02 04:58:23 +00:00
Michael Goulet
f1679f7dd6 Capture lifetimes for associated type bounds destined to be lowered to opaques 2023-08-30 00:31:00 +00:00
bors
4e78abb437 Auto merge of #115326 - matthiaskrgr:rollup-qsoa8ar, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #115164 (MIR validation: reject in-place argument/return for packed fields)
 - #115240 (codegen_llvm/llvm_type: avoid matching on the Rust type)
 - #115294 (More precisely detect cycle errors from type_of on opaque)
 - #115310 (Document panic behavior across editions, and improve xrefs)
 - #115311 (Revert "Suggest using `Arc` on `!Send`/`!Sync` types")
 - #115317 (Devacationize oli-obk)
 - #115319 (don't use SnapshotVec in Graph implementation, as it looks unused; use Vec instead)
 - #115322 (Tweak output of `to_pretty_impl_header` involving only anon lifetimes)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-08-28 19:57:32 +00:00
David Tolnay
823bacb6e3
Revert "Suggest using Arc on !Send/!Sync types"
This reverts commit 9de1a472b6.
2023-08-28 03:16:48 -07:00
Michael Goulet
f8e0dcbf56 Better error message for object type with GAT 2023-08-28 01:05:34 +00:00
Michael Goulet
690bcc6619 Test variances of opaque captures 2023-08-28 01:05:34 +00:00
Michael Goulet
32a9565223 Bless tests 2023-08-28 01:05:34 +00:00
Michael Goulet
13d3e57237 RPITITs capture all their lifetimes 2023-08-28 01:05:34 +00:00
Esteban Kuber
9de1a472b6 Suggest using Arc on !Send/!Sync types 2023-08-09 14:04:10 +00:00
Michael Goulet
07695178f8 Remove dangling tests 2023-08-08 20:41:53 +00:00
Michael Goulet
420ee167a8 Install bidirectional outlives predicates for RPITITs (and RPITs) correctly 2023-08-08 09:39:42 +00:00
Matthias Krüger
f338a1f7ee
Rollup merge of #114301 - compiler-errors:dont-error-on-missing-region-outlives, r=spastorino
Don't check unnecessarily that impl trait is RPIT

We have this random `return_type_impl_trait` function to detect if a function returns an RPIT which is used in outlives suggestions, but removing it doesn't actually change any diagnostics. Let's just remove it.

Also, suppress a spurious outlives error from a ReError.

Fixes #114274
2023-08-02 06:22:48 +02:00
Michael Goulet
1c35634efe Suppress unnecessary outlives 2023-08-01 17:16:47 +00:00
Michael Goulet
9295817bad Don't check unnecessarily that impl trait is RPIT 2023-07-31 18:13:48 +00:00
Matthias Krüger
692d764e53
Rollup merge of #114267 - compiler-errors:rpitit-opaque-bounds, r=spastorino
Map RPITIT's opaque type bounds back from projections to opaques

An RPITIT in a program's AST is eventually translated into both a projection GAT and an opaque. The opaque is used for default trait methods, like:

```
trait Foo {
  fn bar() -> impl Sized { 0i32 }
}
```

The item bounds for both the projection and opaque are identical, and both have a *projection* self ty. This is mostly okay, since we can normalize this projection within the default trait method body to the opaque, but it does two things:
1. it leads to bugs in places where we don't normalize item bounds, like `deduce_future_output_from_obligations`
2. it leads to extra match arms that are both suspicious looking and also easy to miss

This PR maps the opaque type bounds of the RPITIT's *opaque* back to the opaque's self type to avoid this quirk. Then we can fix the UI test for #108304 (1.) and also remove a bunch of match arms (2.).

Fixes #108304

r? `@spastorino`
2023-07-31 16:57:55 +02:00
Michael Goulet
0f0ab89feb Don't install default projection bound for RPITITs 2023-07-30 21:46:29 +00:00
Michael Goulet
23776619a8 Remap explicit item bounds of RPITIT's opaque back to ty::Opaque 2023-07-30 20:31:27 +00:00
Michael Goulet
744e770939 some nits, bless test 2023-07-29 21:29:03 +00:00
Michael Goulet
50d21091ee Implement assumed_wf_types for RPITITs' implementations 2023-07-29 21:19:33 +00:00
Michael Goulet
349a2372ed Take RPITITs inherit the assumed_wf_types of their parent fn 2023-07-29 21:19:33 +00:00
Matthias Krüger
76f0a8c30c
Rollup merge of #114147 - compiler-errors:missing-rpitits, r=spastorino
Insert RPITITs that were shadowed by missing ADTs that resolve to [type error]

Comment inline explains how this can happen.

Fixes #113903
2023-07-28 19:51:16 +02:00
Michael Goulet
ea2f8b346b Add additional test 2023-07-27 22:50:40 +00:00
Michael Goulet
a4ac773f62 Insert RPITITs that were shadowed by missing ADTs that resolve to type error 2023-07-27 22:32:58 +00:00
Michael Goulet
bf38111ac1 tighten span slightly for synthetic item 2023-07-27 22:20:32 +00:00
Michael Goulet
0ae0643a53 Skip reporting item name when checking RPITIT GAT's associated type bounds hold 2023-07-27 22:09:44 +00:00
Santiago Pastorino
20429af7a3
Replace RPITIT current impl with new strategy that lowers as a GAT 2023-07-08 18:21:34 -03:00
Santiago Pastorino
6d80879ab9
Add regression test for RPITITs 2023-07-07 15:58:25 -03:00
bors
0130c3a06e Auto merge of #113215 - compiler-errors:rpitit-predicates-tweaks, r=spastorino
Make RPITITs assume/require their parent method's predicates

Removes a FIXME from the `param_env` query where we were manually adding the parent function's predicates to the RPITIT's assumptions.

r? `@spastorino`
2023-07-04 04:24:24 +00:00
Matthias Krüger
ca7e27a71c
Rollup merge of #113182 - compiler-errors:rpit-stricter-captures, r=oli-obk
Error when RPITITs' hidden types capture more lifetimes than their trait definitions

This implements a stricter set of captures rules for RPITITs. They now may only capture:
1. Lifetimes from the impl header (both the self type and any trait substs -- we may want to restrict just to the self type's lifetimes, but the PR makes that easy to do, too)
2. Lifetimes mentioned by the `impl Trait` in the trait method's definition.

Namely, they may not mention lifetimes from the method (early or late) that are not mentioned in the `impl Trait`.

cc #105258 which I think was trying to do this too, though I'm not super familiar with what exactly differs from that or why that one was broken.
cc #112194 (doesn't fix this issue per se, because it's still an open question, but I think this is objectively better than the status quo, and gets us closer to resolving that issue.)

Technically is a fix for the ICE in #108580, but it turns that issue into an error now. We can decide separately whether or not nested RPITITs should capture lifetimes from their parents.

r? ``@oli-obk``
2023-07-01 13:46:01 +02:00
Michael Goulet
b0ab37eb08 Additional wf test 2023-06-30 20:28:34 +00:00
Michael Goulet
a14285ca7e RPITITs inherit method predicates 2023-06-30 20:08:56 +00:00
Matthias Krüger
38e6bba9c1
Rollup merge of #113171 - spastorino:new-rpitit-25, r=compiler-errors
Properly implement variances_of for RPITIT GAT

This fixes some of the issues found by crater run in https://github.com/rust-lang/rust/pull/112988#issuecomment-1610019572

r? ``@compiler-errors``
2023-06-30 08:01:14 +02:00
Michael Goulet
8ad5ea7b01 Adapt tests from #105258 2023-06-30 02:39:07 +00:00
Michael Goulet
473c88dfb6 Flip the order of binder instantiation for better diagnostics 2023-06-30 02:17:07 +00:00
Michael Goulet
d567e4f8b6 Error for RPITIT hidden tys that capture more than their trait defn 2023-06-30 02:17:07 +00:00
Santiago Pastorino
a10406318e
Properly implement variances_of for RPITIT GAT 2023-06-29 23:08:32 -03:00
Michael Goulet
0506250f8c Encode item bounds for DefKind::ImplTraitPlaceholder 2023-06-29 16:37:13 +00:00
Michael Goulet
7563909a28 Liberate bound vars properly when suggesting missing AFIT 2023-06-21 16:32:26 +00:00
Michael Goulet
be68e9e336
Rollup merge of #112596 - compiler-errors:missing-sig-with-rpitit, r=b-naber
Suggest correct signature on missing fn returning RPITIT/AFIT

Add `async` and unpeel the future's output type if the function is async

Fixes #108195
2023-06-19 17:53:34 -07:00
Michael Goulet
bc78d0cbf1 Error on unconstrained lifetime in RPITIT 2023-06-14 05:20:31 +00:00
Michael Goulet
dbee24d949 Suggest correct signature on missing fn returning RPITIT/AFIT 2023-06-13 20:41:15 +00:00
Michael Goulet
14bf909e71 Note base types of coercion 2023-05-12 00:10:52 +00:00
Matthias Krüger
b194b43bd1
Rollup merge of #111039 - compiler-errors:foreign-span-rpitit, r=tmiasko
Encode def span for foreign return-position `impl Trait` in trait

Fixes #111031, yet another def-span encoding issue :/

Includes a smaller repro than the issue, but I can confirm it ICEs:

```
query stack during panic:
#0 [def_span] looking up span for `rpitit::Foo::bar::{opaque#0}`
#1 [object_safety_violations] determining object safety of trait `rpitit::Foo`
#2 [check_is_object_safe] checking if trait `rpitit::Foo` is object safe
#3 [typeck] type-checking `main`
#4 [used_trait_imports] finding used_trait_imports `main`
#5 [analysis] running analysis passes on this crate
```

Luckily since this only affects nightly, this desn't need to be backported.
2023-05-04 08:09:05 +02:00
Michael Goulet
7411468ff8 Mark RPITIT and AFIT as no longer incomplete 2023-05-02 05:04:50 +00:00
Michael Goulet
ed468eebf6 Encode def span for foreign RPITITs 2023-04-30 21:52:35 +00:00
Santiago Pastorino
2ca350c776
Bless some extra working tests under -Zlower-impl-trait-in-trait-to-assoc-ty 2023-03-29 11:27:26 -03:00
Santiago Pastorino
66714658d0
Properly skip RPITITs from ModChild and give a name in AssocItem 2023-03-29 11:19:49 -03:00
Michael Goulet
76b0cf812b
Walk return-position impl trait in trait deeply in associated_item_def_ids 2023-03-29 11:19:48 -03:00
Matthias Krüger
3b49ad3814
Rollup merge of #109545 - compiler-errors:rpitit-wf, r=eholk
Deeply check well-formedness of return-position `impl Trait` in trait

Walk the bounds of RPITITs to see if we find any more RPITITs 😸
2023-03-25 03:37:12 +01:00
Michael Goulet
b605d0740f Deeply check WF for RPITITs 2023-03-23 23:37:22 +00:00
Dylan DPC
031640ccd2
Rollup merge of #109414 - spastorino:new-rpitit-16, r=compiler-errors
Do not consider synthesized RPITITs on missing items checks

Without this patch for `tests/ui/impl-trait/in-trait/dont-project-to-rpitit-with-no-value.rs` we get ...

```
warning: the feature `return_position_impl_trait_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
 --> tests/ui/impl-trait/in-trait/dont-project-to-rpitit-with-no-value.rs:4:12
  |
4 | #![feature(return_position_impl_trait_in_trait)]
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
  = note: `#[warn(incomplete_features)]` on by default

error[E0046]: not all trait items implemented, missing: `foo`, ``
  --> tests/ui/impl-trait/in-trait/dont-project-to-rpitit-with-no-value.rs:12:1
   |
8  |     fn foo(&self) -> impl Sized;
   |     ----------------------------
   |     |                |
   |     |                `` from trait
   |     `foo` from trait
...
12 | impl MyTrait for i32 {
   | ^^^^^^^^^^^^^^^^^^^^ missing `foo`, `` in implementation

error: aborting due to previous error; 1 warning emitted

For more information about this error, try `rustc --explain E0046`.
```

instead of ...

```
warning: the feature `return_position_impl_trait_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
  --> $DIR/dont-project-to-rpitit-with-no-value.rs:4:12
   |
LL | #![feature(return_position_impl_trait_in_trait)]
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
   = note: `#[warn(incomplete_features)]` on by default

error[E0046]: not all trait items implemented, missing: `foo`
  --> $DIR/dont-project-to-rpitit-with-no-value.rs:12:1
   |
LL |     fn foo(&self) -> impl Sized;
   |     ---------------------------- `foo` from trait
...
LL | impl MyTrait for i32 {
   | ^^^^^^^^^^^^^^^^^^^^ missing `foo` in implementation

error: aborting due to previous error; 1 warning emitted

For more information about this error, try `rustc --explain E0046`.
```

r? `@compiler-errors`
2023-03-23 00:00:35 +05:30
Santiago Pastorino
c1f3529c91 Always encode RPITITs 2023-03-21 23:35:46 +00:00
Santiago Pastorino
364a5d4b54
Do not consider synthesized RPITITs on missing items checks 2023-03-21 15:44:12 -03:00
nils
66ba60a445
Rollup merge of #109240 - compiler-errors:dont-binder-twice, r=oli-obk
Walk un-shifted nested `impl Trait` in trait when setting up default trait method assumptions

Fixes a double subtraction in some binder math in return-position `impl Trait` in trait handling code.

Fixes #109239
2023-03-21 13:00:23 +01:00
Matthias Krüger
d86fd83ef6
Rollup merge of #109277 - spastorino:new-rpitit-14, r=compiler-errors
Fix generics_of for impl's RPITIT synthesized associated type

The only useful commit is the last one.

This makes `generics_of` for the impl side RPITIT copy from the trait's associated type and avoid the fn on the impl side which was previously wrongly used.
This solution is better but we still need to fix resolution of the generated generics.

r? ``@compiler-errors``
2023-03-20 09:46:53 +01:00
Michael Goulet
9f80c75703 Walk un-shifted nested impl Trait in trait when setting up default trait method assumptions 2023-03-20 04:50:02 +00:00
Matthias Krüger
8417c93092
Rollup merge of #109238 - spastorino:new-rpitit-12, r=compiler-errors
Fix generics mismatch errors for RPITITs on -Zlower-impl-trait-in-trait-to-assoc-ty

This PR stops reporting errors due to different count of generics on the new synthesized associated types for RPITITs. Those were already reported when we compare the function on the triat with the function on the impl.

r? ``@compiler-errors``
2023-03-18 12:04:23 +01:00
Santiago Pastorino
640c20272e
Fix generics_of for impl's RPITIT synthesized associated type 2023-03-17 20:01:57 -03:00
Santiago Pastorino
9139ed076d
Fix impl_trait_ty_to_ty substs 2023-03-17 16:28:00 -03:00