diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-10-02 14:53:18 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-10-02 14:53:18 -0700 |
| commit | 7ae802f57bf8a1ac2a47760a936c56e6fff16821 (patch) | |
| tree | a6063128be15d8bb988d61b4ce695eafd8fb1ec6 /src/test/debuginfo | |
| parent | ebe4da971aa4b2a9db597b682b96133f373dbec5 (diff) | |
| parent | 58bea31ca0e11bf49439d33e1d21f11de7161567 (diff) | |
| download | rust-7ae802f57bf8a1ac2a47760a936c56e6fff16821.tar.gz rust-7ae802f57bf8a1ac2a47760a936c56e6fff16821.zip | |
rollup merge of #17666 : eddyb/take-garbage-out
Conflicts: src/libcollections/lib.rs src/libcore/lib.rs src/librustdoc/lib.rs src/librustrt/lib.rs src/libserialize/lib.rs src/libstd/lib.rs src/test/run-pass/issue-8898.rs
Diffstat (limited to 'src/test/debuginfo')
| -rw-r--r-- | src/test/debuginfo/borrowed-managed-basic.rs | 166 | ||||
| -rw-r--r-- | src/test/debuginfo/borrowed-struct.rs | 25 | ||||
| -rw-r--r-- | src/test/debuginfo/borrowed-tuple.rs | 11 | ||||
| -rw-r--r-- | src/test/debuginfo/box.rs | 12 | ||||
| -rw-r--r-- | src/test/debuginfo/boxed-struct.rs | 17 | ||||
| -rw-r--r-- | src/test/debuginfo/by-value-self-argument-in-trait-impl.rs | 19 | ||||
| -rw-r--r-- | src/test/debuginfo/managed-enum.rs | 85 | ||||
| -rw-r--r-- | src/test/debuginfo/managed-pointer-within-unique-vec.rs | 63 | ||||
| -rw-r--r-- | src/test/debuginfo/managed-pointer-within-unique.rs | 62 | ||||
| -rw-r--r-- | src/test/debuginfo/recursive-struct.rs | 98 | ||||
| -rw-r--r-- | src/test/debuginfo/var-captured-in-nested-closure.rs | 13 | ||||
| -rw-r--r-- | src/test/debuginfo/var-captured-in-stack-closure.rs | 9 |
12 files changed, 2 insertions, 578 deletions
diff --git a/src/test/debuginfo/borrowed-managed-basic.rs b/src/test/debuginfo/borrowed-managed-basic.rs deleted file mode 100644 index a2b8c54c380..00000000000 --- a/src/test/debuginfo/borrowed-managed-basic.rs +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// ignore-android: FIXME(#10381) - - -// Gdb doesn't know about UTF-32 character encoding and will print a rust char as only -// its numerical value. - -// compile-flags:-g - -// === GDB TESTS =================================================================================== - -// gdb-command:rbreak zzz -// gdb-command:run -// gdb-command:finish -// gdb-command:print *bool_ref -// gdb-check:$1 = true - -// gdb-command:print *int_ref -// gdb-check:$2 = -1 - -// gdb-command:print *char_ref -// gdb-check:$3 = 97 - -// gdb-command:print/d *i8_ref -// gdb-check:$4 = 68 - -// gdb-command:print *i16_ref -// gdb-check:$5 = -16 - -// gdb-command:print *i32_ref -// gdb-check:$6 = -32 - -// gdb-command:print *i64_ref -// gdb-check:$7 = -64 - -// gdb-command:print *uint_ref -// gdb-check:$8 = 1 - -// gdb-command:print/d *u8_ref -// gdb-check:$9 = 100 - -// gdb-command:print *u16_ref -// gdb-check:$10 = 16 - -// gdb-command:print *u32_ref -// gdb-check:$11 = 32 - -// gdb-command:print *u64_ref -// gdb-check:$12 = 64 - -// gdb-command:print *f32_ref -// gdb-check:$13 = 2.5 - -// gdb-command:print *f64_ref -// gdb-check:$14 = 3.5 - - -// === LLDB TESTS ================================================================================== - -// lldb-command:type format add -f decimal char -// lldb-command:type format add -f decimal 'unsigned char' -// lldb-command:run - -// lldb-command:print *bool_ref -// lldb-check:[...]$0 = true - -// lldb-command:print *int_ref -// lldb-check:[...]$1 = -1 - -// LLDB can't handle 32bit chars yet -// d ebugger:print *char_ref -// c heck:[...]$x = 97 - -// lldb-command:print *i8_ref -// lldb-check:[...]$2 = 68 - -// lldb-command:print *i16_ref -// lldb-check:[...]$3 = -16 - -// lldb-command:print *i32_ref -// lldb-check:[...]$4 = -32 - -// lldb-command:print *i64_ref -// lldb-check:[...]$5 = -64 - -// lldb-command:print *uint_ref -// lldb-check:[...]$6 = 1 - -// lldb-command:print *u8_ref -// lldb-check:[...]$7 = 100 - -// lldb-command:print *u16_ref -// lldb-check:[...]$8 = 16 - -// lldb-command:print *u32_ref -// lldb-check:[...]$9 = 32 - -// lldb-command:print *u64_ref -// lldb-check:[...]$10 = 64 - -// lldb-command:print *f32_ref -// lldb-check:[...]$11 = 2.5 - -// lldb-command:print *f64_ref -// lldb-check:[...]$12 = 3.5 - -#![allow(unused_variable)] - -use std::gc::{Gc, GC}; - -fn main() { - let bool_box: Gc<bool> = box(GC) true; - let bool_ref: &bool = &*bool_box; - - let int_box: Gc<int> = box(GC) -1; - let int_ref: &int = &*int_box; - - let char_box: Gc<char> = box(GC) 'a'; - let char_ref: &char = &*char_box; - - let i8_box: Gc<i8> = box(GC) 68; - let i8_ref: &i8 = &*i8_box; - - let i16_box: Gc<i16> = box(GC) -16; - let i16_ref: &i16 = &*i16_box; - - let i32_box: Gc<i32> = box(GC) -32; - let i32_ref: &i32 = &*i32_box; - - let i64_box: Gc<i64> = box(GC) -64; - let i64_ref: &i64 = &*i64_box; - - let uint_box: Gc<uint> = box(GC) 1; - let uint_ref: &uint = &*uint_box; - - let u8_box: Gc<u8> = box(GC) 100; - let u8_ref: &u8 = &*u8_box; - - let u16_box: Gc<u16> = box(GC) 16; - let u16_ref: &u16 = &*u16_box; - - let u32_box: Gc<u32> = box(GC) 32; - let u32_ref: &u32 = &*u32_box; - - let u64_box: Gc<u64> = box(GC) 64; - let u64_ref: &u64 = &*u64_box; - - let f32_box: Gc<f32> = box(GC) 2.5; - let f32_ref: &f32 = &*f32_box; - - let f64_box: Gc<f64> = box(GC) 3.5; - let f64_ref: &f64 = &*f64_box; - - zzz(); // #break -} - -fn zzz() {()} diff --git a/src/test/debuginfo/borrowed-struct.rs b/src/test/debuginfo/borrowed-struct.rs index 02131734fb1..8b9c790bbbf 100644 --- a/src/test/debuginfo/borrowed-struct.rs +++ b/src/test/debuginfo/borrowed-struct.rs @@ -29,15 +29,6 @@ // gdb-command:print *ref_to_unnamed // gdb-check:$4 = {x = 11, y = 24.5} -// gdb-command:print *managed_val_ref -// gdb-check:$5 = {x = 12, y = 25.5} - -// gdb-command:print *managed_val_interior_ref_1 -// gdb-check:$6 = 12 - -// gdb-command:print *managed_val_interior_ref_2 -// gdb-check:$7 = 25.5 - // gdb-command:print *unique_val_ref // gdb-check:$8 = {x = 13, y = 26.5} @@ -64,15 +55,6 @@ // lldb-command:print *ref_to_unnamed // lldb-check:[...]$3 = SomeStruct { x: 11, y: 24.5 } -// lldb-command:print *managed_val_ref -// lldb-check:[...]$4 = SomeStruct { x: 12, y: 25.5 } - -// lldb-command:print *managed_val_interior_ref_1 -// lldb-check:[...]$5 = 12 - -// lldb-command:print *managed_val_interior_ref_2 -// lldb-check:[...]$6 = 25.5 - // lldb-command:print *unique_val_ref // lldb-check:[...]$7 = SomeStruct { x: 13, y: 26.5 } @@ -84,8 +66,6 @@ #![allow(unused_variable)] -use std::gc::GC; - struct SomeStruct { x: int, y: f64 @@ -98,11 +78,6 @@ fn main() { let stack_val_interior_ref_2: &f64 = &stack_val.y; let ref_to_unnamed: &SomeStruct = &SomeStruct { x: 11, y: 24.5 }; - let managed_val = box(GC) SomeStruct { x: 12, y: 25.5 }; - let managed_val_ref: &SomeStruct = &*managed_val; - let managed_val_interior_ref_1: &int = &managed_val.x; - let managed_val_interior_ref_2: &f64 = &managed_val.y; - let unique_val = box SomeStruct { x: 13, y: 26.5 }; let unique_val_ref: &SomeStruct = &*unique_val; let unique_val_interior_ref_1: &int = &unique_val.x; diff --git a/src/test/debuginfo/borrowed-tuple.rs b/src/test/debuginfo/borrowed-tuple.rs index 55530636571..2c78d14a86c 100644 --- a/src/test/debuginfo/borrowed-tuple.rs +++ b/src/test/debuginfo/borrowed-tuple.rs @@ -25,9 +25,6 @@ // gdb-command:print *ref_to_unnamed // gdb-check:$2 = {-15, -20} -// gdb-command:print *managed_val_ref -// gdb-check:$3 = {-16, -21} - // gdb-command:print *unique_val_ref // gdb-check:$4 = {-17, -22} @@ -42,25 +39,17 @@ // lldb-command:print *ref_to_unnamed // lldb-check:[...]$1 = (-15, -20) -// lldb-command:print *managed_val_ref -// lldb-check:[...]$2 = (-16, -21) - // lldb-command:print *unique_val_ref // lldb-check:[...]$3 = (-17, -22) #![allow(unused_variable)] -use std::gc::{Gc, GC}; - fn main() { let stack_val: (i16, f32) = (-14, -19f32); let stack_val_ref: &(i16, f32) = &stack_val; let ref_to_unnamed: &(i16, f32) = &(-15, -20f32); - let managed_val: Gc<(i16, f32)> = box(GC) (-16, -21f32); - let managed_val_ref: &(i16, f32) = &*managed_val; - let unique_val: Box<(i16, f32)> = box() (-17, -22f32); let unique_val_ref: &(i16, f32) = &*unique_val; diff --git a/src/test/debuginfo/box.rs b/src/test/debuginfo/box.rs index 1a07f614c14..c459b9be3d0 100644 --- a/src/test/debuginfo/box.rs +++ b/src/test/debuginfo/box.rs @@ -22,10 +22,6 @@ // gdb-check:$1 = 1 // gdb-command:print *b // gdb-check:$2 = {2, 3.5} -// gdb-command:print c->val -// gdb-check:$3 = 4 -// gdb-command:print d->val -// gdb-check:$4 = false // === LLDB TESTS ================================================================================== @@ -35,20 +31,12 @@ // lldb-check:[...]$0 = 1 // lldb-command:print *b // lldb-check:[...]$1 = (2, 3.5) -// lldb-command:print c->val -// lldb-check:[...]$2 = 4 -// lldb-command:print d->val -// lldb-check:[...]$3 = false #![allow(unused_variable)] -use std::gc::GC; - fn main() { let a = box 1i; let b = box() (2i, 3.5f64); - let c = box(GC) 4i; - let d = box(GC) false; zzz(); // #break } diff --git a/src/test/debuginfo/boxed-struct.rs b/src/test/debuginfo/boxed-struct.rs index d3a556e4009..a22b9fdea5c 100644 --- a/src/test/debuginfo/boxed-struct.rs +++ b/src/test/debuginfo/boxed-struct.rs @@ -21,15 +21,9 @@ // gdb-command:print *unique // gdb-check:$1 = {x = 99, y = 999, z = 9999, w = 99999} -// gdb-command:print managed->val -// gdb-check:$2 = {x = 88, y = 888, z = 8888, w = 88888} - // gdb-command:print *unique_dtor // gdb-check:$3 = {x = 77, y = 777, z = 7777, w = 77777} -// gdb-command:print managed_dtor->val -// gdb-check:$4 = {x = 33, y = 333, z = 3333, w = 33333} - // === LLDB TESTS ================================================================================== @@ -38,19 +32,11 @@ // lldb-command:print *unique // lldb-check:[...]$0 = StructWithSomePadding { x: 99, y: 999, z: 9999, w: 99999 } -// lldb-command:print managed->val -// lldb-check:[...]$1 = StructWithSomePadding { x: 88, y: 888, z: 8888, w: 88888 } - // lldb-command:print *unique_dtor // lldb-check:[...]$2 = StructWithDestructor { x: 77, y: 777, z: 7777, w: 77777 } -// lldb-command:print managed_dtor->val -// lldb-check:[...]$3 = StructWithDestructor { x: 33, y: 333, z: 3333, w: 33333 } - #![allow(unused_variable)] -use std::gc::GC; - struct StructWithSomePadding { x: i16, y: i32, @@ -72,11 +58,8 @@ impl Drop for StructWithDestructor { fn main() { let unique = box StructWithSomePadding { x: 99, y: 999, z: 9999, w: 99999 }; - let managed = box(GC) StructWithSomePadding { x: 88, y: 888, z: 8888, w: 88888 }; let unique_dtor = box StructWithDestructor { x: 77, y: 777, z: 7777, w: 77777 }; - let managed_dtor = box(GC) StructWithDestructor { x: 33, y: 333, z: 3333, w: 33333 }; - zzz(); // #break } diff --git a/src/test/debuginfo/by-value-self-argument-in-trait-impl.rs b/src/test/debuginfo/by-value-self-argument-in-trait-impl.rs index af1b38adf80..11df00ee4fe 100644 --- a/src/test/debuginfo/by-value-self-argument-in-trait-impl.rs +++ b/src/test/debuginfo/by-value-self-argument-in-trait-impl.rs @@ -33,11 +33,6 @@ // gdb-check:$3 = {4444.5, 5555, 6666, 7777.5} // gdb-command:continue -// gdb-command:finish -// gdb-command:print self->val -// gdb-check:$4 = 8888 -// gdb-command:continue - // === LLDB TESTS ================================================================================== @@ -55,12 +50,6 @@ // lldb-check:[...]$2 = (4444.5, 5555, 6666, 7777.5) // lldb-command:continue -// lldb-command:print self->val -// lldb-check:[...]$3 = 8888 -// lldb-command:continue - -use std::gc::{Gc, GC}; - trait Trait { fn method(self) -> Self; } @@ -91,18 +80,10 @@ impl Trait for (f64, int, int, f64) { } } -impl Trait for Gc<int> { - fn method(self) -> Gc<int> { - zzz(); // #break - self - } -} - fn main() { let _ = (1111 as int).method(); let _ = Struct { x: 2222, y: 3333 }.method(); let _ = (4444.5, 5555, 6666, 7777.5).method(); - let _ = (box(GC) 8888).method(); } fn zzz() { () } diff --git a/src/test/debuginfo/managed-enum.rs b/src/test/debuginfo/managed-enum.rs deleted file mode 100644 index e5da4d2cdb1..00000000000 --- a/src/test/debuginfo/managed-enum.rs +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// ignore-android: FIXME(#10381) - -// compile-flags:-g - -// === GDB TESTS =================================================================================== - -// gdb-command:rbreak zzz -// gdb-command:run -// gdb-command:finish - -// gdb-command:print the_a->val -// gdb-check:$1 = {{TheA, x = 0, y = 8970181431921507452}, {TheA, 0, 2088533116, 2088533116}} - -// gdb-command:print the_b->val -// gdb-check:$2 = {{TheB, x = 0, y = 1229782938247303441}, {TheB, 0, 286331153, 286331153}} - -// gdb-command:print univariant->val -// gdb-check:$3 = {{-9747455}} - - -// === LLDB TESTS ================================================================================== - -// lldb-command:run - -// lldb-command:print the_a->val -// lldb-check:[...]$0 = TheA { x: 0, y: 8970181431921507452 } - -// lldb-command:print the_b->val -// lldb-check:[...]$1 = TheB(0, 286331153, 286331153) - -// lldb-command:print univariant->val -// lldb-check:[...]$2 = TheOnlyCase(-9747455) - -#![allow(unused_variable)] -#![feature(struct_variant)] - -use std::gc::GC; - -// The first element is to ensure proper alignment, irrespective of the machines word size. Since -// the size of the discriminant value is machine dependent, this has be taken into account when -// datatype layout should be predictable as in this case. -enum ABC { - TheA { x: i64, y: i64 }, - TheB (i64, i32, i32), -} - -// This is a special case since it does not have the implicit discriminant field. -enum Univariant { - TheOnlyCase(i64) -} - -fn main() { - - // In order to avoid endianess trouble all of the following test values consist of a single - // repeated byte. This way each interpretation of the union should look the same, no matter if - // this is a big or little endian machine. - - // 0b0111110001111100011111000111110001111100011111000111110001111100 = 8970181431921507452 - // 0b01111100011111000111110001111100 = 2088533116 - // 0b0111110001111100 = 31868 - // 0b01111100 = 124 - let the_a = box(GC) TheA { x: 0, y: 8970181431921507452 }; - - // 0b0001000100010001000100010001000100010001000100010001000100010001 = 1229782938247303441 - // 0b00010001000100010001000100010001 = 286331153 - // 0b0001000100010001 = 4369 - // 0b00010001 = 17 - let the_b = box(GC) TheB (0, 286331153, 286331153); - - let univariant = box(GC) TheOnlyCase(-9747455); - - zzz(); // #break -} - -fn zzz() {()} diff --git a/src/test/debuginfo/managed-pointer-within-unique-vec.rs b/src/test/debuginfo/managed-pointer-within-unique-vec.rs deleted file mode 100644 index 69f3938ecee..00000000000 --- a/src/test/debuginfo/managed-pointer-within-unique-vec.rs +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// ignore-android: FIXME(#10381) - - -// compile-flags:-g - -// === GDB TESTS =================================================================================== - -// gdb-command:rbreak zzz -// gdb-command:run -// gdb-command:finish - -// gdb-command:print unique.ptr[0]->val -// gdb-check:$1 = 10 - -// gdb-command:print unique.ptr[1]->val -// gdb-check:$2 = 11 - -// gdb-command:print unique.ptr[2]->val -// gdb-check:$3 = 12 - -// gdb-command:print unique.ptr[3]->val -// gdb-check:$4 = 13 - - -// === LLDB TESTS ================================================================================== - -// lldb-command:run - -// lldb-command:print unique.ptr[0]->val -// lldb-check:[...]$0 = 10 - -// lldb-command:print unique.ptr[1]->val -// lldb-check:[...]$1 = 11 - -// lldb-command:print unique.ptr[2]->val -// lldb-check:[...]$2 = 12 - -// lldb-command:print unique.ptr[3]->val -// lldb-check:[...]$3 = 13 - - -#![allow(unused_variable)] - -use std::gc::{Gc, GC}; - -fn main() { - - let unique: Vec<Gc<i64>> = vec!(box(GC) 10, box(GC) 11, box(GC) 12, box(GC) 13); - - zzz(); // #break -} - -fn zzz() {()} diff --git a/src/test/debuginfo/managed-pointer-within-unique.rs b/src/test/debuginfo/managed-pointer-within-unique.rs deleted file mode 100644 index 2690efb8f85..00000000000 --- a/src/test/debuginfo/managed-pointer-within-unique.rs +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// ignore-android: FIXME(#10381) - - -// compile-flags:-g - -// === GDB TESTS =================================================================================== - -// gdb-command:set print pretty off -// gdb-command:rbreak zzz -// gdb-command:run -// gdb-command:finish - -// gdb-command:print *ordinary_unique -// gdb-check:$1 = {-1, -2} - -// gdb-command:print managed_within_unique->x -// gdb-check:$2 = -3 - -// gdb-command:print managed_within_unique->y->val -// gdb-check:$3 = -4 - -// === LLDB TESTS ================================================================================== - -// lldb-command:run - -// lldb-command:print *ordinary_unique -// lldb-check:[...]$0 = (-1, -2) - -// lldb-command:print managed_within_unique->x -// lldb-check:[...]$1 = -3 - -// lldb-command:print managed_within_unique->y->val -// lldb-check:[...]$2 = -4 - -#![allow(unused_variable)] - -use std::gc::{GC, Gc}; - -struct ContainsManaged { - x: int, - y: Gc<int>, -} - -fn main() { - let ordinary_unique = box() (-1i, -2i); - - let managed_within_unique = box ContainsManaged { x: -3, y: box(GC) -4i }; - - zzz(); // #break -} - -fn zzz() {()} diff --git a/src/test/debuginfo/recursive-struct.rs b/src/test/debuginfo/recursive-struct.rs index 76722b743d7..412bdfaaf15 100644 --- a/src/test/debuginfo/recursive-struct.rs +++ b/src/test/debuginfo/recursive-struct.rs @@ -29,11 +29,6 @@ // gdb-command:print unique_unique->next.RUST$ENCODED$ENUM$0$Empty.val->value // gdb-check:$4 = 3 -// gdb-command:print box_unique->val.value -// gdb-check:$5 = 4 -// gdb-command:print box_unique->val.next.RUST$ENCODED$ENUM$0$Empty.val->value -// gdb-check:$6 = 5 - // gdb-command:print vec_unique[0].value // gdb-check:$7 = 6.5 // gdb-command:print vec_unique[0].next.RUST$ENCODED$ENUM$0$Empty.val->value @@ -44,32 +39,6 @@ // gdb-command:print borrowed_unique->next.RUST$ENCODED$ENUM$0$Empty.val->value // gdb-check:$10 = 9.5 -// MANAGED -// gdb-command:print stack_managed.value -// gdb-check:$11 = 10 -// gdb-command:print stack_managed.next.RUST$ENCODED$ENUM$0$Empty.val->val.value -// gdb-check:$12 = 11 - -// gdb-command:print unique_managed->value -// gdb-check:$13 = 12 -// gdb-command:print unique_managed->next.RUST$ENCODED$ENUM$0$Empty.val->val.value -// gdb-check:$14 = 13 - -// gdb-command:print box_managed.val->value -// gdb-check:$15 = 14 -// gdb-command:print box_managed->val->next.RUST$ENCODED$ENUM$0$Empty.val->val.value -// gdb-check:$16 = 15 - -// gdb-command:print vec_managed[0].value -// gdb-check:$17 = 16.5 -// gdb-command:print vec_managed[0].next.RUST$ENCODED$ENUM$0$Empty.val->val.value -// gdb-check:$18 = 17.5 - -// gdb-command:print borrowed_managed->value -// gdb-check:$19 = 18.5 -// gdb-command:print borrowed_managed->next.RUST$ENCODED$ENUM$0$Empty.val->val.value -// gdb-check:$20 = 19.5 - // LONG CYCLE // gdb-command:print long_cycle1.value // gdb-check:$21 = 20 @@ -106,8 +75,6 @@ #![allow(unused_variable)] #![feature(struct_variant)] -use std::gc::{Gc, GC}; - enum Opt<T> { Empty, Val { val: T } @@ -118,11 +85,6 @@ struct UniqueNode<T> { value: T } -struct ManagedNode<T> { - next: Opt<Gc<ManagedNode<T>>>, - value: T -} - struct LongCycle1<T> { next: Box<LongCycle2<T>>, value: T, @@ -184,16 +146,6 @@ fn main() { value: 2, }; - let box_unique: Gc<UniqueNode<u64>> = box(GC) UniqueNode { - next: Val { - val: box UniqueNode { - next: Empty, - value: 5, - } - }, - value: 4, - }; - let vec_unique: [UniqueNode<f32>, ..1] = [UniqueNode { next: Val { val: box UniqueNode { @@ -214,56 +166,6 @@ fn main() { value: 8.5, }; - let stack_managed: ManagedNode<u16> = ManagedNode { - next: Val { - val: box(GC) ManagedNode { - next: Empty, - value: 11, - } - }, - value: 10, - }; - - let unique_managed: Box<ManagedNode<u32>> = box ManagedNode { - next: Val { - val: box(GC) ManagedNode { - next: Empty, - value: 13, - } - }, - value: 12, - }; - - let box_managed: Gc<ManagedNode<u64>> = box(GC) ManagedNode { - next: Val { - val: box(GC) ManagedNode { - next: Empty, - value: 15, - } - }, - value: 14, - }; - - let vec_managed: [ManagedNode<f32>, ..1] = [ManagedNode { - next: Val { - val: box(GC) ManagedNode { - next: Empty, - value: 17.5, - } - }, - value: 16.5, - }]; - - let borrowed_managed: &ManagedNode<f64> = &ManagedNode { - next: Val { - val: box(GC) ManagedNode { - next: Empty, - value: 19.5, - } - }, - value: 18.5, - }; - // LONG CYCLE let long_cycle1: LongCycle1<u16> = LongCycle1 { next: box LongCycle2 { diff --git a/src/test/debuginfo/var-captured-in-nested-closure.rs b/src/test/debuginfo/var-captured-in-nested-closure.rs index a08cc6bdb6e..89415df3588 100644 --- a/src/test/debuginfo/var-captured-in-nested-closure.rs +++ b/src/test/debuginfo/var-captured-in-nested-closure.rs @@ -28,8 +28,6 @@ // gdb-check:$4 = {a = -3, b = 4.5, c = 5} // gdb-command:print *owned // gdb-check:$5 = 6 -// gdb-command:print managed->val -// gdb-check:$6 = 7 // gdb-command:print closure_local // gdb-check:$7 = 8 // gdb-command:continue @@ -45,8 +43,6 @@ // gdb-check:$11 = {a = -3, b = 4.5, c = 5} // gdb-command:print *owned // gdb-check:$12 = 6 -// gdb-command:print managed->val -// gdb-check:$13 = 7 // gdb-command:print closure_local // gdb-check:$14 = 8 // gdb-command:continue @@ -66,8 +62,6 @@ // lldb-check:[...]$3 = Struct { a: -3, b: 4.5, c: 5 } // lldb-command:print *owned // lldb-check:[...]$4 = 6 -// lldb-command:print managed->val -// lldb-check:[...]$5 = 7 // lldb-command:print closure_local // lldb-check:[...]$6 = 8 // lldb-command:continue @@ -82,16 +76,12 @@ // lldb-check:[...]$10 = Struct { a: -3, b: 4.5, c: 5 } // lldb-command:print *owned // lldb-check:[...]$11 = 6 -// lldb-command:print managed->val -// lldb-check:[...]$12 = 7 // lldb-command:print closure_local // lldb-check:[...]$13 = 8 // lldb-command:continue #![allow(unused_variable)] -use std::gc::GC; - struct Struct { a: int, b: f64, @@ -110,14 +100,13 @@ fn main() { let struct_ref = &a_struct; let owned = box 6; - let managed = box(GC) 7; let closure = || { let closure_local = 8; let nested_closure = || { zzz(); // #break - variable = constant + a_struct.a + struct_ref.a + *owned + *managed + closure_local; + variable = constant + a_struct.a + struct_ref.a + *owned + closure_local; }; zzz(); // #break diff --git a/src/test/debuginfo/var-captured-in-stack-closure.rs b/src/test/debuginfo/var-captured-in-stack-closure.rs index c37f0ddbe99..8ea407fc544 100644 --- a/src/test/debuginfo/var-captured-in-stack-closure.rs +++ b/src/test/debuginfo/var-captured-in-stack-closure.rs @@ -28,8 +28,6 @@ // gdb-check:$4 = {a = -3, b = 4.5, c = 5} // gdb-command:print *owned // gdb-check:$5 = 6 -// gdb-command:print managed->val -// gdb-check:$6 = 7 // === LLDB TESTS ================================================================================== @@ -46,13 +44,9 @@ // lldb-check:[...]$3 = Struct { a: -3, b: 4.5, c: 5 } // lldb-command:print *owned // lldb-check:[...]$4 = 6 -// lldb-command:print managed->val -// lldb-check:[...]$5 = 7 #![allow(unused_variable)] -use std::gc::GC; - struct Struct { a: int, b: f64, @@ -71,11 +65,10 @@ fn main() { let struct_ref = &a_struct; let owned = box 6; - let managed = box(GC) 7; let closure = || { zzz(); // #break - variable = constant + a_struct.a + struct_ref.a + *owned + *managed; + variable = constant + a_struct.a + struct_ref.a + *owned; }; closure(); |
