Treated lumber is safe to use if it is new. The older ones years ago had chemicals (arsenic and copper I think? ) that were found to not be safe.
I did read a study/experiment done by a university that grew tomatoes in treated lumber beds and then tested them to see if anything was found in the fruits, and they said there was nothing measurable. That was a couple years ago I don't remember now where it was. You can google to find similar information.
I just made mine out of treated lumber. and I am going to stain it and line it w plastic to help preserve it and because we have termites super bad here