Coke does remove rust from metal. It works on objects like nuts, bolts and corroded battery terminals. The soda is effective because it contains phosphoric acid, which is an ingredient in some commercial rust-removal formulas.
Using Coke to remove rust has disadvantages. The soft drink contains a significant amount of sugar. This leaves a very sticky residue that needs to be removed thoroughly once the rust is gone. In many cases, Coke takes a long time to work. Some rusty items need to be soaked for one or more days. In addition, Coke is corrosive to iron, tin and steel. The Coca-Cola Company does not recommend its use as a cleaning product.