]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #104295 - compiler-errors:rpitit-generics-parity, r=eholk
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>
Tue, 22 Nov 2022 11:06:36 +0000 (16:36 +0530)
committerGitHub <noreply@github.com>
Tue, 22 Nov 2022 11:06:36 +0000 (16:36 +0530)
commit680ba90f9698741dab669c8151acb8d022d06617
tree430945ced3e669e3d57f16eee0b9161b55cc7b02
parenta78c9bee4d9d51a3891bd8ecae1f28a93b83653b
parentdf5f247a5c5432fc85a84cafb8461fafd01cf6ae
Rollup merge of #104295 - compiler-errors:rpitit-generics-parity, r=eholk

Check generics parity before collecting return-position `impl Trait`s in trait

The only thing is that this duplicates the error message for number of generics mismatch, but we already deduplicate that error message in Cargo. I could add a flag to delay the error if the reviewer cares.

Fixes #104281

Also drive-by adds a few comments to the `collect_trait_impl_trait_tys` method, and removes an unused argument from `compare_number_of_generics`.