From 6fa17b43d351ed4f9093cf80f4044d1208044241 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Thu, 25 Jun 2015 14:48:36 -0700 Subject: Rewrite the improper_ctypes lint. Makes the lint a bit more accurate, and improves the quality of the diagnostic messages by explicitly returning an error message. The new lint is also a little more aggressive: specifically, it now rejects tuples, and it recurses into function pointers. --- src/libstd/rt/unwind/gcc.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/libstd/rt') diff --git a/src/libstd/rt/unwind/gcc.rs b/src/libstd/rt/unwind/gcc.rs index 87941e79b2f..59fc8df6107 100644 --- a/src/libstd/rt/unwind/gcc.rs +++ b/src/libstd/rt/unwind/gcc.rs @@ -251,12 +251,11 @@ pub mod eabi { use rt::libunwind as uw; use libc::{c_void, c_int}; - #[repr(C)] - pub struct EXCEPTION_RECORD; - #[repr(C)] - pub struct CONTEXT; - #[repr(C)] - pub struct DISPATCHER_CONTEXT; + // Fake definitions; these are actually complicated structs, + // but we don't use the contents here. + pub type EXCEPTION_RECORD = c_void; + pub type CONTEXT = c_void; + pub type DISPATCHER_CONTEXT = c_void; #[repr(C)] #[derive(Copy, Clone)] -- cgit 1.4.1-3-g733a5