I just now learned this!
It's from the Dunn decision below, here's the relevant text:
"[F]reedom to travel throughout the United States has long been recognized as a basic right under the Constitution." United States v. Guest, 383 U. S. 745, 383 U. S. 758 (1966). See Passenger Cases, 7 How. 283, 48 U. S. 492 (1849) (Taney, C.J.); Crandall v. Nevada, 6 Wall. 35, 73 U. S. 43-44 (1868); Paul v. Virginia, 8 Wall. 168, 75 U. S. 180 (1869); Edwards v. California, 314 U. S. 160 (1941); Kent v. Dulles, 357 U. S. 116, 357 U. S. 126 (1958); Shapiro v. Thompson, 394 U. S. 618, 394 U. S. 629-631, 394 U. S. 634 (1969); Oregon v. Mitchell, 400 U.S. at 400 U. S. 237 (separate opinion of BRENNAN, WHITE, and MARSHALL, JJ.), 400 U. S. 285-286 (STEWART, J., concurring and dissenting, with whom BURGER, C.J., and BLACKMUN, J., joined). And it is clear that the freedom to travel includes the "freedom to enter and abide in any State in the Union," id. at 400 U. S. 285. Obviously, durational residence laws single out the class of bona fide state and county residents who have recently exercised this constitutionally protected right, and penalize such travelers directly. We considered such a durational residence requirement in Shapiro v. Thompson, supra, where the pertinent statutes imposed a one-year waiting period for interstate migrants as a condition to receiving welfare benefits. Although, in Shapiro, we specifically did not decide whether durational residence requirements could be used to determine voting eligibility,
Page 405 U. S. 339
id. at 394 U. S. 638 n. 21, we concluded that, since the right to travel was a constitutionally protected right,
"any classification which serves to penalize the exercise of that right, unless shown to be necessary to promote a compelling governmental interest, is unconstitutional."
Id. at 394 U. S. 634. This compelling state interest test was also adopted in the separate concurrence of MR. JUSTICE STEWART. Preceded by a long line of cases recognizing the constitutional right to travel, and repeatedly reaffirmed in the face of attempts to disregard it, see Wyman v. Bowens, 397 U. S. 49 (1970), and Wyman v. Lopez, 404 U.S. 1055 (1972), Shapiro and the compelling state interest test it articulates control this case.
Tennessee attempts to distinguish Shapiro by urging that "the vice of the welfare statute in Shapiro . . . was its objective to deter interstate travel." Brief for Appellants 13. In Tennessee's view, the compelling state interest test is appropriate only where there is "some evidence to indicate a deterrence of or infringement on the right to travel. . . ." Ibid. Thus, Tennessee seeks to avoid the clear command of Shapiro by arguing that durational residence requirements for voting neither seek to nor actually do deter such travel. In essence, Tennessee argues that the right to travel is not abridged here in any constitutionally relevant sense.
This view represents a fundamental misunderstanding of the law. [Footnote 8] It is irrelevant whether disenfranchisement or denial of welfare is the more potent deterrent to travel. Shapiro did not rest upon a finding that denial of welfare actually deterred travel. Nor have other "right to travel" cases in this Court always relied on the presence of actual deterrence.
By the way, despite the fact that the right to travel is recognized, it is not actually written in the Constitution.