The author didn't show any type-level programming here.
The author called into library which may or may not use type-level programming.
Pin<Output, PB5> doesn't have set_high()? I don't see any type-level stuff here.
If it had been:
Pin<Output, PB (5 + i) >
on the other hand...