File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
branches/snap-stage3/src/librustc/middle/borrowck/gather_loans Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
- refs/heads/snap-stage3: 643be38cfe269effdc02111677559f74385b1056
4
+ refs/heads/snap-stage3: 3ba8404c88972f2324ce97fa7e5a433399d946ed
5
5
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
Original file line number Diff line number Diff line change @@ -115,11 +115,14 @@ fn check_is_legal_to_move_from(bccx: @BorrowckCtxt,
115
115
// These are separate from the above cases for a better error message.
116
116
mc::cat_stack_upvar(*) |
117
117
mc::cat_copied_upvar(mc::CopiedUpvar { onceness: ast::Many, _ }) => {
118
+ let once_hint = if bccx.tcx.sess.once_fns() {
119
+ " (unless the destination closure type is `once fn')"
120
+ } else {
121
+ ""
122
+ };
118
123
bccx.span_err(
119
124
cmt0.span,
120
- fmt!("cannot move out of %s \
121
- (unless the destination closure type is `once fn')",
122
- bccx.cmt_to_str(cmt)));
125
+ fmt!("cannot move out of %s%s", bccx.cmt_to_str(cmt), once_hint));
123
126
false
124
127
}
125
128
You can’t perform that action at this time.
0 commit comments