Bug in Rust char function `is_alphabetic`?

Hello,
I am currently working on primitive_types2 in the Rustlangs course, and when I tried to set an emoji as my character, the output reports that the emoji ':smiling_face_with_tear:' is "Alphabetical!" as well as "Neither alphabetic nor numeric!" - I do not think this is correct.

Also, the is_alphabetic function description states that emojis are not alphabetic, as shown here -


So I am curious: is this a bug in Rust, or am I doing something incorrect?

that's simply not possible with an if-else if-else chain.

you are seeing the output of multiple tests probably.

please paste the code and output as text and format with code fences, screenshots can be hard to read for some users and devices.

Thanks, yes I don't know how I missed the code block above...

Well that's a sign if any that I need to take a break!

Thanks for your help!

@ashutiw2k A note for the future. Please try to share code as text in markdown block, rather than pictures/screen shoots of it.

In order to share it you usually have to minimise it, which can often make you discover the bug on your own. And once code is in a text form it is much easier for others to help you, as we can simply copy and edit it.

And if you didn't know about it, you can also use https://play.rust-lang.org. It has ability of sharing your code snippets as well.