FYI, small rifle primers and small pistol primers are dimensionally interchangeable. (For very high rifle-level pressures, the softer/thinner small pistol primers might not be strong enough).
Large rifle primers and large pistol primers are NOT dimensionally interchangeable. They are both the same diameter, but the rifle primers are slightly taller. (and like the small primers, there are the same rifle vs. pistol pressure and cup strength issues).
Seating a large pistol primer into a rifle case will result in the primer being seated unusually deeply.
Seating a large rifle primer into a pistol case will result in the primer not being seated deeply enough, and in many cases it might actually protrude above the level of the case head. This is not desirable, and can be unsafe.