If there is time to dispose of trash, you must burn what can burn, particularly in the case of cans, to increase its rate of oxidation, which is biodegradable and is buried. What is not degradable is transported back to civilization for further treatment.
Never leave knowing toxic substances, ammunition , aerosols, flammables or other damage that could spontaneously. Nor they should be thrown into the water or bury, since shortly after starting to contaminate the soil.
Preferably, the biodegradable waste must be buried away from the campsite and away from water bodies or courses, both for hygiene purposes as well as not to attract animals that might interfere with activities or mean, ultimately, some kind of danger .
On the other hand, if an animal happens to finally dig up the trash, it might make the campsite unusable, and in many cases, suitable sites to build a camp not plentiful.