2014-07-09 14:46:09 +02:00
|
|
|
//@ ignore-lldb
|
|
|
|
|
2014-02-06 19:57:09 -08:00
|
|
|
//@ compile-flags:-g
|
2014-04-24 11:35:48 +02:00
|
|
|
// gdb-command:run
|
2014-01-02 15:38:57 +01:00
|
|
|
|
|
|
|
// Test whether compiling a recursive enum definition crashes debug info generation. The test case
|
2025-03-17 18:17:09 +08:00
|
|
|
// is taken from issue #11083 and #135093.
|
2014-01-02 15:38:57 +01:00
|
|
|
|
2014-10-27 15:37:07 -07:00
|
|
|
#![allow(unused_variables)]
|
2015-09-19 16:33:47 -04:00
|
|
|
#![feature(omit_gdb_pretty_printer_section)]
|
2014-12-03 14:48:18 -08:00
|
|
|
#![omit_gdb_pretty_printer_section]
|
2014-01-02 15:38:57 +01:00
|
|
|
|
|
|
|
pub struct Window<'a> {
|
|
|
|
callbacks: WindowCallbacks<'a>
|
|
|
|
}
|
|
|
|
|
|
|
|
struct WindowCallbacks<'a> {
|
2015-01-05 08:23:17 -05:00
|
|
|
pos_callback: Option<Box<FnMut(&Window, i32, i32) + 'a>>,
|
2014-01-02 15:38:57 +01:00
|
|
|
}
|
|
|
|
|
2025-03-17 18:17:09 +08:00
|
|
|
enum ExpandingRecursive<T> {
|
|
|
|
Recurse(Indirect<T>),
|
|
|
|
Item(T),
|
|
|
|
}
|
|
|
|
|
|
|
|
struct Indirect<U> {
|
|
|
|
rec: *const ExpandingRecursive<Option<U>>,
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2014-01-02 15:38:57 +01:00
|
|
|
fn main() {
|
|
|
|
let x = WindowCallbacks { pos_callback: None };
|
2025-03-17 18:17:09 +08:00
|
|
|
|
|
|
|
// EXPANDING RECURSIVE
|
|
|
|
let expanding_recursive: ExpandingRecursive<u64> = ExpandingRecursive::Recurse(Indirect {
|
|
|
|
rec: &ExpandingRecursive::Item(Option::Some(42)),
|
|
|
|
});
|
2014-01-02 15:38:57 +01:00
|
|
|
}
|