Matthew Jasper
902bc0fb1a
Access individual fields of tuples, closures and generators on drop.
2018-04-27 20:41:30 +01:00
Felix S. Klock II
746d63a203
Checkpoint the current status of NLL on ui tests via compare-mode=nll.
2018-04-11 00:38:35 +02:00
Felix S. Klock II
1c8d2bdda1
Workaround rust-lang/rust#49855 by forcing rustc_error in any mode, including NLL.
...
NOTE: I was careful to make each change in a manner that preserves the
existing diagnostic output (usually by ensuring that no lines were
added or removed). This means that the resulting source files are not
as nice to read as they were at the start. But we will have to review
these cases by hand anyway as follow-up work, so cleanup could
reasonably happen then (or not at all).
2018-04-11 00:20:05 +02:00
kennytm
e2b89221f1
Rollup merge of #49194 - Zoxc:unsafe-generator, r=cramertj
...
Make resuming generators unsafe instead of the creation of immovable generators
cc @withoutboats
Fixes #47787
2018-03-25 01:26:34 +08:00
Niko Matsakis
f71de45b23
use subtyping when we create a closure instead of for upvar types
...
We used to make the upvar types in the closure `==` but that was
stronger than we needed. Subtyping suffices, since we are copying the
upvar value into the closure field. This in turn allows us to infer
smaller lifetimes in captured values in some cases (like the example
here), avoiding errors.
2018-03-21 05:40:59 -04:00
John Kåre Alsaker
57896abc38
Make resuming generators unsafe instead of the creation of immovable generators. Fixes #47787
2018-03-21 00:09:58 +01:00
kennytm
a45b79ddb7
Rollup merge of #48706 - ehuss:main-not-found-in-crate, r=estebank
...
Add crate name to "main function not found" error message.
Fixes #44798 and rust-lang/cargo#4948 .
I was wondering if it might be cleaner to update the ui tests to add a simple `fn main() {}` for the unrelated tests. Let me know if you would prefer that.
2018-03-16 01:49:38 +08:00
bors
ff2d506c2c
Auto merge of #48138 - estebank:issue-45092, r=nikomatsakis
...
Reword E0044 and message for `!Send` types
- Reword E0044 help.
- Change error message for types that don't implement `Send`
CC #45092 , #46678 , #24909 , #33307 .
2018-03-15 13:16:09 +00:00
Esteban Küber
6d8a173980
Reword E0044 and message for !Send types
...
- Reword E0044 help.
- Change error message for types that don't implement `Send`
2018-03-14 18:04:20 -07:00
Eric Huss
6aa4dcb9cf
Add empty main() to tests where it is missing.
2018-03-14 12:23:28 -07:00
Eric Huss
b4b7ccbd1c
Add crate name to "main function not found" error message.
...
Fixes #44798 and rust-lang/cargo#4948 .
2018-03-14 11:40:13 -07:00
Guillaume Gomez
2e104a77cf
update tests
2018-03-14 00:53:24 +01:00
Vadim Petrochenkov
7ba5fd168a
Update UI tests
2018-02-26 20:24:42 +03:00
Vadim Petrochenkov
fa2d9fc4b9
Update UI tests
2018-02-26 20:24:02 +03:00
Guillaume Gomez
5747fd6611
Update ui tests
2018-02-25 12:15:05 +01:00
John Kåre Alsaker
774997dab3
Fix visitation order of calls so that it matches execution order. Fixes #48048
2018-02-09 10:49:24 +01:00
John Kåre Alsaker
4325c6375e
Allow access of the state field before the generator transform. Fixes #47482 , #46476
2018-01-30 11:40:39 +01:00
John Kåre Alsaker
77bc26f4f3
Require yield types to be sized
2018-01-29 10:02:04 +01:00
John Kåre Alsaker
dd3fa07a52
Make yield_in_scope_for_expr work with patterns. Fixes #47758
2018-01-29 10:02:03 +01:00
John Kåre Alsaker
55c6c88782
Port borrows across yield check to MIR borrowck
2018-01-23 05:10:39 +01:00
John Kåre Alsaker
410d27bb97
Add dropck test
2018-01-23 05:10:39 +01:00
John Kåre Alsaker
bae2988e6f
Fix yield-while-local-borrowed.rs test
2018-01-23 05:10:39 +01:00
John Kåre Alsaker
c166ef9d1b
Make immovable generators unsafe
2018-01-23 05:10:38 +01:00
John Kåre Alsaker
ccf0d8399e
Adds support for immovable generators. Move checking of invalid borrows across suspension points to borrowck. Fixes #44197 , #45259 and #45093 .
2018-01-23 05:10:38 +01:00
Esteban Küber
9b36030a65
On E0283, point at method with the requirements
...
On required type annotation diagnostic error, point at method with the
requirements if the span is available.
2018-01-15 14:56:32 -08:00
Esteban Küber
02079e44dd
Point at var in short lived borrows
2017-12-14 22:45:45 -08:00
Oliver Schneider
8937d6a6cf
Merge cfail and ui tests into ui tests
2017-11-24 11:32:35 +01:00
Ariel Ben-Yehuda
5c0feb86b9
add proofs and fix postorder traversal
...
I don't think the "quasi-postorder" travesal could cause any issues, but
there's no reason for it to stay broken.
2017-09-20 16:36:24 +03:00
John Kåre Alsaker
3a511e06a5
Only consider yields coming after the expressions when computing generator interiors
2017-09-20 16:36:24 +03:00
Alex Crichton
9620d26138
Fix more UI tests
2017-08-17 22:52:04 -07:00
Alex Crichton
a47038f551
Fix UI tests
2017-08-17 15:20:06 -07:00
Alex Crichton
22ebcaca16
Choose another error code
2017-08-14 19:38:32 -07:00
Alex Crichton
6eab1ca9dd
Fix UI test
2017-08-12 11:36:00 -07:00
Alex Crichton
e181060a59
Add UI test outputs
2017-08-09 16:37:56 -07:00
Alex Crichton
352577f4bb
Initial pass review comments
2017-08-09 13:56:19 -07:00
Alex Crichton
cc4ff8f4d1
Use a free error code
2017-07-29 09:30:03 -07:00
Alex Crichton
ff996853fe
Fix more tests with GeneratorState rename
2017-07-28 15:47:55 +02:00
Niko Matsakis
39478e8ab1
update references due to removing tabs
2017-07-28 15:46:27 +02:00
John Kåre Alsaker
d32428bc5f
Remove tabs
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