Add tests for delegation generics#152907
Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom Feb 21, 2026
Merged
Conversation
Contributor
|
@bors r+ |
Contributor
rust-bors bot
pushed a commit
that referenced
this pull request
Feb 21, 2026
…uwer Rollup of 9 pull requests Successful merges: - #146832 (Not linting irrefutable_let_patterns on let chains) - #146972 (Support importing path-segment keyword with renaming) - #152241 (For panic=unwind on Wasm targets, define __cpp_exception tag) - #152527 (Remove -Zemit-thin-lto flag) - #152769 (Do not cancel try builds after first job failure) - #152907 (Add tests for delegation generics) - #152455 (Remove the translation `-Z` options and the `Translator` type. ) - #152813 (Skip the `use_existential_projection_new_instead` field in the `Debug` impl) - #152912 (Expose Span for all DefIds in rustc_public)
rust-timer
added a commit
that referenced
this pull request
Feb 21, 2026
Rollup merge of #152907 - aerooneqq:delegation-generics-new-tests, r=petrochenkov Add tests for delegation generics This PR adds tests from #151864 as discussed in this [comment](#151864 (comment)). Part of #118212. The majority of new tests are added in `mapping` folder, (`ast-hir-engine` folder in #151864), those tests test mapping between generic params of delegee and our generated function for delegation (that is why the name of the folder was changed, I think it better reflects what those tests testing). In each mapping test comments were added to each test case and one comment describing the goal of mapping tests was added at the top of each file. Next, tests for defaults in generic params (`generic-params-defaults.rs`), params with the same name (`generic-params-same-names`), errors in providing user-specified generic args (`generics-gen-args-errors.rs`) and wrong signature of a generated function in impl trait case (`impl-trait-wrong-args-count.rs`, renamed from `wrong-args-count-ice.rs` in #151864). `generic-aux-pass.rs` test was not added, as all reuses in this test produce known ICE `DefId::expect_local DefId(..) isn't local` #143498 (which will be fixed in #151864, however it will not close mentioned issue, as synthetic generic params are not yet supported in new generics implementation). r? @petrochenkov
github-actions bot
pushed a commit
to rust-lang/miri
that referenced
this pull request
Feb 22, 2026
…uwer Rollup of 9 pull requests Successful merges: - rust-lang/rust#146832 (Not linting irrefutable_let_patterns on let chains) - rust-lang/rust#146972 (Support importing path-segment keyword with renaming) - rust-lang/rust#152241 (For panic=unwind on Wasm targets, define __cpp_exception tag) - rust-lang/rust#152527 (Remove -Zemit-thin-lto flag) - rust-lang/rust#152769 (Do not cancel try builds after first job failure) - rust-lang/rust#152907 (Add tests for delegation generics) - rust-lang/rust#152455 (Remove the translation `-Z` options and the `Translator` type. ) - rust-lang/rust#152813 (Skip the `use_existential_projection_new_instead` field in the `Debug` impl) - rust-lang/rust#152912 (Expose Span for all DefIds in rustc_public)
github-actions bot
pushed a commit
to rust-lang/rustc-dev-guide
that referenced
this pull request
Feb 23, 2026
…uwer Rollup of 9 pull requests Successful merges: - rust-lang/rust#146832 (Not linting irrefutable_let_patterns on let chains) - rust-lang/rust#146972 (Support importing path-segment keyword with renaming) - rust-lang/rust#152241 (For panic=unwind on Wasm targets, define __cpp_exception tag) - rust-lang/rust#152527 (Remove -Zemit-thin-lto flag) - rust-lang/rust#152769 (Do not cancel try builds after first job failure) - rust-lang/rust#152907 (Add tests for delegation generics) - rust-lang/rust#152455 (Remove the translation `-Z` options and the `Translator` type. ) - rust-lang/rust#152813 (Skip the `use_existential_projection_new_instead` field in the `Debug` impl) - rust-lang/rust#152912 (Expose Span for all DefIds in rustc_public)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds tests from #151864 as discussed in this comment. Part of #118212.
The majority of new tests are added in
mappingfolder, (ast-hir-enginefolder in #151864), those tests test mapping between generic params of delegee and our generated function for delegation (that is why the name of the folder was changed, I think it better reflects what those tests testing). In each mapping test comments were added to each test case and one comment describing the goal of mapping tests was added at the top of each file.Next, tests for defaults in generic params (
generic-params-defaults.rs), params with the same name (generic-params-same-names), errors in providing user-specified generic args (generics-gen-args-errors.rs) and wrong signature of a generated function in impl trait case (impl-trait-wrong-args-count.rs, renamed fromwrong-args-count-ice.rsin #151864).generic-aux-pass.rstest was not added, as all reuses in this test produce known ICEDefId::expect_local DefId(..) isn't local#143498 (which will be fixed in #151864, however it will not close mentioned issue, as synthetic generic params are not yet supported in new generics implementation).r? @petrochenkov