The invention is directed to inhibitors of mTOR and pharmaceutically acceptable salts or solvates thereof, as well as methods of using them. The inhibitors are generally of structural formula I and pharmaceutically acceptable salts thereof, wherein the variables are as defined herein.