A static library contains elf object files. They are not usable by a debugger though as debuggers don't know how to map back from the linked executable to the source object files. Except on macOS the linker simply doesn't provide this information.
In your case it sounds like you either didn't compile your rust static library with debuginfo enabled in the first place or the debuginfo got stripped out either during linking or afterwards. You will have to ensure that the debuginfo stays in the final executable for a debugger to be able to show source locations.