Yeah, I do 2 from time to time, because I use emacs as my long-running editor but also jmacs as a quick-one-off emacs-keybindings terminal editor, and so I tend to autotype C-x C-s C-x C-c for save-and-exit. My fix was to add this to my .emacs:
(put 'save-buffers-kill-emacs 'disabled "You probably didn't want to do that...\n")
which makes emacs prompt you for whether you really meant to ask it to exit. (I'm sure there are a ton of other ways to do this; this is just the first one I hit on a decade or more ago :-))
Set confirm-kill-emacs to (quote yes-or-no-p) through customize-variable. See http://gnu.ist.utl.pt/software/emacs/manual/html_node/Exitin....
1. Possibly it is something to do with rust-analyzer. I work on a pretty large rust project and that does lock things up sometimes.
2. I actually hit C-x C-c by mistake. It's very possible, my fingers often do things by themselves when I'm not concentrating.