-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix incosistent usage of push_lifetime_outlives
The code that relates Adt's was using `push_lifetime_outlives_goals` in a way that assumed it would push a outlives b when the variance is covariant. The code that relates two references assumed that it would push a constraint b outlives a when the variance was covariant. This latter behavior was what the function actually did, despite its name implying the opposite. This commit changes the behavior of `push_lifetime_outlives_goals` to push a outlives b when the variance is covariant, and updates the code that relates references. We also updated an incorrect test case where a reference was used in a struct. This test case would have failed (because `push_lifetime_outlives_goals` was inverted), but the constraints in the expected output were also incorrectly inverted. The output of two additional test cases also were updated because the constraints were emitted in a different order after making the update. Co-authored-by: David Ross <daboross@daboross.net>
- Loading branch information
1 parent
c7c1d9d
commit d5b0ffc
Showing
5 changed files
with
13 additions
and
18 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
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