Skip to content

Commit f1580fc

Browse files
author
Jorge Aparicio
committed
---
yaml --- r: 170747 b: refs/heads/try c: ef72659 h: refs/heads/master i: 170745: 4b91e17 170743: 14eab1a v: v3
1 parent 044a961 commit f1580fc

9 files changed

+19
-21
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 73a25f55ad748b4d3516417c711b99ce446591af
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 5b3cd3900ceda838f5798c30ab96ceb41f962534
5-
refs/heads/try: 1bbeb375821fe197342f1e22ab53b796bb0f0c70
5+
refs/heads/try: ef726591f81238f19bfd4cc3b48d812d20dbfcc2
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/src/test/debuginfo/closure-in-generic-function.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050

5151
fn some_generic_fun<T1, T2>(a: T1, b: T2) -> (T2, T1) {
5252

53-
let closure = |x, y| {
53+
let closure = |&: x, y| {
5454
zzz(); // #break
5555
(y, x)
5656
};

branches/try/src/test/debuginfo/lexical-scope-in-parameterless-closure.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
// Nothing to do here really, just make sure it compiles. See issue #8513.
2020
fn main() {
21-
let _ = ||();
21+
let _ = |&:|();
2222
let _ = range(1u,3).map(|_| 5i);
2323
}
2424

branches/try/src/test/debuginfo/lexical-scope-in-stack-closure.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ fn main() {
7979
zzz(); // #break
8080
sentinel();
8181

82-
let stack_closure: |int| = |x| {
82+
let closure = |&: x: int| {
8383
zzz(); // #break
8484
sentinel();
8585

@@ -97,7 +97,7 @@ fn main() {
9797
zzz(); // #break
9898
sentinel();
9999

100-
stack_closure(1000);
100+
closure(1000);
101101

102102
zzz(); // #break
103103
sentinel();

branches/try/src/test/debuginfo/multi-byte-chars.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ struct C { θ: u8 }
2424

2525
fn main() {
2626
let x = C { θ: 0 };
27-
(|c: C| c.θ )(x);
27+
(|&: c: C| c.θ )(x);
2828
}

branches/try/src/test/debuginfo/recursive-enum.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,9 @@ pub struct Window<'a> {
2525
}
2626

2727
struct WindowCallbacks<'a> {
28-
pos_callback: Option<WindowPosCallback<'a>>,
28+
pos_callback: Option<Box<FnMut(&Window, i32, i32) + 'a>>,
2929
}
3030

31-
pub type WindowPosCallback<'a> = |&Window, i32, i32|: 'a;
32-
3331
fn main() {
3432
let x = WindowCallbacks { pos_callback: None };
3533
}

branches/try/src/test/debuginfo/type-names.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,11 @@
167167

168168

169169
// CLOSURES
170-
// gdb-command:whatis stack_closure1
171-
// gdb-check:type = struct (&mut|int|, uint)
170+
// gdb-command:whatis closure1
171+
// gdb-check:type = struct (closure, uint)
172172

173-
// gdb-command:whatis stack_closure2
174-
// gdb-check:type = struct (&mut|i8, f32| -> f32, uint)
173+
// gdb-command:whatis closure2
174+
// gdb-check:type = struct (closure, uint)
175175

176176
#![omit_gdb_pretty_printer_section]
177177

@@ -321,8 +321,8 @@ fn main() {
321321
// how that maps to rustc's internal representation of these forms.
322322
// Once closures have reached their 1.0 form, the tests below should
323323
// probably be expanded.
324-
let stack_closure1 = (|x:int| {}, 0u);
325-
let stack_closure2 = (|x:i8, y: f32| { (x as f32) + y }, 0u);
324+
let closure1 = (|&: x:int| {}, 0u);
325+
let closure2 = (|&: x:i8, y: f32| { (x as f32) + y }, 0u);
326326

327327
zzz(); // #break
328328
}

branches/try/src/test/debuginfo/var-captured-in-nested-closure.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,10 @@ fn main() {
100100
let struct_ref = &a_struct;
101101
let owned = box 6;
102102

103-
let closure = || {
103+
let mut closure = |&mut:| {
104104
let closure_local = 8;
105105

106-
let nested_closure = || {
106+
let mut nested_closure = |&mut:| {
107107
zzz(); // #break
108108
variable = constant + a_struct.a + struct_ref.a + *owned + closure_local;
109109
};

branches/try/src/test/debuginfo/var-captured-in-stack-closure.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,20 +94,20 @@ fn main() {
9494
let owned = box 6;
9595

9696
{
97-
let closure = || {
97+
let mut first_closure = |&mut:| {
9898
zzz(); // #break
9999
variable = constant + a_struct.a + struct_ref.a + *owned;
100100
};
101101

102-
closure();
102+
first_closure();
103103
}
104104

105105
{
106-
let mut unboxed_closure = |&mut:| {
106+
let mut second_closure = |&mut:| {
107107
zzz(); // #break
108108
variable = constant + a_struct.a + struct_ref.a + *owned;
109109
};
110-
unboxed_closure();
110+
second_closure();
111111
}
112112
}
113113

0 commit comments

Comments
 (0)