From 8e3ea5d5014de1a590a79d05d0a64a0f618c3afa Mon Sep 17 00:00:00 2001 From: Cruz Julian Bishop Date: Thu, 25 Jun 2015 23:26:05 +0000 Subject: [PATCH 1/5] Ignore KDevelop 4 (and 5 pre-release) project files --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 5d5da135a82..572111bf961 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,7 @@ *.exe *.fn *.html +*.kdev4 *.ky *.ll *.llvm From fd9b2caa5f6792a87a4c99bbbd6abed303a8ab5c Mon Sep 17 00:00:00 2001 From: OGINO Masanori Date: Fri, 26 Jun 2015 11:09:15 +0900 Subject: [PATCH 2/5] Correct a missing reference in the release note. Fix #26537. Signed-off-by: OGINO Masanori --- RELEASES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASES.md b/RELEASES.md index 203da02c373..913b83a0f61 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -6,7 +6,7 @@ Version 1.1.0 (June 2015) Highlights ---------- -* The [`std::fs` module has been expanded][fs-expand] to expand the set of +* The [`std::fs` module has been expanded][fs] to expand the set of functionality exposed: * `DirEntry` now supports optimizations like `file_type` and `metadata` which don't incur a syscall on some platforms. From 30cde078c6887f7be79884054ec16334fb76a467 Mon Sep 17 00:00:00 2001 From: Richo Healey Date: Fri, 26 Jun 2015 09:53:56 -0700 Subject: [PATCH 3/5] std: clean up duplicated attrs and comment on panic --- src/libstd/macros.rs | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs index 02c35e9526d..697b934c676 100644 --- a/src/libstd/macros.rs +++ b/src/libstd/macros.rs @@ -14,28 +14,6 @@ //! library. Each macro is available for use when linking against the standard //! library. -/// The entry point for panic of Rust threads. -/// -/// This macro is used to inject panic into a Rust thread, causing the thread to -/// unwind and panic entirely. Each thread's panic can be reaped as the -/// `Box` type, and the single-argument form of the `panic!` macro will be -/// the value which is transmitted. -/// -/// The multi-argument form of this macro panics with a string and has the -/// `format!` syntax for building a string. -/// -/// # Examples -/// -/// ```should_panic -/// # #![allow(unreachable_code)] -/// panic!(); -/// panic!("this is a terrible mistake!"); -/// panic!(4); // panic with the value of 4 to be collected elsewhere -/// panic!("this is a {} {message}", "fancy", message = "message"); -/// ``` -#[macro_export] -#[stable(feature = "rust1", since = "1.0.0")] -#[allow_internal_unstable] /// The entry point for panic of Rust threads. /// /// This macro is used to inject panic into a Rust thread, causing the thread to From c98e46c7cabd44a306ac52c95d961bcebd899b0f Mon Sep 17 00:00:00 2001 From: Alexis Beingessner Date: Fri, 26 Jun 2015 11:44:02 -0700 Subject: [PATCH 4/5] accessing private fields is not safe, and io isn't scary --- src/doc/reference.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/doc/reference.md b/src/doc/reference.md index a3e13acccae..7e28651c6aa 100644 --- a/src/doc/reference.md +++ b/src/doc/reference.md @@ -1047,11 +1047,8 @@ This is a list of behavior not considered *unsafe* in Rust terms, but that may be undesired. * Deadlocks -* Reading data from private fields (`std::repr`) * Leaks of memory and other resources * Exiting without calling destructors -* Sending signals -* Accessing/modifying the file system * Integer overflow - Overflow is considered "unexpected" behavior and is always user-error, unless the `wrapping` primitives are used. In non-optimized builds, the compiler From 9001da658ae020199b479f416b21eb71d0d48492 Mon Sep 17 00:00:00 2001 From: Alexis Beingessner Date: Fri, 26 Jun 2015 12:06:05 -0700 Subject: [PATCH 5/5] make book match reference --- src/doc/trpl/unsafe.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/doc/trpl/unsafe.md b/src/doc/trpl/unsafe.md index fdb9c33a2b0..e8f1b829061 100644 --- a/src/doc/trpl/unsafe.md +++ b/src/doc/trpl/unsafe.md @@ -12,7 +12,7 @@ two contexts. The first one is to mark a function as unsafe: ```rust unsafe fn danger_will_robinson() { - // scary stuff + // scary stuff } ``` @@ -68,11 +68,8 @@ Whew! That’s a bunch of stuff. It’s also important to notice all kinds of behaviors that are certainly bad, but are expressly _not_ unsafe: * Deadlocks -* Reading data from private fields -* Leaks due to reference count cycles +* Leaks of memory or other resources * Exiting without calling destructors -* Sending signals -* Accessing/modifying the file system * Integer overflow Rust cannot prevent all kinds of software problems. Buggy code can and will be