]>
git.proxmox.com Git - rustc.git/blob - src/test/debuginfo/struct-namespace.rs
1 // Copyright 2013-2016 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
13 // min-lldb-version: 310
15 // Check that structs get placed in the correct namespace
18 // lldb-command:p struct1
19 // lldbg-check:(struct_namespace::Struct1) $0 = [...]
20 // lldbr-check:(struct_namespace::Struct1) struct1 = Struct1 { a: 0, b: 1 }
21 // lldb-command:p struct2
22 // lldbg-check:(struct_namespace::Struct2) $1 = [...]
23 // lldbr-check:(struct_namespace::Struct2) struct2 = { = 2 }
25 // lldb-command:p mod1_struct1
26 // lldbg-check:(struct_namespace::mod1::Struct1) $2 = [...]
27 // lldbr-check:(struct_namespace::mod1::Struct1) mod1_struct1 = Struct1 { a: 3, b: 4 }
28 // lldb-command:p mod1_struct2
29 // lldbg-check:(struct_namespace::mod1::Struct2) $3 = [...]
30 // lldbr-check:(struct_namespace::mod1::Struct2) mod1_struct2 = { = 5 }
32 #![allow(unused_variables)]
34 #![feature(omit_gdb_pretty_printer_section)]
35 #![omit_gdb_pretty_printer_section]
51 pub struct Struct2(pub u32);
56 let struct1
= Struct1
{
61 let struct2
= Struct2(2);
63 let mod1_struct1
= mod1
::Struct1
{
68 let mod1_struct2
= mod1
::Struct2(5);