-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
delegation: don't propagate synthetic params, remove lifetime hacks #154364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
rust-bors
merged 1 commit into
rust-lang:main
from
aerooneqq:delegation-generics-small-fixes
Mar 25, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| //@ compile-flags: -Z deduplicate-diagnostics=yes | ||
| //@ edition:2024 | ||
|
|
||
| #![feature(fn_delegation)] | ||
| #![feature(iter_advance_by)] | ||
| #![feature(iter_array_chunks)] | ||
| #![feature(iterator_try_collect)] | ||
| #![feature(iterator_try_reduce)] | ||
| #![feature(iter_collect_into)] | ||
| #![feature(iter_intersperse)] | ||
| #![feature(iter_is_partitioned)] | ||
| #![feature(iter_map_windows)] | ||
| #![feature(iter_next_chunk)] | ||
| #![feature(iter_order_by)] | ||
| #![feature(iter_partition_in_place)] | ||
| #![feature(trusted_random_access)] | ||
| #![feature(try_find)] | ||
| #![allow(incomplete_features)] | ||
|
|
||
| impl X { | ||
| //~^ ERROR: cannot find type `X` in this scope | ||
| reuse< std::fmt::Debug as Iterator >::*; | ||
| //~^ ERROR: expected method or associated constant, found associated type `Iterator::Item` | ||
| //~| ERROR: expected a type, found a trait | ||
| } | ||
|
|
||
| pub fn main() {} | ||
27 changes: 27 additions & 0 deletions
27
tests/ui/delegation/generics/synth-params-ice-143498.stderr
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| error[E0425]: cannot find type `X` in this scope | ||
| --> $DIR/synth-params-ice-143498.rs:20:6 | ||
| | | ||
| LL | impl X { | ||
| | ^ not found in this scope | ||
|
|
||
| error[E0575]: expected method or associated constant, found associated type `Iterator::Item` | ||
| --> $DIR/synth-params-ice-143498.rs:22:10 | ||
| | | ||
| LL | reuse< std::fmt::Debug as Iterator >::*; | ||
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a method or associated constant | ||
|
|
||
| error[E0782]: expected a type, found a trait | ||
| --> $DIR/synth-params-ice-143498.rs:22:12 | ||
| | | ||
| LL | reuse< std::fmt::Debug as Iterator >::*; | ||
| | ^^^^^^^^^^^^^^^ | ||
| | | ||
| help: you can add the `dyn` keyword if you want a trait object | ||
| | | ||
| LL | reuse< dyn std::fmt::Debug as Iterator >::*; | ||
| | +++ | ||
|
|
||
| error: aborting due to 3 previous errors | ||
|
|
||
| Some errors have detailed explanations: E0425, E0575, E0782. | ||
| For more information about an error, try `rustc --explain E0425`. |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.