A medical implant includes a bioerodible portion that includes a bioerodible polymer and a bioerodible metal. The bioerodible polymer matrix degrades under physiological conditions to form acidic degradation products. The bioerodible metal degrades under physiological conditions to form basic degradation products. The acidic degradation products and the basic degradation products buffer at least a portion of the medical implant. In one aspect, the bioerodible portion includes a bioerodible polymer matrix and a bioerodible metal within the bioerodible polymer matrix. In another aspect, the medical implant can include a body, a plurality of discrete deposits of the bioerodible polymer on the body, and a plurality of discrete deposits of the bioerodible metal on the body.