]> git.proxmox.com Git - rustc.git/blame - src/test/debuginfo/trait-pointers.rs
Update unsuspicious file list
[rustc.git] / src / test / debuginfo / trait-pointers.rs
CommitLineData
1a4d82fc
JJ
1// min-lldb-version: 310
2
3// compile-flags:-g
4// gdb-command:run
5// lldb-command:run
6
7#![allow(unused_variables)]
b039eaaf 8#![feature(omit_gdb_pretty_printer_section)]
1a4d82fc
JJ
9#![omit_gdb_pretty_printer_section]
10
11trait Trait {
c34b1796 12 fn method(&self) -> isize { 0 }
1a4d82fc
JJ
13}
14
15struct Struct {
c34b1796 16 a: isize,
1a4d82fc
JJ
17 b: f64
18}
19
20impl Trait for Struct {}
21
22// There is no real test here yet. Just make sure that it compiles without crashing.
23fn main() {
24 let stack_struct = Struct { a:0, b: 1.0 };
25 let reference: &Trait = &stack_struct as &Trait;
c295e0f8 26 let unique: Box<Trait> = Box::new(Struct { a:2, b: 3.0 }) as Box<Trait>;
1a4d82fc 27}