diff options
| author | bors <bors@rust-lang.org> | 2017-11-21 22:52:19 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-11-21 22:52:19 +0000 |
| commit | d6d09e0b4dac93ae07dae6206bf95e7cea0124a2 (patch) | |
| tree | 245513cfdfc7bac11b0e7049ea60bf9908b01216 /src/test/ui/span | |
| parent | 63739ab7b210c1a8c890c2ea5238a3284877daa3 (diff) | |
| parent | 00732a31a0a9b00d4ffb333473ae95e66f8e1dfc (diff) | |
| download | rust-d6d09e0b4dac93ae07dae6206bf95e7cea0124a2.tar.gz rust-d6d09e0b4dac93ae07dae6206bf95e7cea0124a2.zip | |
Auto merge of #45879 - nikomatsakis:nll-kill-cyclic-closures, r=arielb1
move closure kind, signature into `ClosureSubsts`
Instead of using side-tables, store the closure-kind and signature in the substitutions themselves. This has two key effects:
- It means that the closure's type changes as inference finds out more things, which is very nice.
- As a result, it avoids the need for the `freshen_closure_like` code (though we still use it for generators).
- It avoids cyclic closures calls.
- These were never meant to be supported, precisely because they make a lot of the fancy inference that we do much more complicated. However, due to an oversight, it was previously possible -- if challenging -- to create a setup where a closure *directly* called itself (see e.g. #21410).
We have to see what the effect of this change is, though. Needs a crater run. Marking as [WIP] until that has been assessed.
r? @arielb1
Diffstat (limited to 'src/test/ui/span')
| -rw-r--r-- | src/test/ui/span/coerce-suggestions.stderr | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/test/ui/span/coerce-suggestions.stderr b/src/test/ui/span/coerce-suggestions.stderr index 07f49d999a4..5bd6ef806b5 100644 --- a/src/test/ui/span/coerce-suggestions.stderr +++ b/src/test/ui/span/coerce-suggestions.stderr @@ -43,9 +43,6 @@ error[E0308]: mismatched types | 41 | f = box f; | ^^^^^ cyclic type of infinite size - | - = note: expected type `_` - found type `std::boxed::Box<_>` error[E0308]: mismatched types --> $DIR/coerce-suggestions.rs:48:9 |
