1 00:00:06,080 --> 00:00:10,250 And then to wrap up this section, I want to talk about static lifetimes. 2 00:00:10,550 --> 00:00:16,880 When we give a reference, a static lifetime, the reference can live for the entire duration of the 3 00:00:16,880 --> 00:00:17,570 program. 4 00:00:18,420 --> 00:00:22,110 All string literals have a static lifetime. 5 00:00:22,110 --> 00:00:24,210 So let's see what this looks like real quick. 6 00:00:24,210 --> 00:00:36,000 So we're going to say let s of a reference with a static lifetime string slice equal. 7 00:00:37,350 --> 00:00:42,300 I have a static lifetime and it's valid. 8 00:00:42,390 --> 00:00:48,570 So when we give the string literal a static lifetime, the text of the string is stored directly in 9 00:00:48,570 --> 00:00:54,510 the program's binary, so it is always available, some will suggest, to use static lifetimes and error 10 00:00:54,510 --> 00:00:59,160 messages, but you will want to consider whether you want something to live that long or not. 11 00:00:59,960 --> 00:01:03,530 Most lifetime errors will result from dangling references. 12 00:01:03,530 --> 00:01:09,320 So it is better to just fix the problem the correct way than to assign it a static lifetime.