The Council of Trent, Session Seven, Sacraments in General, Canon 4
[CANON IV.-If any one saith, that the sacraments of the New Law are not necessary unto salvation, but superfluous; and that, without them, or without the desire thereof, men obtain of God, through faith alone, the grace of justification;-though all (the sacraments) are not indeed necessary for every individual; let him be anathema.[Commentary by St. Alphonsus Liguori:
11. Can. 4: Si quis dixerit sacramenta novae legis non esse ad salutem necessaria, sed superflua; et sine eis aut eorum voto per solam fidem homines a Deo gratiam justificationis adipisci, licet omnia singulis necessaria non siut, anathema sit."
12. The heretics say that no sacrament is necessary, inasmuch as they hold that man is justified by faith alone, and that the sacraments only serve to excite and nourish this faith, which (as they say) can be equally excited and nourished by preaching. But this is certainly false, and is condemned in the fifth, sixth, seventh, and eighth canons: for as we know from the Scriptures, some of the sacraments are necessary (necessitate Medii) as a means without which salvation is impossible. Thus Baptism is necessary for all, Penance for them who have fallen into sin after Baptism, and the Eucharist is necessary for all at least in desire ( in voto)
13. Soave says that at least the implicit desire of Baptism (the same holds for penance in regards to sinners) appeared to many of the fathers not to be necessary for justification: because Cornelius and the good thief were justified without having any knowledge of Baptism. But, Pallavicini says that this is a mere dream of Soave: for the theologians of Trent could not have adduced the example of Cornelius or of the good thief in defence of such an opinion, when everyone knew that the obligation of Baptism did not commence till after the death of the Saviour, and after the promulgation of the Gospel. Besides, who can deny that the act of perfect love of God, which is sufficient for justification, includes an implicit desire of Baptism, of Penance and of the Eucharist. He who wishes the whole, wishes every part of that whole, and all the means for its attainment. In order to be justified without Baptism, an infidel must love God above all things and must have a universal will to observe the divine precepts, among which the first is to receive Baptism: and therefore in order to be justified it is necessary for him to have at least an implicit desire of that sacrament. For it is certain that to such desire is ascribed the spiritual regeneration of a person who has not been baptized, and the remission of sins to baptized persons who have contrition, is likewise ascribed to the explicit or implicit desire of sacramental absolution.
14. In the fourth canon the words licet omnia singulis necessaria non sint, were afterwards inserted. By this canon it was intended to condemn Luther, who asserts that none of the sacraments is absolutely necessary for salvation, because as has been already said, he ascribed all salvation to faith, and nothing to the efficacy of the sacraments.
From: (An Exposition and Defence of All the Points of Faith Discussed and Defined by the Sacred Council of Trent, Along With the Refutation of the Errors of the Pretended Reformers
, Saint Alphonsus Liguori, Dublin, 1846.)
The Council of Trent, The Catechism of the Council of Trent, Papal Teaching, The Teaching of the Holy Office, The Teaching of the Church Fathers, The Code of Canon Law, Countless approved catechisms, The Doctors of the Church, The teaching of the Dogmatic