Skip to content

Commit 35b22b4

Browse files
committed
---
yaml --- r: 273360 b: refs/heads/beta c: 5abacd3 h: refs/heads/master
1 parent fb6d490 commit 35b22b4

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: 7f8d24590fa9b381eb38e2b007c88a446cf99479
26+
refs/heads/beta: 5abacd36f0149a9106d7ee04e97eadba4e523bb4
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/src/librustc_typeck/check/coercion.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,14 @@ impl<'f, 'tcx> Coerce<'f, 'tcx> {
278278
// want to use that target type region (`'b`) because --
279279
// for the program to type-check -- it must be the
280280
// smaller of the two.
281+
// - One fine point. It may be surprising that we can
282+
// use `'b` without relating `'a` and `'b`. The reason
283+
// that this is ok is that what we produce is
284+
// effectively a `&'b *x` expression (if you could
285+
// annotate the region of a borrow), and regionck has
286+
// code that adds edges from the region of a borrow
287+
// (`'b`, here) into the regions in the borrowed
288+
// expression (`*x`, here). (Search for "link".)
281289
// - if in lub mode, things can get fairly complicated. The
282290
// easiest thing is just to make a fresh
283291
// region variable [4], which effectively means we defer

0 commit comments

Comments
 (0)