No way I would have gotten away with wearing a diaper in Marine Corps bootcamp or my B school training (rifleman training). While in my C school (job training) I got badly injured and ended up staying there for three years recovering. During that time I did periodically wear a diaper while in the barracks, but not while on duty- at first.
Once I left my locker unlocked, and my sergeant found my package of depends (this was in the 90's whey they were still half decent diapers). He didn't write me up for it, but did tease me about them for a week or two. I guess he though I needed them because of my injury, so he kept it low key and dropped it after that.
After a couple of years we had a surprise contraband inspection. My captain in charge brought them out of my room in front of everyone and asked me why I had them. Mortified, I told him I was having issues holding it since my injury (which was kind of true). He asked if my doctor knew, but I knew better than to lie on something they can verify so I said no. He asked why, and I said because I didn't want to get ridiculed or harassed for needing them, if anyone ever found out like right now. My captain then ordered everyone to not say anything about my needing diapers, and ordered me to report it to my doc.
Of course I did so at my next appointment. I convinced my doc I was just having mobility issues getting to the bathroom because of my cast (and later braces). He bought that and said I should just continue to manage it as I was till I recovered more. After that I just started wearing them all of the time, since I had that get out of jail free card. It was a relief too because I really was needing them by that point.
Little did I know my incontinence issues were slowly getting worse being left untreated. I didn't ever revisit my needing them with my doctor either, nor did I claim it with my initial disability discharge. (I later did with the va though).