Stabilization of the resitive wall mode (RWM) may allow fusion power to be doubled for a given magnetic field in advanced tokamak operation. Experimental evidence from DIII-D and other machines suggests that plasma rotation can stabilize the RWM. Several authors (Finn 1995 Phys. Plasmas 2 3782, Bondeson Xie 1997 Phys. Plasmas 4 2081) have constructed analytical cylindrical models for the RWM, but these do not deal with toroidal effects. The framework of Connor and et al. (Connor et al. 1988 Phys. Fluids 31 577) is used to develop ideal plasma analytic models with toroidicity included. Stepped pressure profiles and careful ordering of terms are used to simplify the analysis. First, a current driven kink mode model is developed and a dispersion relation for arbitrary current profile is calculated. Second, the external pressure driven kink mode is similarly investigated as the most important RWM arises from this mode. Using this latter model it is found that the RWM is stabilized by Alfven continuum damping with rotation levels similar to those seen in experiments. An expression for the stability of the external kink mode for more general current profiles and a resistive wall is derived in the Appendix.