-
Notifications
You must be signed in to change notification settings - Fork 14k
Do not propogate unnecessary closure constraints. #148329
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
Open
LorrensP-2158466
wants to merge
9
commits into
rust-lang:main
Choose a base branch
from
LorrensP-2158466:closure-prop
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
8c66aab
Do not propogate unnecessary closure constraints + tests.
LorrensP-2158466 a36dc08
correct filtering of regions + update comment
LorrensP-2158466 a2e305d
address review: add explanation for tests
LorrensP-2158466 477a820
fix typo in test explanation
LorrensP-2158466 b7f5bca
propagate region error for every non-local lower bound
LorrensP-2158466 3071a81
test case2
LorrensP-2158466 967e963
bless test about post dominating lower bounds
LorrensP-2158466 44fcd46
add explanation to postdom test
LorrensP-2158466 d1674cb
oops
LorrensP-2158466 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| //@ check-pass | ||
|
|
||
|
|
||
| struct MyTy<'x, 'a, 'b>(std::cell::Cell<(&'x &'a u8, &'x &'b u8)>); | ||
| fn wf<T>(_: T) {} | ||
| fn test<'a, 'b>() { | ||
| |_: &'a u8, x: MyTy<'_, 'a, 'b>| wf(x); | ||
| |x: MyTy<'_, 'a, 'b>, _: &'a u8| wf(x); | ||
| } | ||
|
|
||
| fn main(){} | ||
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,22 @@ | ||
| //@ check-pass | ||
|
|
||
LorrensP-2158466 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| #[derive(Clone, Copy)] | ||
| struct Inv<'a>(*mut &'a ()); | ||
| impl<'a> Inv<'a> { | ||
| fn outlived_by<'b: 'a>(self, _: Inv<'b>) {} | ||
| } | ||
| struct OutlivedBy<'a, 'b: 'a>(Inv<'a>, Inv<'b>); | ||
|
|
||
| fn closure_arg<'b, 'c, 'd>( | ||
| _: impl for<'a> FnOnce(Inv<'a>, OutlivedBy<'a, 'b>, OutlivedBy<'a, 'c>, Inv<'d>), | ||
| ) { | ||
| } | ||
| fn foo<'b, 'c, 'd: 'b>() { | ||
| closure_arg::<'b, 'c, 'd>(|a, b, c, d| { | ||
| a.outlived_by(b.1); | ||
| a.outlived_by(c.1); | ||
| b.1.outlived_by(d); | ||
| }); | ||
| } | ||
|
|
||
| fn main() {} | ||
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.