Nexus 5X no "Charging rapidly" on original (stock) charger
I had the same issue with my Nexus 6P. Tried everything but nothing worked. Visited service centre and got it fixed. They told some hardware issues with the fast charging chip.

 I read somewhere that flashing the firmware again using Fastboot on the phone solves this issue for some users.I didn't worked for me. Might you wanna try. Good Luck!!