For people earning more than average over the repayment period of the student loan who will probably pay off their debt in full (including interest) it makes more sense to pay off the loan as quickly as possible to stop the punitively high interest rolling up (compound interest!). If you look at projections as to how the interest piles up, it's scary - compound interest does that!
Makes no sense to be racking up compound interest at a high rate, at the same time as over-paying into a pension earning a lower rate of interest (or risky returns if invested in stocks and shares).
Better to get the student loan cleared as quickly as possible, if you can, and then start shoveling any excess/spare funds into pensions.
Obviously all depends on your earnings forecasts over your working life and if your employer pays in a higher percentage to match your own higher percentages! If you're a lower earner who'll never pay off your student loans, it's best just to stick to compulsory repayments only and put spare money into investments (which may or may not be pensions as there are still better options such as lifetime ISAs, save to buy ISAs, etc - depending on what's available at the time as these things change on the whims of politicians).
We've crunched the numbers for my son, for example. With his employer, if he only pays in the minimum workplace pension percentage, then his employer only pays in the minimum percentage too. But if, say, he pays in an extra 5%, then his employer double matches it, so pays in an extra 10%. If you have an employer like that, then it quickly becomes a no brainer to max out what you and your employer will pay in, as the extra employer pension more than makes up for the punitive student loan interest rate!
There really are no hard and fast rules with anything concerning personal long term financial planning. You really have to crunch the numbers based on the most likely scenario re future earnings, working life, etc etc and make a few assumptions.
Re student/Uni costs, I don't think people realise how much it costs the student, not just in terms of rents, food, clothes, etc., but also study costs, i.e. text books, stationery, printing & photocopying etc. My son's Uni didn't provide any paper lecture notes - it was all online, and with some modules having lecture notes spanning a few hundred pages, it cost a small fortune for the students to print them out, same with progress exercises/tests, etc., Not all text books are available in high enough quantities from the library, so you will almost certainly have to buy some of your own. And the books aren't the kind you buy from Waterstones for a tenner - some of my son's books were £70/£80/£90 per book. And no, it's not all online these days either - some of these books aren't available on line, and even when they are, a lot of students still prefer a paper set of lecture notes or a paper text book, rather than constantly trying to flick between screens on a tablet or laptop. I think we added up that our son spent something like a couple of thousand on stationery, copying, printing and textbooks during his 3 years at Uni. It's not like school where everything is provided! So, yes, they need to draw down all the loans they can get, AND still need to work, AND still need parental support. It's really not like it was a few decades ago, and not like they make it look in TV shows and films!!