Doctor Who: 14 Cool Details In Steven Moffat & David Tennant's Silence In The Library Commentary
3. River's Squareness Gun Is The Exact Same One That Captain Jack Harkness Used
Near the end of the episode, River uses her squareness gun to create an opening in a nearby wall, allowing herself, the Doctor, and the rest of the group to escape the Vashta Nerada - who have taken control of Proper Dave's spacesuit.
This squareness gun looks similar to the one used by Captain Jack Harkness in Series 1's The Doctor Dances, and as revealed by Moffat, that's because it is the same one.
Jack took the gun onboard the TARDIS at the end of that episode, and since he didn't expect to be left behind in The Parting Of The Ways, he left his belongings - including the squareness gun - inside the TARDIS.
And as we now know, River has been in the TARDIS plenty of times, and one day, she picked up Jack's gun, which is why she has it with her in Silence In The Library.