Does not change c, it returns a digit, assuming it does not panic, created from c.
You are not assigning that returned digit to anything so it gets lost.
You then return the c, which has never been changed.
There's no warning because the return value is not marked #[must_use]. The compiler doesn't know whether the function has side effects, so it can't warn on things without them, and even if it did, ours does have side effects: panics.
Hmm... I'm not sure I follow that argument. I don't see what side effects has got to do with it?
There is a value being created by the return, which is casually dropped at the call site without warning. Surely this deserves a warning as much as declaring a variable that is never used?
This has caught me out a couple of times and I have seen others here trip over it.
Because moves are cheap, though, it's not uncommon for an API to return something because why not, even if the caller will often not use it. So this lint tends to be rather high on false positives.