File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,6 @@ declare_lint! {
23
23
/// You should never cast a function directly into an integer but go through
24
24
/// a cast as `fn` first to make it obvious what's going on. It also allows
25
25
/// to prevent confusion with (associated) constants.
26
- /// ```
27
26
pub FUNCTION_CASTS_AS_INTEGER ,
28
27
Warn ,
29
28
"Casting a function into an integer" ,
Original file line number Diff line number Diff line change @@ -293,7 +293,7 @@ impl Backtrace {
293
293
if !Backtrace :: enabled ( ) {
294
294
return Backtrace { inner : Inner :: Disabled } ;
295
295
}
296
- Backtrace :: create ( Backtrace :: capture as usize )
296
+ Backtrace :: create ( Backtrace :: capture as fn ( ) -> Backtrace as usize )
297
297
}
298
298
299
299
/// Forcibly captures a full backtrace, regardless of environment variable
@@ -309,7 +309,7 @@ impl Backtrace {
309
309
#[ stable( feature = "backtrace" , since = "1.65.0" ) ]
310
310
#[ inline( never) ] // want to make sure there's a frame here to remove
311
311
pub fn force_capture ( ) -> Backtrace {
312
- Backtrace :: create ( Backtrace :: force_capture as usize )
312
+ Backtrace :: create ( Backtrace :: force_capture as fn ( ) -> Backtrace as usize )
313
313
}
314
314
315
315
/// Forcibly captures a disabled backtrace, regardless of environment
Original file line number Diff line number Diff line change @@ -169,7 +169,9 @@ mod imp {
169
169
}
170
170
171
171
action. sa_flags = SA_SIGINFO | SA_ONSTACK ;
172
- action. sa_sigaction = signal_handler as sighandler_t ;
172
+ action. sa_sigaction = signal_handler
173
+ as unsafe extern "C" fn ( i32 , * mut libc:: siginfo_t , * mut libc:: c_void )
174
+ as sighandler_t ;
173
175
// SAFETY: only overriding signals if the default is set
174
176
unsafe { sigaction ( signal, & action, ptr:: null_mut ( ) ) } ;
175
177
}
You can’t perform that action at this time.
0 commit comments