66078 Commits

Author SHA1 Message Date
John Kåre Alsaker
b2d931abbb Fix error message tests again 2017-07-28 15:46:27 +02:00
John Kåre Alsaker
6106f6c5c1 Fix error message tests 2017-07-28 15:46:27 +02:00
John Kåre Alsaker
0a8b81a568 Ignore drop check bools when testing for legal generator types 2017-07-28 15:46:27 +02:00
John Kåre Alsaker
4628f8534f Fix error message tests 2017-07-28 15:46:27 +02:00
John Kåre Alsaker
f5ec50358a Fix tidy errors 2017-07-28 15:46:27 +02:00
Niko Matsakis
3fdc3fa1ec change how we report err_out_of_scope borrowck errors
Also, remove the explicit code detecting borrows over a yield.  It
turns out not to be necessary -- any such borrow winds up with a
lifetime that is part of the generator type, and therefore which will
outlive the generator expression itself, which yields an
`err_out_of_scope`. So instead we intercept those errors and display
them in a nicer way.
2017-07-28 15:46:27 +02:00
Niko Matsakis
188cdf499f combine bckerr_to_diag and note_and_explain_bckerr 2017-07-28 15:46:27 +02:00
John Kåre Alsaker
5a6e0694da Remove a FIXME and apply the same hack as closures 2017-07-28 15:46:27 +02:00
John Kåre Alsaker
14c747678e Fix a string literal 2017-07-28 15:46:27 +02:00
John Kåre Alsaker
e4fdbcbc9f Update FIXME 2017-07-28 15:46:26 +02:00
John Kåre Alsaker
b744b1cfe3 Convert to spaces 2017-07-28 15:46:26 +02:00
John Kåre Alsaker
cbdb18650e Add some comments 2017-07-28 15:46:26 +02:00
John Kåre Alsaker
eea290d7fd Convert to spaces 2017-07-28 15:46:26 +02:00
Alex Crichton
09a5d319ab Remove support for gen arg 2017-07-28 15:46:26 +02:00
John Kåre Alsaker
93172045c8 Fix a bug with yielding subtypes of the yield type. 2017-07-28 15:46:25 +02:00
John Kåre Alsaker
dcddd80729 Remove debug code 2017-07-28 15:46:25 +02:00
John Kåre Alsaker
a602fc06bd Revert some whitespace changes 2017-07-28 15:46:25 +02:00
John Kåre Alsaker
10def9a6e0 Revert borrowck changes 2017-07-28 15:46:25 +02:00
John Kåre Alsaker
2ad0f89e86 Tweak docs 2017-07-28 15:46:25 +02:00
Niko Matsakis
d71fa9371c fix yields-in-args test and add a reverse one 2017-07-28 15:46:25 +02:00
Niko Matsakis
264c3f4952 add some tests of yielding with outstanding borrows
No doubt there are more tests one might write, but it's a start.
2017-07-28 15:46:25 +02:00
Alex Crichton
8e82b19c6b Convert tabs to spaces 2017-07-28 15:46:25 +02:00
Alex Crichton
12bbcd3c29 Add a test case for conditional drop 2017-07-28 15:46:25 +02:00
John Kåre Alsaker
77bf6e4461 Add a test 2017-07-28 15:46:25 +02:00
Alex Crichton
7eae8489fc Touch up unstable docs for generators 2017-07-28 15:46:25 +02:00
John Kåre Alsaker
6e66dccc44 Remove a FIXME 2017-07-28 15:46:24 +02:00
John Kåre Alsaker
05fcef0b3e Fix printing 2017-07-28 15:46:24 +02:00
John Kåre Alsaker
21f2d259e0 Consider StorageDead and StorageLive as gens for liveness analysis 2017-07-28 15:46:24 +02:00
John Kåre Alsaker
75eb59895f Copy a comment 2017-07-28 15:46:24 +02:00
John Kåre Alsaker
098d6f0597 Move a FIXME around 2017-07-28 15:46:24 +02:00
John Kåre Alsaker
66b8a12a6d Fix upstream changes 2017-07-28 15:46:24 +02:00
John Kåre Alsaker
bfd71c5b70 Fix examples 2017-07-28 15:46:24 +02:00
John Kåre Alsaker
8bcafc5e17 Fix hash impl for SimplifiedType 2017-07-28 15:46:24 +02:00
Alex Crichton
5d174f0035 Clarifying documentation for generator 2017-07-28 15:46:24 +02:00
John Kåre Alsaker
e62d9d5230 Fix tests 2017-07-28 15:46:24 +02:00
John Kåre Alsaker
a88e7506a6 Fix whitespace 2017-07-28 15:46:24 +02:00
John Kåre Alsaker
2afd04c009 Add some comments 2017-07-28 15:46:24 +02:00
John Kåre Alsaker
8cd0595602 Use FIXME instead of TODO 2017-07-28 15:46:24 +02:00
John Kåre Alsaker
df608e710c Rename suspend to yield 2017-07-28 15:46:24 +02:00
John Kåre Alsaker
66fc6dfbb6 Update error codes 2017-07-28 15:46:24 +02:00
John Kåre Alsaker
057b0adf47 Don't print gen in HIR 2017-07-28 15:46:23 +02:00
John Kåre Alsaker
075fd364d0 Ensure upvars are dropped when generators have never been resumed 2017-07-28 15:46:23 +02:00
Alex Crichton
facabcb85e Fill in generator tracking issue in a few more locations 2017-07-28 15:46:23 +02:00
Alex Crichton
55bb1c08d3 Add documentation for generators 2017-07-28 15:46:23 +02:00
John Kåre Alsaker
bc9b4deeb5 Make yield and gen arg outside generator literals an error and update tests 2017-07-28 15:46:23 +02:00
Alex Crichton
5efb0cbe04 Add some generator pass/fail tests 2017-07-28 15:46:23 +02:00
Alex Crichton
51bb31ad25 Fix tests 2017-07-28 15:46:23 +02:00
John Kåre Alsaker
cc40f58b8b Added some tests 2017-07-28 15:46:23 +02:00
John Kåre Alsaker
0b5b0122ae Consider all implementations of Generator, not just built in ones 2017-07-28 15:46:23 +02:00
John Kåre Alsaker
b5449b73e6 Ban explicit arguments on generators 2017-07-28 15:46:23 +02:00