-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #93803 - cjgillot:unify-bounds, r=oli-obk
Handle generic bounds in a uniform way in HIR Generic bounds in HIR used to be split between bounds in the parameter definition and bounds in a where clause. This PR attempts to store all of those as where predicates. This effectively desugars ```rust fn foo<T: Default, U>(x: impl Copy) where U: Clone ``` into ```rust fn foo<T, U, _V>(x: _V) where T: Default, U: Clone, _V: Copy ``` (where _V is actually hidden and called "impl Copy"). I managed to make compiler warnings more uniform. About rustdoc: is making this desugaring user-visible acceptable? About clippy: I don't understand the subtle logic in the `needless-lifetimes` lint. r? `@estebank`
- Loading branch information
Showing
120 changed files
with
1,498 additions
and
1,462 deletions.
There are no files selected for viewing
This file contains 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 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 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
Oops, something went wrong.