We derive a continuum model for incompatible elasticity as a variational limit of a family of discrete nearest-neighbor elastic models. The discrete models are based on discretizations of a smooth Riemannian manifold (M, g), endowed with a flat, symmetric connection ∇. The metric g determines local equilibrium distances between neighboring points; the connection ∇ induces a lattice structure shared by all the discrete models. The limit model satisfies a fundamental rigidity property: there are no stress-free configurations, unless g is flat, i.e., has zero Riemann curvature. Our analysis focuses on two-dimensional systems, however, all our results readily generalize to higher dimensions.