Ok, no problem.
Just as I said, it does absolutely nothing because the directory is not empty.

It simply won't do anything unless you use r for recursive and f for force (do not prompt).
Maybe variants of your command then?
rm -rf ~/
This
would actually remove my home directory but it certainly would not cause a "kernel panic".
What if we put a space there?
rm -rf ~ /
This would remove my home directory and then get a permission denied against removing /
or we could just hop straight to it and try
rm -rf /
which would again do nothing, because in a store, presumably I would not have the sudo or root password to escalate privilege.
Even if I did the above command and I did have the sudo or root password it would be unlikely to cause a "kernel panic". All the parts of the OS and apps which were loaded into RAM would function OK until they needed to access the filesystem and then they would start producing all kinds of errors (file not found).
It wouldn't be all that different from if you just yanked the drive out of your machine...I haven't actually tried this mind you but I've had SANs detach themselves from large Linux clusters which is pretty much the same thing. Or, you could run a Bash script which loops and prints something to stdout and then delete the script... the script will continue to run.