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.
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
Use tuple inference for closures #21
Use tuple inference for closures #21
Changes from 1 commit
619ca76
5d085ad
b869aa5
ed4dcc0
71569e4
3a3a085
1f78509
98a5506
0c9bf13
fa79db8
e82584a
35fc835
f64ddc6
fb97024
c8262fd
5a6b426
0065e33
7bc0bf7
2c9f82e
952c046
1d8ae3a
a899ad2
c81935e
ef6100e
c10ad0d
7804644
1dd00e6
4226a17
c3c84ad
5099914
75e471a
caef832
e02952c
75a2c68
e0df2f8
1d02f4f
0aaf56f
e83190b
8d6cf3a
98231bf
8b54f1e
325acef
f23670e
4434e8c
8b2106f
87302a2
4ac88c0
3cec71e
b2ca513
222b885
d45faff
1083833
1aef86c
1270734
389321a
90782cb
c19b237
15ccdeb
ebd15e7
49aef96
fb1fab5
d24026b
c66789d
2799aec
78f4cbb
780ca14
0855263
c81b43d
3f5e617
656a17b
a14efd1
e215e79
8b39250
683d1bc
5d7e7c2
7889373
8158d56
b4bdc07
be28b62
4db1029
0016405
de195f2
a94b2cb
43c7a9b
493c037
d92155b
74e0719
8f43fa0
bb57c9f
e2be5f5
10d3f8a
884a1b4
f7aee33
2b54ab8
07dbe49
5ea5551
b4b8a52
bab0968
d0c2a2d
df84ac7
09bfb7e
0d20cf8
342b406
c18fa46
98f59bc
09a364e
09c6149
32714eb
97eb606
f42dac0
00e64ba
fdff7de
01bf350
f09372a
fa56cf5
9fa0794
d013e60
ba6e2b3
8bf03c3
193503e
a1894e4
82cb379
961f183
8819721
8667f93
2815db1
36903d7
bec8e5f
300b0ac
e0f46a1
a18b34d
8b05998
25b2f48
a5cdc06
6bfe132
e2a511f
e11c667
9bb10cc
d7a9707
2d56512
87a4495
0e9769e
fd4dd00
55efa96
f7b6ace
7c3e1ff
fd5859a
5034d47
ca6c695
4f2d941
8c35a92
c0894e7
409c141
5aed495
91c3ef8
7565ccc
9f8a782
2df1487
f9df658
ac85a4d
ae46b9e
94ae5d1
c8f9c72
044f717
ad3a6f7
283d4c4
a1947b3
de4bd9f
1823dea
d5a04a9
3815e91
55082ce
c101116
156ef2b
fec0479
ee04f9a
15aa6f3
954361a
94b4de0
f5b7dd8
a742547
439b766
9abc6bd
5e188f5
d778203
1854f8b
e5c645f
f6fbf66
cf8e5d1
89fb34f
471fb62
1c1bfba
f9059a4
b729368
3193d52
b4eb099
78125ec
64b8fd7
62068a5
56f5c7f
0be66d7
c394624
c213c68
57250ef
b2a5a7a
141bb23
c63f634
5ea3eaf
14cc177
bc57bd8
bb9ce7c
9911160
5e126c9
12c10e3
94a7ea2
8b6838b
0f5c769
b8752ff
2e2e7de
7344f93
5d90d6e
c20356e
a49451c
2477f07
90c5b8f
0ed4bc5
2d6cbd2
fb47bda
85109af
bd51226
e788b1a
7adeb2c
9891908
a7b092f
2e87a6e
dbb73f8
498dab0
04b72b4
a67d248
dd33766
4e48010
b6c8455
17d3277
a11331a
7cd0c00
ee9ec55
35cf8f6
1f457d3
6c6276a
a0e40cc
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be
bug!
, like the calls aboveThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can just be
self.compute(substs.as_closure().upvar_tuple_ty())
, I believe, as inference variables will already be resolved in that recursive callThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@roxelo check https://rust-lang.zulipchat.com/#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/meeting.202020-07-31/near/205631567
There are some details here, that might be helpful
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion from aman:try size ==1 instead of is_none()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or maybe
self.tcx.upvars_mentioned(closure_def_id_a.expect_local().map_or(true, |u| u.is_empty())