File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -3903,6 +3903,10 @@ fn test_single_channel_multiple_mpp() {
39033903 * nodes[ 6 ] . chain_monitor . write_blocker . lock ( ) . unwrap ( ) = Some ( blocker) ;
39043904
39053905 // Until we have std::thread::scoped we have to unsafe { turn off the borrow checker }.
3906+ // We do this by casting a pointer to a `TestChannelManager` to a pointer to a
3907+ // `TestChannelManager` with different (in this case 'static) lifetime.
3908+ // This is even suggested in the second example at
3909+ // https://doc.rust-lang.org/std/mem/fn.transmute.html#examples
39063910 let claim_node: & ' static TestChannelManager < ' static , ' static > =
39073911 unsafe { std:: mem:: transmute ( nodes[ 6 ] . node as & TestChannelManager ) } ;
39083912 let thrd = std:: thread:: spawn ( move || {
You can’t perform that action at this time.
0 commit comments