// gdb-command:whatis has_associated_type_trait
// gdb-check:type = &(dyn type_names::Trait3<u32, AssocType=isize> + core::marker::Send)
-
// BARE FUNCTIONS
// gdb-command:whatis rust_fn
// gdb-check:type = (fn(core::option::Option<isize>, core::option::Option<&type_names::mod1::Struct2>), usize)
// CLOSURES
// gdb-command:whatis closure1
-// gdb-check:type = (type_names::main::{closure#0}, usize)
+// gdb-check:type = (type_names::main::{closure_env#0}, usize)
// gdb-command:whatis closure2
-// gdb-check:type = (type_names::main::{closure#1}, usize)
+// gdb-check:type = (type_names::main::{closure_env#1}, usize)
// FOREIGN TYPES
// gdb-command:whatis foreign1
// CLOSURES
// cdb-command:dv /t closure*
-// cdb-check:struct tuple$<type_names::main::closure$1,usize> closure2 = [...]
-// cdb-check:struct tuple$<type_names::main::closure$0,usize> closure1 = [...]
+// cdb-check:struct tuple$<type_names::main::closure_env$1,usize> closure2 = [...]
+// cdb-check:struct tuple$<type_names::main::closure_env$0,usize> closure1 = [...]
// FOREIGN TYPES
// cdb-command:dv /t foreign*
Variant2(isize),
}
-extern { type ForeignType1; }
+extern "C" {
+ type ForeignType1;
+}
mod mod1 {
pub use self::Enum2::{Variant1, Variant2};
}
}
- extern { pub type ForeignType2; }
+ extern "C" {
+ pub type ForeignType2;
+ }
}
trait Trait1 {
}
trait Trait3<T> {
type AssocType;
- fn dummy(&self) -> T { panic!() }
+ fn dummy(&self) -> T {
+ panic!()
+ }
}
impl Trait1 for isize {}
let closure2 = (|x: i8, y: f32| (x as f32) + y, 0_usize);
// Foreign Types
- let foreign1 = unsafe{ 0 as *const ForeignType1 };
- let foreign2 = unsafe{ 0 as *const mod1::ForeignType2 };
+ let foreign1 = unsafe { 0 as *const ForeignType1 };
+ let foreign2 = unsafe { 0 as *const mod1::ForeignType2 };
zzz(); // #break
}