// 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 or the MIT license // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. // compile-flags:-Z extra-debug-info // debugger:rbreak zzz // debugger:run // debugger:finish // debugger:print first // check:$1 = {} // debugger:print second // check:$2 = {} #[allow(unused_variable)]; enum ANilEnum {} enum AnotherNilEnum {} // I (mw) am not sure this test case makes much sense... // Also, it relies on some implementation details: // 1. That empty enums as well as '()' are represented as empty structs // 2. That gdb prints the string "{}" for empty structs (which may change some time) fn main() { unsafe { let first: ANilEnum = std::cast::transmute(()); let second: AnotherNilEnum = std::cast::transmute(()); zzz(); } } fn zzz() {()}