With the introduction of the Certificate of Approval rules in UK immigration law, general visitors are no longer entitled to marry or enter into a Civil Partnership in the UK.
However, it is still possible to apply for a specific Marriage Visitor visa which allows applicants to enter the UK to marry or enter into a Civil Partnership without seeking any further leave to remain. For example this visa would be perfect for applicants with a specific desire to get married in a romantic Scottish castle! Both parties to the marriage are required to leave the UK at the end of their visa.