diff options
| author | Eli Friedman <eli.friedman@gmail.com> | 2015-06-25 14:48:36 -0700 |
|---|---|---|
| committer | Eli Friedman <eli.friedman@gmail.com> | 2015-07-23 17:03:04 -0700 |
| commit | 6fa17b43d351ed4f9093cf80f4044d1208044241 (patch) | |
| tree | 7b83ba2d846643e167815d8990a458764adebc48 /src/libstd/thread | |
| parent | d4d4206e5604b86fc4a9b28a8b51d99121cc3a5d (diff) | |
| download | rust-6fa17b43d351ed4f9093cf80f4044d1208044241.tar.gz rust-6fa17b43d351ed4f9093cf80f4044d1208044241.zip | |
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.
Diffstat (limited to 'src/libstd/thread')
| -rw-r--r-- | src/libstd/thread/local.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/thread/local.rs b/src/libstd/thread/local.rs index e2873601a7b..11b375dcce2 100644 --- a/src/libstd/thread/local.rs +++ b/src/libstd/thread/local.rs @@ -335,13 +335,13 @@ mod imp { #[linkage = "extern_weak"] static __dso_handle: *mut u8; #[linkage = "extern_weak"] - static __cxa_thread_atexit_impl: *const (); + static __cxa_thread_atexit_impl: *const libc::c_void; } if !__cxa_thread_atexit_impl.is_null() { type F = unsafe extern fn(dtor: unsafe extern fn(*mut u8), arg: *mut u8, dso_handle: *mut u8) -> libc::c_int; - mem::transmute::<*const (), F>(__cxa_thread_atexit_impl) + mem::transmute::<*const libc::c_void, F>(__cxa_thread_atexit_impl) (dtor, t, &__dso_handle as *const _ as *mut _); return } |
