I'm installing a pedestal sink and was screwing a hole for the toggle bolt and ended up hitting a stud. Now I have this hole I can't use for the toggle bolt, and I'm stumped on what to do. What's the best solution?
That sounds like a good problem to have. Go to the store and get a lag screw, and use that instead.
Attaching the sink to a stud is preferable, and will offer a more solid install.
Hanging a sink from drywall, sounds like a bad idea to begin with. So I'd say you got lucky to hit the stud.
You need a basin fixing kit. Like this one....
Screw the coarse threaded part into the stud using a spanner or pair of grips after drilling a suitable sized pilot hole. Slide the basin over the protruding threads, use the plastic washers, followed by the metal ones and nip up the nut gently until just holding. The plastic plugs are there for masonry walls only.