Skip to content

Commit

Permalink
debuginfo: Add test case for recursive enum types (issue #11083)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelwoerister committed Jan 2, 2014
1 parent 6d20876 commit 645bb32
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions src/test/debug-info/recursive-enum.rs
@@ -0,0 +1,33 @@
// Copyright 2013 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.

// xfail-android: FIXME(#10381)

// compile-flags:-Z extra-debug-info
// debugger:run

// Test whether compiling a recursive enum definition crashes debug info generation. The test case
// is taken from issue #11083.

#[allow(unused_variable)];

pub struct Window<'a> {
callbacks: WindowCallbacks<'a>
}

struct WindowCallbacks<'a> {
pos_callback: Option<WindowPosCallback<'a>>,
}

pub type WindowPosCallback<'a> = 'a |&Window, i32, i32|;

fn main() {
let x = WindowCallbacks { pos_callback: None };
}

5 comments on commit 645bb32

@bors
Copy link
Contributor

@bors bors commented on 645bb32 Jan 2, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from pcwalton
at michaelwoerister@645bb32

@bors
Copy link
Contributor

@bors bors commented on 645bb32 Jan 2, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging michaelwoerister/rust/issue11083 = 645bb32 into auto

@bors
Copy link
Contributor

@bors bors commented on 645bb32 Jan 2, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

michaelwoerister/rust/issue11083 = 645bb32 merged ok, testing candidate = 3249de8

@bors
Copy link
Contributor

@bors bors commented on 645bb32 Jan 2, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on 645bb32 Jan 2, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 3249de8

Please sign in to comment.