The enhancement of chain rigidity and gas transport performance of polymers of intrinsic microporosity via intramolecular locking of the spiro-carbon.