Minecraft wiki entry for Mending, associated text: Mending and Infinity are mutually exclusive; only one can be used on a given item in a survival world. Commands let both enchantments function as normal.