fix debuginfo tests

This commit is contained in:
Jorge Aparicio 2015-01-05 08:23:17 -05:00
parent 1bbeb37582
commit ef726591f8
8 changed files with 18 additions and 20 deletions

View File

@ -50,7 +50,7 @@
fn some_generic_fun<T1, T2>(a: T1, b: T2) -> (T2, T1) {
let closure = |x, y| {
let closure = |&: x, y| {
zzz(); // #break
(y, x)
};

View File

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

View File

@ -79,7 +79,7 @@ fn main() {
zzz(); // #break
sentinel();
let stack_closure: |int| = |x| {
let closure = |&: x: int| {
zzz(); // #break
sentinel();
@ -97,7 +97,7 @@ fn main() {
zzz(); // #break
sentinel();
stack_closure(1000);
closure(1000);
zzz(); // #break
sentinel();

View File

@ -24,5 +24,5 @@ struct C { θ: u8 }
fn main() {
let x = C { θ: 0 };
(|c: C| c.θ )(x);
(|&: c: C| c.θ )(x);
}

View File

@ -25,11 +25,9 @@ pub struct Window<'a> {
}
struct WindowCallbacks<'a> {
pos_callback: Option<WindowPosCallback<'a>>,
pos_callback: Option<Box<FnMut(&Window, i32, i32) + 'a>>,
}
pub type WindowPosCallback<'a> = |&Window, i32, i32|: 'a;
fn main() {
let x = WindowCallbacks { pos_callback: None };
}

View File

@ -167,11 +167,11 @@
// CLOSURES
// gdb-command:whatis stack_closure1
// gdb-check:type = struct (&mut|int|, uint)
// gdb-command:whatis closure1
// gdb-check:type = struct (closure, uint)
// gdb-command:whatis stack_closure2
// gdb-check:type = struct (&mut|i8, f32| -> f32, uint)
// gdb-command:whatis closure2
// gdb-check:type = struct (closure, uint)
#![omit_gdb_pretty_printer_section]
@ -321,8 +321,8 @@ fn main() {
// how that maps to rustc's internal representation of these forms.
// Once closures have reached their 1.0 form, the tests below should
// probably be expanded.
let stack_closure1 = (|x:int| {}, 0u);
let stack_closure2 = (|x:i8, y: f32| { (x as f32) + y }, 0u);
let closure1 = (|&: x:int| {}, 0u);
let closure2 = (|&: x:i8, y: f32| { (x as f32) + y }, 0u);
zzz(); // #break
}

View File

@ -100,10 +100,10 @@ fn main() {
let struct_ref = &a_struct;
let owned = box 6;
let closure = || {
let mut closure = |&mut:| {
let closure_local = 8;
let nested_closure = || {
let mut nested_closure = |&mut:| {
zzz(); // #break
variable = constant + a_struct.a + struct_ref.a + *owned + closure_local;
};

View File

@ -94,20 +94,20 @@ fn main() {
let owned = box 6;
{
let closure = || {
let mut first_closure = |&mut:| {
zzz(); // #break
variable = constant + a_struct.a + struct_ref.a + *owned;
};
closure();
first_closure();
}
{
let mut unboxed_closure = |&mut:| {
let mut second_closure = |&mut:| {
zzz(); // #break
variable = constant + a_struct.a + struct_ref.a + *owned;
};
unboxed_closure();
second_closure();
}
}