From e2fe7a083ed63b1a739f5e0d0417cfd8a7da6510 Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Tue, 4 Nov 2014 02:29:23 -0500 Subject: [PATCH] Lifetime guide -> ownership guide --- configure | 2 +- mk/docs.mk | 2 +- src/doc/{guide-lifetimes.md => guide-ownership.md} | 0 src/doc/guide-pointers.md | 8 ++++---- src/doc/guide-unsafe.md | 2 +- src/doc/index.md | 2 +- src/doc/po4a.conf | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) rename src/doc/{guide-lifetimes.md => guide-ownership.md} (100%) diff --git a/configure b/configure index 5ac39822059..ed8c4ea1661 100755 --- a/configure +++ b/configure @@ -1046,7 +1046,7 @@ do make_dir $h/test/doc-guide-ffi make_dir $h/test/doc-guide-runtime make_dir $h/test/doc-guide-macros - make_dir $h/test/doc-guide-lifetimes + make_dir $h/test/doc-guide-ownership make_dir $h/test/doc-guide-pointers make_dir $h/test/doc-guide-container make_dir $h/test/doc-guide-tasks diff --git a/mk/docs.mk b/mk/docs.mk index 48eb9e81c20..b1f5c10fd3d 100644 --- a/mk/docs.mk +++ b/mk/docs.mk @@ -25,7 +25,7 @@ # L10N_LANGS are the languages for which the docs have been # translated. ###################################################################### -DOCS := index intro tutorial guide guide-ffi guide-macros guide-lifetimes \ +DOCS := index intro tutorial guide guide-ffi guide-macros guide-ownership \ guide-tasks guide-container guide-pointers guide-testing \ guide-plugin guide-crates complement-bugreport guide-error-handling \ complement-lang-faq complement-design-faq complement-project-faq \ diff --git a/src/doc/guide-lifetimes.md b/src/doc/guide-ownership.md similarity index 100% rename from src/doc/guide-lifetimes.md rename to src/doc/guide-ownership.md diff --git a/src/doc/guide-pointers.md b/src/doc/guide-pointers.md index cf7ecd7e51f..10f2fdb5063 100644 --- a/src/doc/guide-pointers.md +++ b/src/doc/guide-pointers.md @@ -408,8 +408,8 @@ test.rs:4 let y = &x; ``` As you might guess, this kind of analysis is complex for a human, and therefore -hard for a computer, too! There is an entire [guide devoted to references -and lifetimes](guide-lifetimes.html) that goes into lifetimes in +hard for a computer, too! There is an entire [guide devoted to references, ownership, +and lifetimes](guide-ownership.html) that goes into this topic in great detail, so if you want the full details, check that out. ## Best practices @@ -526,7 +526,7 @@ with some improvements: 4. Rust enforces that no other writeable pointers alias to this heap memory, which means writing to an invalid pointer is not possible. -See the section on references or the [lifetimes guide](guide-lifetimes.html) +See the section on references or the [ownership guide](guide-ownership.html) for more detail on how lifetimes work. Using boxes and references together is very common. For example: @@ -759,5 +759,5 @@ Here's a quick rundown of Rust's pointer types: # Related resources * [API documentation for Box](std/boxed/index.html) -* [Lifetimes guide](guide-lifetimes.html) +* [Ownership guide](guide-ownership.html) * [Cyclone paper on regions](http://www.cs.umd.edu/projects/cyclone/papers/cyclone-regions.pdf), which inspired Rust's lifetime system diff --git a/src/doc/guide-unsafe.md b/src/doc/guide-unsafe.md index 4d6dde7f57f..5b248126c80 100644 --- a/src/doc/guide-unsafe.md +++ b/src/doc/guide-unsafe.md @@ -37,7 +37,7 @@ build safe interfaces. ## References One of Rust's biggest features is memory safety. This is achieved in -part via [the lifetime system](guide-lifetimes.html), which is how the +part via [the ownership system](guide-ownership.html), which is how the compiler can guarantee that every `&` reference is always valid, and, for example, never pointing to freed memory. diff --git a/src/doc/index.md b/src/doc/index.md index 7d4d48e80a3..77909955822 100644 --- a/src/doc/index.md +++ b/src/doc/index.md @@ -54,9 +54,9 @@ Rust Guides are in-depth looks at a particular topic that's relevant to Rust development. If you're trying to figure out how to do something, there may be a guide that can help you out: +* [Ownership](guide-ownership.html) * [Strings](guide-strings.html) * [Pointers](guide-pointers.html) -* [References and Lifetimes](guide-lifetimes.html) * [Crates and modules](guide-crates.html) * [Tasks and Communication](guide-tasks.html) * [Error Handling](guide-error-handling.html) diff --git a/src/doc/po4a.conf b/src/doc/po4a.conf index 4fbb3c21016..1726afa51e4 100644 --- a/src/doc/po4a.conf +++ b/src/doc/po4a.conf @@ -11,7 +11,7 @@ [type: text] src/doc/complement-project-faq.md $lang:doc/l10n/$lang/complement-project-faq.md [type: text] src/doc/guide-container.md $lang:doc/l10n/$lang/guide-container.md [type: text] src/doc/guide-ffi.md $lang:doc/l10n/$lang/guide-ffi.md -[type: text] src/doc/guide-lifetimes.md $lang:doc/l10n/$lang/guide-lifetimes.md +[type: text] src/doc/guide-ownership.md $lang:doc/l10n/$lang/guide-ownership.md [type: text] src/doc/guide-macros.md $lang:doc/l10n/$lang/guide-macros.md [type: text] src/doc/guide-plugin.md $lang:doc/l10n/$lang/guide-plugin.md [type: text] src/doc/guide-pointers.md $lang:doc/l10n/$lang/guide-pointers.md