Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panic on Rust 1.64.0 #64

Closed
aisinker opened this issue Sep 24, 2022 · 0 comments · Fixed by #67
Closed

Panic on Rust 1.64.0 #64

aisinker opened this issue Sep 24, 2022 · 0 comments · Fixed by #67

Comments

@aisinker
Copy link

aisinker commented Sep 24, 2022

My little program build on Rust 1.64.0:

fn main(){
    Numpad0Key.press();
}

When I Running it:

thread 'main' panicked at 'cannot transmute_copy if U is larger than T', /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52\library\core\src\mem\mod.rs:1057:5
stack backtrace:
   0: std::panicking::begin_panic_handler
             at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library\std\src\panicking.rs:584
   1: core::panicking::panic_fmt
             at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library\core\src\panicking.rs:142
   2: core::mem::transmute_copy<winapi::um::winuser::KEYBDINPUT,winapi::um::winuser::INPUT_u>
             at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52\library\core\src\mem\mod.rs:1057
   3: inputbot::windows::send_keybd_input
             at C:\Users\aisin\.cargo\git\checkouts\inputbot-ca044018c1f51f7c\b91aec3\src\windows\mod.rs:231
   4: enum$<inputbot::public::KeybdKey>::press
             at C:\Users\aisin\.cargo\git\checkouts\inputbot-ca044018c1f51f7c\b91aec3\src\windows\mod.rs:28
   5: remote_numpad_server::main
             at .\src\main.rs:20
   6: core::ops::function::FnOnce::call_once<void (*)(),tuple$<> >
             at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52\library\core\src\ops\function.rs:248

Seem like because Rust 1.64.0 add a assertion on transmute_copy: Add assertion that transmute_copy's U is not larger than T

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant