However, the moment I add #[pin_project] in front of it, it fails, complaining that T needs to be Sized. I don’t understand why. S doesn’t have a T in it. None of the projections of S, as far as I can tell, should have Ts in them either (they should only have various kinds of pointers to Ts). Curiously, if T is Sized and U is ?Sized, pin-project is perfectly happy. Also, even if I change the order of the fields, pin-project still complains about T and not U!
pin-project is all about to allow obtaining Pin<&mut Field> or &mut Field from Pin<&mut Struct> where the Struct is !Unpin. Since all the fields of your struct is Unpin the S itself is Unpin, so you don't need pin_project attribute on it.
Ah, the reason I was using pin-project is that I received a Pin<&mut S>, and I couldn’t seem to accomplish splitting borrows via the Pin<&mut S>. But I suppose if S is Unpin, should one instead just unwrap the Pin<&mut S> into an &mut S and do the splitting borrows from there?