The study compares 2 medicines for type 2 diabetes: fast-acting insulin aspart (a new medicine) and NovoRapid®/NovoLog® (a medicine doctors can already prescribe). Fast-acting insulin aspart will be tested to see how well it works and if it is safe. Participants will get either fast-acting insulin aspart or NovoRapid®/ NovoLog® - which treatment you get is decided by chance. Both medicines will be taken together with insulin degludec. Participants will need to take 1 injection 4 times every day (all insulins will be provided in pens). The study will last for about 8 months (34 weeks).