No. UB is not unsafe Rust (or C or C++ if in those languages.) It is some text that you trick the compiler into producing a application for. (If lucky it will reject compiling.)
Think of it like me changing a character in an English word to one of the Greek alphabet. It is no longer a word but you might get tricked into thinking it still is.